Skip to main content

Webhooks

We support configuration of a webhook uri for subscribing to various status change events. A default webhook can be configured while onboarding (both PG onboarding and merchant onboarding). Apart from this, entity level webhooks can be configured using the createConfiguration.webhookUrl parameter in the subsequent Create APIs.

Payload for Transaction Status Events#

{  "transaction": {    "id": "de7b1bca-4374-4ec6-a52d-b095404593cd",    "amount": 12000,    "notes": {      "referenceId": "abcd",      "invoiceNumber": 123445    },    "status": "PENDING",    "refunds": [],    "uri": "https://web-v2.bharatx.tech/app/transaction/23345556"  }}

Payload for Refund Status Events#

{  "refund": {    "id": 2334,    "amount": 12000,    "status": "SUCCESS",  }}

Response#

The payment gateway is expected to return a 200-299 HTTP status code as response to the webhook to acknowledge the processing of the webhook event. Each webhook is attempted thrice (with 1m interval in between) until a successful acknowledgement is received.