एक उत्पाद के लिए कस्टम स्लग के साथ एक शॉर्ट चेकआउट URL बनाता है। इसके पीछे एक स्थिर चेकआउट URL का उपयोग किया जाता है।
POST
/
products
/
{id}
/
short_links
JavaScript
कॉपी करें
AI से पूछें
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);
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);