πŸ‡¨πŸ‡΄ PSE Webhooks

Bank accounts

OBJECT_CREATED

Whenever there is a new bank account created asynchronously, you will receive the following webhook:

{
  "webhook_id": "3b9a69f7-0f0a-455b-832d-49ad6fd4905c",
  "webhook_type": "BANK_ACCOUNTS",
  "webhook_code": "OBJECT_CREATED",
  "object_id": "d2e40773-19f6-48d1-93c3-3590ec0c74df",
  "data": {
    "metadata": {"internal_reference_id": "GGq12345w2"}
  },
}

Once you receive the notification, you can get details on the bank account by making the following request:

curl --request GET 'https://api.belvo.com/payments/bank-accounts/{id}/' \
  -u [Secret Key ID]:[Secret Key PASSWORD]

Where:

  • id is the object_id of the bank account (which you receive in the webhook event).

Payment intents

STATUS_UPDATE

You'll receive a webhook event whenever the status of a payment intent is updated to:

EventSent when
REQUIRES_PAYMENT_METHODAdditional details are required to complete the payment intent flow.
PROCESSINGYou've sent confirm=True and the payment is being processed by the PSE network.
SUCCEEDEDThe payment has been confirmed and processed by the PSE network.
FAILEDThe payment has been rejected by the user or there has been a general error in the PSE network.
{
  "webhook_id": "3b9a69f7-0f0a-455b-832d-49ad6fd4905c",
  "webhook_type": "PAYMENT_INTENTS",
  "webhook_code": "STATUS_UPDATE",
  "object_id": "d2e40773-19f6-48d1-93c3-3590ec0c74df",
  "data": {
    "status": "SUCCEEDED", // The status of the payment intent.
    "metadata": {"internal_reference_id": "GGq12345w2"}
  }
}
{
  "webhook_id": "3b9a69f7-0f0a-455b-832d-49ad6fd4905c",
  "webhook_type": "PAYMENT_INTENTS",
  "webhook_code": "STATUS_UPDATE",
  "object_id": "d2e40773-19f6-48d1-93c3-3590ec0c74df",
  "data": {
    "status": "FAILED", // The status of the payment intent.
    "metadata": {"internal_reference_id": "GGq12345w2"},
    "failure_code": "beneficiary_not_registered", // A unique code for the error.
    "failure_message": "There was an unexpected error. Please contact support." // Human-readable description of the error.
  }
}

Once you receive the notification, you can get details on the payment intent by making the following request:

curl --request GET 'https://api.belvo.com/payments/payment-intents/{id}' \
  -u [Secret Key ID]:[Secret Key PASSWORD]

Where:

  • id is the object_id of the payment intent (which you receive in the webhook event).

Transactions

OBJECT_CREATED

Whenever there is a new transaction created, you will receive the following webhook:

{
  "webhook_id": "3b9a69f7-0f0a-455b-832d-49ad6fd4905c",
  "webhook_type": "TRANSACTIONS",
  "webhook_code": "OBJECT_CREATED",
  "object_id": "d2e40773-19f6-48d1-93c3-3590ec0c74df",
  "data": {
    "metadata": {"internal_reference_id": "GGq12345w2"}
  },
}

Once you receive the notification, you can get details on the transaction by making the following request:

curl --request GET 'https://api.belvo.com/payments/transactions/{id}/' \
  -u [Secret Key ID]:[Secret Key PASSWORD]

Where:

  • id is the object_id of the transaction (which you receive in the webhook event).