A webhook is an HTTP endpoint that receives events from OPEN. Webhooks allow you to be notified about payment events that happen.
You can set up webhooks from your Dashboard and configure separate URLs for live mode and sandbox mode.
SetUp Webhook URL
To setup webhooks:
- Log into your OPEN Dashboard and navigate to Settings.
- Click on the tab Company
- Inside Developer API, setup your webhook URLs
- Click Save to enable webhooks.
{
"amount": "55.30",
"currency": "INR",
"mtx": null,
"attempts": 1,
"id": "pt_BRgoBYuhcr4Q3Jz",
"entity": "payment_token",
"status": "paid",
"udf": {
"jithi": "ssss",
"test": "test"
},
"event": "payment_token_paid",
"payment": {
"amount": "55.30",
"currency": "INR",
"payment_error_code": null,
"payment_error_description": null,
"id": "py_BRgoBjah1ICsqXE",
"entity": "payment",
"status": "captured",
"payment_instrument": {
"entity": "payment_instrument",
"id": 1000,
"name": "mock",
"type_id": 1000,
"type_name": null
},
"customer": {
"contact_number": "8682008771",
"email_id": "[email protected]",
"id": "cs_BRaSbZJUZUQvJUp",
"entity": "customer"
},
"card": {
"customer_id": "cs_BRaSbZJUZUQvJUp",
"card_type": "2",
"card_network": "visa",
"id": "sb_card_attr_BRetpEQTRDszw27",
"entity": "card"
}
}
}
The table below lists the webhook events available for Payments.
Webhook Event | Description |
---|---|
payment_captured | Triggered when a payment is successfully completed. |
payment_failed | Triggered when a payment failed |
payment_pending | Triggered when a payment is in pending state |
payment_cancelled | Triggered when a payment is cancelled |
payment_token_created | Triggered when a payment token is created |
payment_token_attempted | Triggered when payment for a payment token has initiated |
payment_token_paid | Triggered when payment for a payment token has successful |
va_viewed | Triggered when the customer clicks on Virtual Account Option (Payment via NEFT/RTGS/IMPS) |
cash_viewed | Triggered when the customer clicks on "Cash" method as payment option |