Available in🇮🇳 India
Webhooks automatically notify your application when specific events occur. Instead of continuously polling APIs to check for updates, webhooks push notifications directly to your server when events happen. Integrating with webhooks is strongly recommended as it is the most efficient method for tracking payment and token status changes in real time.
To configure webhooks, go to the Razorpay Dashboard and set up the webhook URL for your account. Know more about Webhooks.
Check Token Status using Webhooks
You can use the below webhooks to check the status of the token (mandate).Token Confirmed
Indicates that the bank has completed the mandate registration. Once confirmed, you can execute subsequent payments as per your business needs.UPI
Token Rejected
Triggered during the mandate registration process, when the registration fails without completion.UPI
Token Cancelled
Triggered when a token is explicitly cancelled or deactivated. This can happen when the customer cancels the mandate from their UPI app or when the business cancels it via the Cancel Token API.Handy TipsWhen you call the Cancel Token API, the token first enters the
cancellation_initiated state while Razorpay waits for NPCI and the customer’s bank to confirm the closure. The token.cancelled webhook is triggered only after NPCI has fully processed and confirmed the cancellation.UPI
Token Paused
Indicates the token has been paused by the customer from their UPI app. No subsequent debits can be executed while the token is in thepaused state.
Handy TipsThe
token.paused event is available only for tokens authorised via UPI. Tokens authorised via Emandate, Card or Paper NACH do not support the paused state.UPI
Check Payment Status using Webhooks
You can use these webhooks to check the status of the authorisation payment and subsequent payments.Payment Authorised
Indicates that the payment has been authorised. A payment is authorised when the customer’s payment details are successfully authenticated by the bank. Use this webhook to fetch thetoken_id from the payment entity and store it for subsequent debits.
UPI
Payment Captured
Indicates that the payment has been captured.UPI
Order Paid
Indicates that the customer has successfully made the payment.Handy TipsFor UPI, the
invoice_id parameter value is null when using the API-based setup. The invoice_id is populated only when a Registration Link is used.UPI
Payment Failed
Indicates that the payment has failed. If the authorisation payment fails, you need to initiate the mandate registration again. For subsequent payments, you can retry the debit after checking the failure reason.UPI
Check Registration Link Status using Webhooks
You can use these webhooks to check the status of the registration link. These are relevant only if you are using the Registration Link flow to initiate mandate registration.Invoice Paid
Indicates that a registration link has been successfully paid.UPI
Check Notification Status using Webhooks
You can use these webhooks to check the status of the pre-debit notification sent to the customer. These notification webhooks are available only if you send the notification object while creating an order for a subsequent payment.Notification Delivered
Indicates that a pre-debit notification is successfully delivered.UPI
Notification Failed
Indicates that a pre-debit notification has failed to deliver. You should re-trigger the pre-debit notification before making a debit attempt in these cases.UPI