Webhooks let you build or set up integrations that subscribe to certain events on RazorpayX API. When one of these events is triggered, we send an HTTP POST payload in JSON to the webhook's configured URL.
Listed below are the various webhooks events available in RazorpayX. The payload remains the same irrespective of the fund_account_type to which payout was made. The payload is the same whether the payout was made to a bank account, VPA or card.
The table below lists the webhook events available for RazorpayX Payouts.
Triggered whenever a payout moves to the pending state. The payout remains in this state till you approve or reject it.
Triggered whenever a payout moves to the rejected state. The payout was rejected by someone from your team.
Triggered whenever a payout moves to the queued state. A payout goes to the queued state when you do not have sufficient balance to process the payout. This can happen when you create the payout or when you approve a payout in the pending state.
Triggered when the payout moves to the processing state when the payout is created or from the queued state when sufficient funds are available to process the payout.
Triggered when a payout moves to the processed state. This happens when the payout is processed by the contact's bank.
Triggered whenever there is a change in the payout entity. For example, when we receive the UTR for the payout from the bank. For NEFT transactions, this webhook is fired within 90 seconds. For IMPS and UPI transactions, this webhook is generally fired immediately.
Triggered whenever a payout fails and the amount is returned to your business account.
current account payouts
This webhook event is available only when a payout is made using your current account balance. This event is triggered when a payout is failed by our current account partner bank.
The table below lists the webhook events available for RazorpayX transactions.
Triggered whenever you:
Make a Payout (virtual account or current account).
Add funds to your RazorpayX account (virtual account or current account).
Perform any kind of transaction (ATM transaction, cash withdrawal, netbanking transfer, encashed cheque) on your current account.
The above order may not be followed at all times. You should configure your webhook URL to not expect delivery of these events in this order and handle such scenarios.
The processed and reversed states are the last states for a payout. Their corresponding webhooks payout.processed or payout.reversed indicate this state change. Any webhook received after these should be ignored.
Log in to the RazorpayX Dashboard , and navigate to My Account & Settings → Developer Controls. Click Add Webhooks if you are setting up a webhook for the first time or Edit Webhook to edit a previously saved webhook.
Enter the Webhook URL where you want to receive the webhook payload when an event is triggered.
If you attempt to save a localhost endpoint as part of a webhook setup, you will notice an error. Know more about alternatives to localhost.
Enter a Secret for the webhook endpoint. This is an optional field and is used for validation.
When setting up the Webhooks, you will be asked to specify a secret. Using this secret, you can validate that the webhook is from Razorpay. Entering the secret is optional, but recommended. The secret should never be exposed publicly.
It is not necessary that the webhoook secret should be the merchant secret key provided by Razorpay.
Select the events for which you want to subscribe from the list of Active Events.
Click SAVE to enable the webhook.
To edit webhooks:
After you set the webhooks, you can click Edit to make changes to a webhook.