Vai al contenuto principale
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('pdt_R8AWMPiV8RyJElcCKvAID', {
  slug: 'slug',
});

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

Autorizzazioni

Authorization
string
header
obbligatorio

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

Parametri del percorso

id
string
obbligatorio

Product Id

Corpo

application/json
slug
string
obbligatorio

Slug for the short link.

static_checkout_params
object

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

Risposta

Short URL

full_url
string
obbligatorio

Full URL.

short_url
string
obbligatorio

Short URL.

Ultima modifica il 1 aprile 2026