import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: 'My Bearer Token',
});
const webhook = await client.webhooks.create({ url: 'url' });
console.log(webhook.id);
{
"created_at": "<string>",
"description": "<string>",
"disabled": true,
"filter_types": [
"<string>"
],
"id": "<string>",
"metadata": {},
"rate_limit": 1,
"updated_at": "<string>",
"url": "<string>"
}
Create a new webhook for a business.
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: 'My Bearer Token',
});
const webhook = await client.webhooks.create({ url: 'url' });
console.log(webhook.id);
{
"created_at": "<string>",
"description": "<string>",
"disabled": true,
"filter_types": [
"<string>"
],
"id": "<string>",
"metadata": {},
"rate_limit": 1,
"updated_at": "<string>",
"url": "<string>"
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Endpoint created Successfully
The response is of type object
.
Was this page helpful?