메인 콘텐츠로 건너뛰기
POST
/
products
/
{id}
/
short_links
JavaScript
import DodoPayments from 'dodopayments';

const client = new DodoPayments({
  bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});

const shortLink = await client.products.shortLinks.create('id', { slug: 'slug' });

console.log(shortLink.full_url);
{
  "full_url": "<string>",
  "short_url": "<string>"
}

인증

Authorization
string
header
필수

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

경로 매개변수

id
string
필수

Product Id

본문

application/json
slug
string
필수

Slug for the short link.

static_checkout_params
object

Static Checkout URL parameters to apply to the resulting short URL.

응답

Short URL

full_url
string
필수

Full URL.

short_url
string
필수

Short URL.