> ## 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.

# Payment Webhooks

> Subscribe to Cashfree payment webhooks to receive asynchronous events for successful, failed, and user-dropped payment attempts on your orders.

Webhooks are server callbacks to your server from Cashfree. Cashfree sends webhooks for the following events for a `payment`:

* [Payment success webhook](/docs/api-reference/payments/previous/v2023-08-01/payments/webhooks#payment-success-webhook)
* [Payment failed webhook](/docs/api-reference/payments/previous/v2023-08-01/payments/webhooks#payment-failed-webhook)
* [Payment user dropped webhook](/docs/api-reference/payments/previous/v2023-08-01/payments/webhooks#payment-user-dropped-webhook)
* [Payment charges webhook](/docs/api-reference/payments/previous/v2023-08-01/payments/webhooks#payment-charges-webhook)

## Payment success webhook

A payment success webhook is triggered when a payment is successfully completed. You can use this for: Updating order status, triggering fulfilment, send confirmation to customer.

<Note>Some parameters in the API response may return null values depending on the flow type. In the Flowwise flow, all actual parameter values are returned. However, in other flows, some fields in the response may contain null.</Note>

<Tabs>
  <Tab title="Version (2023-08-01)">
    ```javascript Version (2023-08-01) theme={"dark"}
    {
    "data": {
    "order": {
      "order_id": "order_OFR_2",
      "order_amount": 2,
      "order_currency": "INR",
      "order_tags": null
    },
    "payment": {
      "cf_payment_id": "1453002795",
      "payment_status": "SUCCESS",
      "payment_amount": 1,
      "payment_currency": "INR",
      "payment_message": "00::Transaction success",
      "payment_time": "2022-12-15T12:20:29+05:30",
      "bank_reference": "234928698581",
      "auth_id": null,
      "payment_method": {
        "upi": {
          "channel": "collect",
          "upi_id": "suhasg6@ybl"
        }
      },
      "payment_group": "upi"
    },
    "customer_details": {
      "customer_name": null,
      "customer_id": "7112AAA812234",
      "customer_email": "test@gmail.com",
      "customer_phone": "9908734801"
    },
    "payment_gateway_details": {
      "gateway_name": "CASHFREE",
      "gateway_order_id": "1634766330",
      "gateway_payment_id": "1504280029",
      "gateway_order_reference_id": "abc_124",
      "gateway_settlement": "CASHFREE",
      "gateway_status_code": null
    },
    "payment_offers": [
      {
        "offer_id": "0f05e1d0-fbf8-4c9c-a1f0-814c7b2abdba",
        "offer_type": "DISCOUNT",
        "offer_meta": {
          "offer_title": "50% off on UPI",
          "offer_description": "50% off for testing",
          "offer_code": "UPI50",
          "offer_start_time": "2022-11-09T06:23:25.972Z",
          "offer_end_time": "2023-02-27T18:30:00Z"
        },
        "offer_redemption": {
          "redemption_status": "SUCCESS",
          "discount_amount": 1,
          "cashback_amount": 0
        }
      }
    ]
    },
    "event_time": "2023-08-01T11:16:10+05:30",
    "type": "PAYMENT_SUCCESS_WEBHOOK"
    }
    ```
  </Tab>
</Tabs>

## Payment failed webhook

The payment failed webhook notifies you when a payment attempt fails and we receive a failed response from the bank. Use case: Update order status, notify customer, initiate retry flow

<Tabs>
  <Tab title="Version 2023-08-01">
    ```javascript Version 2023-08-01 theme={"dark"}
    {
    "data": {
    "order": {
      "order_id": "CFPay_d8bjgga36hmg_gc2pgapl4t",
      "order_amount": 1924,
      "order_currency": "INR",
      "order_tags": {
        "cf_link_id": "6420634"
      }
    },
    "payment": {
      "cf_payment_id": "5114917126974",
      "payment_status": "FAILED",
      "payment_amount": 1924,
      "payment_currency": "INR",
      "payment_message": "Internal Server Error",
      "payment_time": "2025-04-03T14:57:38+05:30",
      "bank_reference": null,
      "auth_id": null,
      "payment_method": {
        "cardless_emi": {
          "channel": null,
          "provider": "flexmoney",
          "phone": "+919611199227",
          "emi_details": null
        }
      },
      "payment_group": "cardless_emi"
    },
    "customer_details": {
      "customer_name": null,
      "customer_id": null,
      "customer_email": null,
      "customer_phone": "+919611199227"
    },
    "error_details": {
      "error_code": "TRANSACTION_DECLINED",
      "error_description": "payment has been declined",
      "error_reason": "debit_failed",
      "error_source": "bank",
      "error_code_raw": null,
      "error_description_raw": null,
      "error_subcode_raw": null
    },
    "payment_gateway_details": {
      "gateway_name": "CASHFREE",
      "gateway_order_id": "2191827274",
      "gateway_payment_id": "5114917126974",
      "gateway_status_code": null,
      "gateway_order_reference_id": "null",
      "gateway_settlement": null,
      "gateway_reference_name": null
    },
    "payment_offers": null
    },
    "event_time": "2025-04-03T14:57:38+05:30",
    "type": "PAYMENT_FAILED_WEBHOOK"
    }
    ```
  </Tab>
</Tabs>

## Payment user dropped webhook

The User Dropped Webhook notifies you when your customer abandons the payment flow. It will help you understand if customers attempted to pay or not. Some common scenarios where the transaction will be marked as USER\_DROPPED are:

* User was redirected to the bank's OTP page, but never entered the OTP.
* User was redirected to open the UPI app, but never entered the UPI PIN.
* User was shown the 3ds OTP modal, but did not enter the OTP.

<Tabs>
  <Tab title="Version 2023-08-01">
    ```javascript Version 2023-08-01 theme={"dark"}
    {
    "data": {
    "order": {
      "order_id": "order_02",
      "order_amount": 2,
      "order_currency": "INR",
      "order_tags": null
    },
    "payment": {
      "cf_payment_id": "975672265",
      "payment_status": "USER_DROPPED",
      "payment_amount": 2,
      "payment_currency": "INR",
      "payment_message": "User dropped and did not complete the two factor authentication",
      "payment_time": "2022-05-25T14:25:34+05:30",
      "bank_reference": "1803592531",
      "auth_id": "2980",
      "payment_method": {
        "netbanking": {
          "channel": null,
          "netbanking_bank_code": "3044",
          "netbanking_bank_name": "State Bank Of India"
        }
      },
      "payment_group": "net_banking"
    },
    "customer_details": {
      "customer_name": null,
      "customer_id": "7112AAA812234",
      "customer_email": "test@gmail.com",
      "customer_phone": "9611199227"
    }
    },
    "event_time": "2022-05-25T14:35:38+05:30",
    "type": "PAYMENT_USER_DROPPED_WEBHOOK"
    }
    ```
  </Tab>
</Tabs>

## Payment charges webhook

A payment charges webhook is triggered after a successful payment when Cashfree finalises the Transaction Discount Rate (TDR) and related charges for that payment. The event time can be later than the payment time. Use this webhook to reconcile per-payment charges and the net settlement amount.

To receive this event, subscribe to **Success Payment TDR** when you [configure webhooks](/docs/payments/online/webhooks/configure) in the Merchant Dashboard. The webhook `type` in the payload is `PAYMENT_CHARGES_WEBHOOK`.

<Note>
  The `payment_method` object in this webhook can be empty (`{}`). This is expected for the payment charges event.
</Note>

For background on TDR, see [What is TDR?](/docs/help/account/pricing#what-is-tdr).

### `charges_details` fields

| Field | Description | Example |
| - | - | - |
| `service_charge` | Service charge (TDR) applicable for the payment. | `0.12` |
| `service_tax` | Service tax applicable on the service charge. | `0.02` |
| `settlement_amount` | Net amount for the payment after deducting the service charge and service tax. | `5.86` |
| `settlement_currency` | Currency of the settlement amount. | `INR` |
| `service_charge_discount` | Discount applied on the service charge, if any. Returns `null` when no discount applies. | `null` |

<Tabs>
  <Tab title="Version 2023-08-01">
    ```javascript Version 2023-08-01 theme={"dark"}
    {
    "data": {
    "order": {
      "order_id": "14508_73_1783668483731",
      "order_amount": 6.00,
      "order_currency": "INR",
      "order_tags": null
    },
    "payment": {
      "cf_payment_id": 5979305158,
      "payment_status": "SUCCESS",
      "payment_amount": 6.00,
      "payment_currency": "INR",
      "payment_message": "SUCCESS",
      "payment_time": "2026-07-10T12:58:04+05:30",
      "bank_reference": "841754751916",
      "auth_id": null,
      "payment_method": {},
      "payment_group": "sbc_upi"
    },
    "customer_details": {
      "customer_name": null,
      "customer_id": null,
      "customer_email": "rfeef@gmail.com",
      "customer_phone": "9876543211"
    },
    "charges_details": {
      "service_charge": 0.12,
      "service_tax": 0.02,
      "settlement_amount": 5.86,
      "settlement_currency": "INR",
      "service_charge_discount": null
    }
    },
    "event_time": "2026-07-15T08:00:05+05:30",
    "type": "PAYMENT_CHARGES_WEBHOOK"
    }
    ```
  </Tab>
</Tabs>

## Sample payload by payment method

The instrument used for making a payment will vary by the payment methods used by the customer. Details of the payload by payment method are documented for reference.

<Tabs>
  <Tab title="Card">
    ```javascript theme={"dark"}
    {
      ...,
      "payment_method": {  
        "card": {  
          "channel": null,  
          "card_number": "470613XXXXXX2123",  
          "card_network": "visa",  
          "card_type": "credit_card",  
          "card_sub_type": "C",  
          "card_country": "IN",  
          "card_bank_name": "TEST Bank"  ,  
          "card_network_reference_id": "100212023061200000001014824849"  
        }  
      },  
      "payment_group": "credit_card",
      ...
    }

    ```
  </Tab>

  <Tab title="Net Banking">
    ```javascript theme={"dark"}
    {
      ...,
      "payment_method": {  
        "netbanking": {  
          "channel":null,  
          "netbanking_bank_code":"3022",  
          "netbanking_bank_name":"ICICI Bank"  
        }  
      },  
      "payment_group":"net_banking",
      ...
    }

    ```
  </Tab>

  <Tab title="UPI">
    ```javascript theme={"dark"}
    {
      ...,
      "payment_method": {  
        "upi": {
                "channel": "collect",
                "upi_id": "suhasg6@ybl",
            }  
      },
      "payment_group":"upi",
      ...
    }

    ```
  </Tab>

  <Tab title="Wallet">
    ```javascript theme={"dark"}
    {
      ...,
      "payment_method": {  
        "app": {  
          "channel":"AmazonPay",  
          "upi_id":null  
        }  
      },  
      "payment_group":"wallet",
      ...
    }

    ```
  </Tab>

  <Tab title="Credit Card EMI">
    ```javascript theme={"dark"}
    {
      ...,
      "payment_method":{  
        "card":{  
          "channel":null,  
          "card_number":"XXXXXXXXXX8952",  
          "card_network":null,  
          "card_type":"credit_card_emi",  
          "card_country":null,  
          "card_bank_name":"HDFC BANK",  
          "emi_details":{  
            "emi_amount":1167,  
            "emi_tenure":3,  
            "emi_interest":16.00  
          }  
        }  
      },  
      "payment_group":"credit_card_emi",
      ...
    }

    ```
  </Tab>

  <Tab title="Debit Card EMI">
    ```javascript theme={"dark"}
    {
      ...,
      "payment_method":{  
        "card":{  
          "channel":null,  
          "card_number":"XXXXXXXXXX8952",  
          "card_network":null,  
          "card_type":"debit_card_emi",  
          "card_country":null,  
          "card_bank_name":"HDFC BANK",  
          "emi_details":{  
            "emi_amount":1167,  
            "emi_tenure":3,  
            "emi_interest":16.00  
          }  
        }  
      },  
      "payment_group":"debit_card_emi",
      ...
    }

    ```
  </Tab>

  <Tab title="Cardless EMI">
    ```javascript theme={"dark"}
    {
      ...,
      "payment_method":{  
        "cardless_emi":{  
          "channel":null,  
          "provider":"flexmoney",  
          "phone":"9731117102",  
          "emi_details":null  
        }  
      },  
      "payment_group":"cardless_emi",
      ...
    }

    ```
  </Tab>

  <Tab title="Pay Later">
    ```javascript theme={"dark"}
    {
      ...,
      "payment_method":{  
        "pay_later":{  
        "channel":null,  
        "provider":"olapostpaid",  
        "phone":"9731117102"  
        }  
      },  
      "payment_group":"pay_later",
      ...
    }

    ```
  </Tab>
</Tabs>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.