To learn more about webhooks in our API, follow the link below:
When a Pix is debited from your account, the best way to receive updates regarding the payment is using the webhook PIX_PAYMENT_UPDATED
. As soon as the transaction's status is updated, aPIX_PAYMENT_UPDATED
weboohk is sent.
Here's the simplest way to configure a PIX_PAYMENT_UPDATED
webhook:
Headers
Name | Description |
---|---|
x-delbank-api-key | Required. API key |
Body
{
"eventType": "PIX_PAYMENT_UPDATED",
"url": "https://example.com.br/webhooks/v1/pixupdate", // Add your own URL here
"authorization": "NONE,
"authorizationScheme": "NONE"
}
Here's an example of a webhook of an effective payment of a pix sent:
{
"eventType":"PIX_PAYMENT_EFFECTIVE",
"endToEndId":"E3822485720231013020122659082578",
"idempotencyKey":"idempotencyKey999999",
"status":"PIX_EFFECTIVE",
"amount":20.0,
"createdAt":"2023-10-13T05:01:22.953Z",
"description":"description",
"payer":{
"number":"999999",
"branch":"0001",
"type":"CURRENT",
"participant":{
"ispb":"38224857"
},
"holder":{
"name":"EXAMPLE EXAMPLE",
"document":"111111111111111",
"type":"LEGAL"
}
},
"beneficiary":{
"number":"1234556",
"branch":"0001",
"type":"PAYMENT",
"participant":{
"ispb":"08561701"
},
"holder":{
"name":"HOLDER NAME",
"document":"11111111111",
"type":"NATURAL"
}
}
}
Here's an example of a webhook of an error in a pix sent:
{
"eventType":"PIX_PAYMENT_ERROR",
"endToEndId":"E3822485720231013015126180935816",
"idempotencyKey":"idempotencyKey12345",
"status":"PIX_ERROR",
"error":{
"code":"AC06",
"description":"Conta transacional do usuƔrio recebedor encontra-se bloqueada."
},
"amount":100.0,
"createdAt":"2023-10-13T04:51:26.84Z",
"description":"description",
"payer":{
"number":"12345",
"branch":"0001",
"type":"CURRENT",
"participant":{
"ispb":"38224857"
},
"holder":{
"name":"EXAMPLE EXAMPLE",
"document":"11111111111111",
"type":"LEGAL"
}
},
"beneficiary":{
"number":"12345",
"branch":"3231",
"type":"CURRENT",
"participant":{
"ispb":"90400888"
},
"holder":{
"name":"HOLDER NAME",
"document":"11111111111",
"type":"NATURAL"
}
}
}
Here are the attributes that are passed by the PIX_PAYMENT_UPDATED
webhook:
Name | Description |
---|---|
eventType | The type of event that triggered the webhook (e.g., "PIX_RECEIVED"). |
correlationId | A unique identifier for correlating the event with other related processes. |
idempotencyKey | An identifier provided for tracking the payment across systems. |
status | The status of the transaction (e.g., "PIX_PAYMENT_EFFECTIVE") |
amount | The monetary value of the PIX transaction. |
createdAt | The timestamp indicating when the PIX transaction was created. |
description | Description of the transaction assigned by the payer |
payer | Object containing information about the payer |
payer.number | The account number of the payer. |
payer.branch | The branch number of the payer's account. |
payer.type | The type of the payer's account (e.g., "PAYMENT"). |
payer.participant | An object containing information about the financial institution of the payer. |
payer.participant.ispb | The ISPB code of the payer's financial institution (e.g., "18236120"). |
payer.holder | An object containing information about the holder of the account that was used to pay |
payer.holder.name | The name of the payer account holder |
payer.holder.document | The document of the payer account holder |
payer.holder.type | The type of the payer's account (NATURAL or LEGAL) |
beneficiary | An object containing information about the beneficiary of the Pix transaction. |
beneficiary.number | The account number of the beneficiary. |
beneficiary.branch | The branch number of the beneficiary |
beneficiary.type | The type of the beneficiary's account (e.g., "PAYMENT"). |
beneficiary.participant | An object containing information about the financial institution of the beneficiary. |
beneficiary.participant.ispb | The ISPB code of the beneficiary's financial institution (e.g., "18236120"). |
beneficiary.holder.name | The name of the beneficiary account holder |
beneficiary.holder.document | The document of the beneficiaryaccount holder |
beneficiary.holder.type | The type of the beneficiary's account (NATURAL or LEGAL) |