> ## Documentation Index
> Fetch the complete documentation index at: https://www.cashfree.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Settlement Webhook

> Configure Cashfree Easy Split settlement webhooks so your backend gets real-time events for vendor settlements, balance updates, and split scheme outcomes.

Configure vendor settlement webhooks to receive automated notifications when vendor settlements are initiated, successfully processed, failed, or reversed.

The webhook notifications are sent on all the URLs added and enabled in the settlement webhook. You can add new URLs and enable or disable existing URLs for settlement webhook at any time and it will reflect instantaneously. For security best practices on webhook endpoints, refer to the [Webhook Security Checklist](/payments/online/webhooks/security-checklist).

The table below lists the webhook events available for settlements.

| Webhook event                 | Description                                                          |
| :---------------------------- | :------------------------------------------------------------------- |
| VENDOR\_SETTLEMENT\_INITIATED | Cashfree triggers this webhook when a vendor settlement starts.      |
| VENDOR\_SETTLEMENT\_SUCCESS   | Cashfree triggers this webhook when a vendor settlement succeeds.    |
| VENDOR\_SETTLEMENT\_FAILED    | Cashfree triggers this webhook when a vendor settlement fails.       |
| VENDOR\_SETTLEMENT\_REVERSED  | Cashfree triggers this webhook when a vendor settlement is reversed. |

***

## Vendor settlement initiated

Cashfree Payments triggers the SETTLEMENT\_INITIATED webhook when it initiates a settlement.

```json theme={"dark"}
{
    "data": {
        "settlement": {
            "settlement_id": 49703,
            "status": "CREATED",
            "utr": "1686217237243457",
            "payment_amount": null,
            "settlement_initiated_on": "2023-06-08T15:10:35+05:30",
            "settled_on": "null",
            "reason": null,
            "adjustment": 100.00,
            "settlement_amount": 600.00,
            "service_charge": 0.50,
            "service_tax": 0.09,
            "amount_settled": null,
            "payment_from": "2023-06-08",
            "payment_till": "2023-06-08",
            "vendor_id": "esSettlementsAutomationVendor",
            "vendor_transaction_amount": 500.00,
            "account_mode": "BANK",
            "settled_orders_count": 1
        }
    },
    "event_time": "2023-06-08T15:10:37+05:30",
    "type": "VENDOR_SETTLEMENT_CREATED"
}
```

***

## Vendor settlement success

```json theme={"dark"}
{
    "data": {
        "settlement": {
            "settlement_id": 49703,
            "status": "SUCCESS",
            "utr": "1686217237243457",
            "payment_amount": null,
            "settlement_initiated_on": "2023-06-08T15:10:35+05:30",
            "settled_on": "2023-06-08T15:10:37+05:30",
            "reason": null,
            "adjustment": 100.00,
            "settlement_amount": 600.00,
            "service_charge": 0.50,
            "service_tax": 0.09,
            "amount_settled": 600.00,
            "payment_from": "2023-06-08",
            "payment_till": "2023-06-08",
            "vendor_id": "esSettlementsAutomationVendor",
            "vendor_transaction_amount": 500.00,
            "account_mode": "BANK",
            "settled_orders_count": 1
        }
    },
    "event_time": "2023-06-08T15:10:37+05:30",
    "type": "VENDOR_SETTLEMENT_SUCCESS"
}
```

***

## Vendor settlement failed

```json theme={"dark"}
{
    "data": {
        "settlement": {
            "settlement_id": 49703,
            "status": "FAILED",
            "utr": "1686217237243457",
            "payment_amount": null,
            "settlement_initiated_on": "2023-06-08T15:10:35+05:30",
            "settled_on": "null",
            "reason": null,
            "adjustment": 100.00,
            "settlement_amount": 600.00,
            "service_charge": 0.50,
            "service_tax": 0.09,
            "amount_settled": null,
            "payment_from": "2023-06-08",
            "payment_till": "2023-06-08",
            "vendor_id": "esSettlementsAutomationVendor",
            "vendor_transaction_amount": 500.00,
            "account_mode": "BANK",
            "settled_orders_count": 1
        }
    },
    "event_time": "2023-06-08T15:10:37+05:30",
    "type": "VENDOR_SETTLEMENT_FAILED"
}
```

