Create new Webhook via API
You can create new Webhooks through the API, for both root and subaccounts. You can have up to 10 Webhooks set up in your account, and it's up to you to choose which events each Webhook will receive.
To create a new Webhook, we'll make a call to the Create New Webhook endpoint.
POST
/v3/webhooks
Check out the full reference for this endpoint
{
"name": "Example Name",
"url": "https://www.example.com/webhook/asaas",
"email": "[email protected]",
"enabled": true,
"interrupted": false,
"authToken": null,
"sendType": "SEQUENTIALLY",
"events": [
"PAYMENT_CREDIT_CARD_CAPTURE_REFUSED",
"PAYMENT_CHECKOUT_VIEWED",
"PAYMENT_BANK_SLIP_VIEWED",
"PAYMENT_DUNNING_REQUESTED",
"PAYMENT_DUNNING_RECEIVED",
"PAYMENT_AWAITING_CHARGEBACK_REVERSAL",
"PAYMENT_CHARGEBACK_DISPUTE",
"PAYMENT_CHARGEBACK_REQUESTED",
"PAYMENT_RECEIVED_IN_CASH_UNDONE",
"PAYMENT_REFUND_IN_PROGRESS",
"PAYMENT_REFUNDED",
"PAYMENT_RESTORED",
"PAYMENT_DELETED",
"PAYMENT_OVERDUE",
"PAYMENT_ANTICIPATED",
"PAYMENT_RECEIVED",
"PAYMENT_CONFIRMED",
"PAYMENT_UPDATED",
"PAYMENT_CREATED",
"PAYMENT_REPROVED_BY_RISK_ANALYSIS",
"PAYMENT_APPROVED_BY_RISK_ANALYSIS",
"PAYMENT_AWAITING_RISK_ANALYSIS",
"PAYMENT_AUTHORIZED"
]
}
In the call above, we created a new Webhook that will receive practically all existing billing events.
Through the API, you can also edit, delete or remove the Webhooks from your account. To list all Webhooks, use the endpoint as a GET call.
GET
/v3/webhooks
Check out the full reference for this endpoint
From this endpoint, you can also check which of your Webhooks have their queue interrupted.
Updated 8 months ago