Webhooks are the primary method for receiving updates from our API. They are given the highest priority, ensuring updates are delivered to them first. Therefore, it is crucial to properly configure your webhooks to ensure you receive updates promptly and reliably. We recommend that you do not use one of the public API keys to configure the webhook in the testing environment, as this makes configuration difficult since any user can use them.
Webhooks configuration
Request
POST 'https://apisandbox.delbank.com.br/baas/api/v1/webhooks'
Headers
Name | Description |
---|---|
x-delbank-api-key | Required. API key |
Body
Name | Type | Description |
---|---|---|
eventType | enum | Required. Type of event to be monitored/listened |
url | string | Required. API URL of the client system that will receive the webhook information |
authorizationScheme | enum | Type of authorization that must be used when executing the endpoint call (according to the url field). Domains:- BASIC - BEARER - HEADER |
authorization | string | Information that will be sent in the request header to the endpoint |
Example
Configuring the webhook with Authentication Basic
{
"eventType": "PIX_RECEIVED",
"url": "https://example.com.br/webhooks/v1/bankslips",
"authorization": "bG9naW46cGFzc3dvcmQ=",
"authorizationScheme": "BASIC"
}
Configuring the webhook with Authentication Bearer
{
"eventType": "PIX_RECEIVED",
"url": "https://example.com.br/webhooks/v1/bankslips",
"authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"authorizationScheme": "BEARER"
}
Configuration Maintenance
Endpoint | HTTP Method | Description |
---|---|---|
https://apisandbox.delbank.com.br/baas/api/v1/webhooks | GET | Query all the registered webhooks registered by the API Key used in the requisition. |
https://apisandbox.delbank.com.br/baas/api/v1/webhooks/{ID} | GET | Query webhook by ID |
https://apisandbox.delbank.com.br/baas/api/v1/webhooks/{ID} | PATCH | Update webhook by ID (Uses the same payload as the register webhook) |
https://apisandbox.delbank.com.br/baas/api/v1/webhooks/{ID} | DELETE | Remove registered Webhook by ID |
Event Types
Below is a list of event types and their meaning
Name | Description |
---|---|
CHARGE_PAID | Change paid. |
PIX_RECEIVED | Pix received. (New webhook flow for Pix receiving only) |
PIX_PAYMENT_UPDATED | Update payment status for Pix. |
PIX_REFUNDED | Event for refunds received |
PIX_REFUND_PAYMENT_UPDATED | Event for refunds sent |
TRANSFER_INTERNAL_CREDITED | Internal transfer received |
TRANSFER_INTERNAL_DEBITED | Internal transfer sent |
WHITELABEL_CUSTOMER_DOCUMENTATION_REJECTED | Rejected documents for a new created account |
WHITELABEL_CUSTOMER_APPROVED | Customer approved and bank account created |