***

## Vendor settlement reversed

```json theme={"dark"}
{
    "data": {
        "settlement": {
            "settlement_id": 49703,
            "status": "REVERSED",
            "utr": "1686217237243457",
            "payment_amount": null,
            "settlement_initiated_on": "2023-06-08T15:10:35+05:30",
            "settled_on": "null",
            "reason": Failed from bank end,
            "adjustment": 100.00,
            "settlement_amount": 600.00,
            "service_charge": 0.50,
            "service_tax": 0.09,
            "amount_settled": null,
            "payment_from": "2023-06-08",
            "payment_till": "2023-06-08",
            "vendor_id": "esSettlementsAutomationVendor",
            "vendor_transaction_amount": 500.00,
            "account_mode": "BANK",
            "settled_orders_count": 1
        }
    },
    "event_time": "2023-06-08T15:10:37+05:30",
    "type": "VENDOR_SETTLEMENT_REVERSED"
}
```

***

## Payload field description

| Field                       | Description                                                                                                                                                        | Example                                     |
| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------ |
| adjustment                  | The sum of refunds, disputes, and chargeback part of this settlement is displayed here.                                                                            | 0                                           |
| amount\_settled             | The total amount that is settled in this schedule option.                                                                                                          | 50                                          |
| payment\_amount             | Total transaction amount considered for settlement.                                                                                                                | 100                                         |
| payment\_from               | Start date from which the payments are considered for settlement.                                                                                                  | 2022-03-15                                  |
| payment\_till               | End date till which the payments are considered for settlement.                                                                                                    | 2022-03-23                                  |
| reason                      | Reason for failed and reversed settlements. For more information, see [Reasons for failed and reversed settlements](#reasons-for-failed-and-reversed-settlements). | Transfer mode is not valid for beneficiary. |
| service\_charge             | Service charges are applicable for the payments that are included in this settlement.                                                                              | 2                                           |
| service\_tax                | Service tax is applicable for the payments that are included in this settlement.                                                                                   | 0.50                                        |
| settled\_on                 | Date and time at which the settlement was processed.                                                                                                               | 2022-03-17T14:21:18+05:30                   |
| settlement\_amount          | The sum of net settlement amount for the payments part of this settlement.                                                                                         | 13                                          |
| settlement\_id              | Cashfree settlement ID                                                                                                                                             | 1155353                                     |
| settlement\_initiated\_on   | The date on which settlement was initiated.                                                                                                                        | 2022-03-17T14:29:21+05:30                   |
| status                      | Status of the settlement (either INITIATED, SUCCESS, FAILED, or REVERSED)                                                                                          | SUCCESS                                     |
| utr                         | The unique transaction reference number is given by the bank for the settlement.                                                                                   | N076221079016329                            |
| vendor\_id                  | Reference ID as shared by you when onboarding the vendor.                                                                                                          | IS\_1hour\_Upi                              |
| vendor\_transaction\_amount | Transaction amount split of vendor                                                                                                                                 | 50                                          |
| event\_time                 | Time at which settlement webhook was initiated.                                                                                                                    | 2022-03-17T14:29:23+05:30                   |
| type                        | Type of webhook - VENDOR\_SETTLEMENT\_INITIATED, VENDOR\_SETTLEMENT\_SUCCESS, VENDOR\_SETTLEMENT\_FAILED, or VENDOR\_SETTLEMENT\_REVERSED.                         | VENDOR\_SETTLEMENT\_SUCCESS                 |

## Reasons for failed and reversed settlements

| Reason                               | Category | Description                                          |
| :----------------------------------- | :------- | :--------------------------------------------------- |
| BANK\_GATEWAY\_ERROR                 | Bank     | Technical error at the bank                          |
| BENE\_BANK\_DECLINED                 | Bank     | Rejected by Beneficiary bank due to business reasons |
| FAILED                               | Bank     | No explicit failure reason from the bank             |
| INVALID\_IFSC\_FAIL                  | Customer | Invalid ifsc code provided for bank account          |
| INVALID\_ACCOUNT\_FAIL               | Customer | Bank account is invalid                              |
| RETURNED\_FROM\_BENEFICIARY          | Bank     | Immediate reversal from the beneficiary bank         |
| INSUFFICIENT\_BALANCE                | Vendor   | Your balance is exhausted, need to add funds         |
| IMPS\_MODE\_FAIL                     | Bank     | IMPS mode not supported for the beneficiary          |
| RTGS\_MODE\_FAIL                     | Bank     | RTGS mode not supported (only for RTGS)              |
| REINITIALIZE\_TRANSFER\_LATER        | Bank     | Technical error at the bank, retry later             |
| NRE\_ACCOUNT\_FAIL                   | Customer | Customer bank account is an NRE account              |
| ACCOUNT\_BLOCKED                     | Customer | Customer bank account is blocked                     |
| DEST\_LIMIT\_REACHED                 | Bank     | Transfer limit to beneficiary exceeded               |
| INVALID\_MODE\_FAIL                  | Bank     | Transfer mode not valid for beneficiary              |
| NPCI\_UNAVAILABLE                    | Bank     | NPCI is unavailable                                  |
| BENEFICIARY\_BANK\_OFFLINE           | Bank     | Beneficiary bank is offline                          |
| INVALID\_AMOUNT\_FAIL                | Vendor   | Amount is invalid for the given transfer mode        |
| SUSPECTED\_TRANSFER                  | Customer | Suspicious transfer identified                       |
| BENE\_NAME\_DIFFERS                  | Customer | Beneficiary name not matching with bank records      |
| DISABLED\_MODE                       | Vendor   | Transfer mode not enabled for the account            |
| AMAZON\_AMOUNT\_EXCEED               | Vendor   | Amount should be less than 10000 for Amazon Pay mode |
| BENEFICIARY\_BLACKLISTED             | Vendor   | Beneficiary is blacklisted                           |
| PAYOUT\_INACTIVE                     | Vendor   | Payout account is not active                         |
| INVALID\_TRANSFER\_AMOUNT            | Vendor   | Transfer amount is invalid                           |
| BENEFICIARY\_NOT\_EXIST              | Vendor   | Beneficiary does not exist                           |
| BENEFICIARY\_INVALID\_MODE           | Vendor   | Mode Not valid for Beneficiary                       |
| INVALID\_BENE\_ACCOUNT\_OR\_IFSC     | Vendor   | Invalid bank account number or ifsc provided         |
| BENEFICIARY\_NAME\_DIFFERS           | Customer | Beneficiary name not matching with bank records      |
| ANY\_OTHER\_REASON                   | Bank     | No reason provided for the failure/reversal          |
| INVALID\_OR\_NO\_SUCH\_ACCOUNT\_TYPE | Customer | Invalid account                                      |

***

## Signature verification

Use the signature to verify that the request has not been tampered with. To verify the signature, you need your Cashfree PG secret key and the payload.

timestamp is present in the header x-webhook-timestamp\
Actual signature is present in the header x-webhook-signature

```json theme={"dark"}
"headers": {
        "host": "gamma.cashfree.com",
        "x-request-id": "ad4dc1e65f8901302455b247237a667a",
        "x-real-ip": "172.0.57.13",
        "x-forwarded-for": "172.0.57.13",
        "x-forwarded-host": "gamma.cashfree.com",
        "x-forwarded-port": "80",
        "x-forwarded-proto": "http",
        "x-forwarded-scheme": "http",
        "x-scheme": "http",
        "x-original-forwarded-for": "52.66.25.127",
        "content-length": "592",
        "accept": "_/_",
        "content-type": "application/json",
        "user-agent": "ReactorNetty/1.0.30",
        "x-datadog-parent-id": "4281924148563621550",
        "x-datadog-sampling-priority": "1",
        "x-datadog-trace-id": "228569355002181270",
        "x-webhook-signature": "Xm0YzEJCRsh0XvIEK12D4FqpmC60cReKoqPBn424kV0=",
        "x-webhook-timestamp": "1686217237543",
        "x-webhook-version": "2022-09-01"
    }
```

Watch this video to learn more on Vendor Webhooks

<iframe width="700" height="400" src="https://www.youtube.com/embed/_Vde5QDJwg8?start=511&end=557&enablejsapi=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen />
