Add a webhook
Follow the instructions below to configure webhooks for version 2 APIs:- Log in to the Merchant Dashboard.
- Select Payouts.
- Navigate to Developers > Webhooks.
- Click Add Webhook URL on the Webhooks page.

- In the Add Webhook popup, enter the following information:
- Webhook URL: Enter the URL where you want to receive transfer-related notifications.
- Select a webhook version: Select V2 from the dropdown menu.
Webhook Version: V2: You will receive V2 webhooks only if you select the option as described and configure the respective URL.
- Click Test & Add Webhook.
Webhook signature verification code
These code snippets provide functionality to verify the authenticity of webhook requests and parse the payload data. They ensure that incoming webhook requests are from a trusted source by checking their signature and then processing the request data.Client secret for webhooksignature
Please ensure that the oldest active client secret is used to generate the webhook signature. Using any other client secret will lead to a signature mismatch.
Please ensure that the oldest active client secret is used to generate the webhook signature. Using any other client secret will lead to a signature mismatch.
Components
The webhook signature verification implementation uses the following key components to ensure secure processing of webhook events:PayoutWebhookEvent class
This class represents the structure of a webhook event and contains the following properties:Property | Type | Description |
---|---|---|
Type | string | The type of the event. |
Raw | string | The raw JSON body of the webhook request. |
Object | object | The parsed JSON object from the raw body. |
PayoutVerifyWebhookSignature method
This method verifies the signature of a webhook request and parses the data. Use the following parameters when calling this method:Parameter | Type | Description |
---|---|---|
signature | string | The HMAC signature provided in the header information of the webhook. |
rawBody | string | The raw JSON body of the request in string format. |
timestamp | string | The timestamp provided in the header information of the webhook. |
Cashfree class
This class provides the method for verifying webhook signatures and includes the following properties:Property | Type | Description |
---|---|---|
XClientSecret | string | Secret key. |
XAPIVersion | string | The API version: 2024-01-01. |
Webhook events
Payouts webhooks enable you to receive updates about all event-driven activities originating from your account. Below is the list of payout webhooks:Events | Notifications |
---|---|
TRANSFER_ACKNOWLEDGED | You receive this event when the transfer is successful, the amount is debited from the account, and the funds are credited to the end user. |
TRANSFER_SUCCESS | You receive this event when the transferred amount is deposited in the beneficiary’s bank account. |
TRANSFER_FAILED | You receive this event when the transfer attempt fails. |
TRANSFER_REVERSED | You receive this event when the beneficiary’s bank reverses the transfer request. |
TRANSFER_REJECTED | You receive this event when Cashfree Payments rejects the transfer request. |
BULK_TRANSFER_REJECTED | You receive this event when one or more transfers in the batch transfer request are rejected. |
BENEFICIARY_INCIDENT | You receive this event when there is a service disruption or incident affecting a specific beneficiary bank or payment mode. |
CREDIT_CONFIRMATION | You receive this event when funds are credited to your account balance, providing confirmation of the credit transaction. |
LOW_BALANCE_ALERT | You receive this event when your account balance falls below a predefined threshold, alerting you to add funds. |
Sample payload
The following examples show the JSON payload structure for each webhook event type listed above. Each payload contains event-specific data that helps you understand the transfer status and take appropriate action in your application.Parameters
Find the parameters and their descriptions for the eventsTRANSFER_ACKNOWLEDGED
, TRANSFER_SUCCESS
, TRANSFER_FAILED
, TRANSFER_REVERSED
, and TRANSFER_REJECTED
below:
Parameter | Description |
---|---|
transfer_id | The unique ID you created to identify the transfer request. |
cf_transfer_id | The unique ID created by Cashfree Payments for reference purposes. |
status | The status of the transfer. |
status_code | The specific status of the transfer. |
status_description | The detailed explanation of the transfer status. |
beneficiary_details | Information about the beneficiary. |
beneficiary_id | The unique ID to identify the beneficiary. |
beneficiary_instrument_details | The account information of the beneficiary. |
bank_account_number | The bank account number of the beneficiary. |
bank_ifsc | The IFSC information of the bank. |
transfer_amount | The transfer amount. |
transfer_service_charge | The service charge applied for the transfer amount. |
transfer_service_tax | The taxable amount for the service charge. |
transfer_mode | The transfer mode. |
transfer_utr | The unique transaction reference number. |
fundsource_id | The unique ID to identify the fund source. |
added_on | The date and time of the addition. |
updated_on | The date and time of the update. |
event_time | The date and time of the webhook event initiation. |
type | The event type. |
BULK_TRANSFER_REJECTED
below:
Parameter | Description |
---|---|
batch_transfer_id | The unique ID you created to identify the batch transfer request. |
cf_batch_transfer_id | The unique ID created by Cashfree Payments for reference purposes. |
status | The status of the batch transfer request. |
event_time | The date and time of the webhook event initiation. |
type | The event type. |
A transfer is considered successful only when both the status is
SUCCESS
and the status code is COMPLETED
.Webhook retries
Cashfree Payments webhooks service does its best to deliver events to your webhook endpoint. It’s best practice for your application to respond to the callback. Our webhook service may send many payloads to a single endpoint in quick succession. You will need to build an application and configure your server to receive the response we send when events get triggered during the payout process. Your server should return a 200 HTTP status code to acknowledge that you received the webhook without any issues. Any other information you return in the request headers or request body is ignored. Any response code outside the 200 range, including 3xx codes, indicates that you didn’t receive the webhook. When Cashfree Payments doesn’t receive the acknowledgement for any reason, we retry to establish communication at regular intervals. If we don’t receive the response after several attempts, we gradually decrease the rate of retries. Based on this count, the service is disabled if it fails more than five times. If you don’t receive notifications from Cashfree Payments as expected, please fill out the Support Form.IPs to whitelist
When you decide to consume the webhooks, first, you need to verify whether your systems need IP whitelisting to be done at your end or not. Accordingly, you can whitelist the below IPs of Cashfree:UAT |
---|
52.66.25.127 |
15.206.45.168 |
Prod |
---|
52.66.101.190 |
3.109.102.144 |
3.111.60.173 |
18.60.134.245 |
18.60.183.142 |
Port |
---|
443 (secured) |
FAQs
Can I subscribe to webhooks V2 if I use Payouts APIs as V1 and V1.2?
Can I subscribe to webhooks V2 if I use Payouts APIs as V1 and V1.2?
Yes, you can subscribe to Webhooks V2 even if you’re currently using Payout APIs v1 and v1.2.
Can I utilise webhooks V1 whilst using Payouts APIs V2?
Can I utilise webhooks V1 whilst using Payouts APIs V2?
Yes, you can typically subscribe to Webhooks V1 even if you’re using Payout APIs V2.