import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: 'My Bearer Token',
});
const addonResponse = await client.addons.create({
currency: 'AED',
name: 'name',
price: 0,
tax_category: 'digital_products',
});
console.log(addonResponse.id);
{
"business_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"currency": "AED",
"description": "<string>",
"id": "<string>",
"image": "<string>",
"name": "<string>",
"price": 123,
"tax_category": "digital_products",
"updated_at": "2023-11-07T05:31:56Z"
}
Create a new addon product that can be attached to your main subscription products
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: 'My Bearer Token',
});
const addonResponse = await client.addons.create({
currency: 'AED',
name: 'name',
price: 0,
tax_category: 'digital_products',
});
console.log(addonResponse.id);
{
"business_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"currency": "AED",
"description": "<string>",
"id": "<string>",
"image": "<string>",
"name": "<string>",
"price": 123,
"tax_category": "digital_products",
"updated_at": "2023-11-07T05:31:56Z"
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Create a new addon
The response is of type object
.
Was this page helpful?