v2023-08-01
- End Points
- Release Notes
- Orders
- Payments
- Payment Links
- Refunds
- Customers
- Easy-Split
- Eligibility
- Offers
- Operations
- Partners
- Token Vault
- softPOS
- Simulation
- Subscription
Other Versions
- v2022-01-01
Upcoming Versions
- v2025-01-01 (beta)
Subscription Webhooks
Learn about the various Subscription webhooks sent by Cashfree
Below are the various events that can be sent to your webhook endpoint.
SUBSCRIPTION_STATUS_CHANGE
SUBSCRIPTION_AUTH_STATUS
SUBSCRIPTION_PAYMENT_NOTIFICATION_INITIATED
SUBSCRIPTION_PAYMENT_SUCCESS
SUBSCRIPTION_PAYMENT_FAILED
SUBSCRIPTION_PAYMENT_CANCELLED
SUBSCRIPTION_REFUND_STATUS
SUBSCRIPTION_STATUS_CHANGE
Whenever a subscription is created it goes to initialised state and customer is expected to authorise it. The list of statuses where this webhook will get triggered are:
- ACTIVE
- ON HOLD
- COMPLETED
- CUSTOMER CANCELLED
- CUSTOMER PAUSED
- EXPIRED
- LINK EXPIRED
{
"data": {
"subscription_details": {
"cf_subscription_id": "123456",
"subscription_id": "Demo_Subscription",
"subscription_status": "ACTIVE",
"subscription_expiry_time": "2024-01-14T23:00:08+05:30",
"subscription_first_charge_time": "2024-01-10T23:00:08+05:30"
},
"customer_details": {
"customer_name": "john",
"customer_email": "john@dummy.com",
"customer_phone": "9908730221"
},
"plan_details": {
"plan_id": "plan12345",
"plan_name": "Plan Name",
"plan_type": "ON_DEMAND",
"plan_max_cycles": 10,
"plan_recurring_amount": 100.00,
"plan_max_amount": 1000.00,
"plan_currency": "INR",
"plan_note": "Note",
"plan_status": "ACTIVE"
},
"authorization_details": {
"authorization_amount": 100,
"authorization_amount_refund": true,
"approve_by_time": "2022-02-09T18:04:34+05:30",
"authorization_reference": "6595231908096894505959",
"authorization_time": "2022-08-03T16:09:51",
"authorization_status": "SUCCESS",
"payment_id": "123",
"payment_method": "DEBIT_CARD",
"instrument_id": "hsdg9"
},
"payment_gateway_details": {
"gateway_name": "CASHFREE",
"gateway_subscription_id": "Demo_Subscription",
"gateway_plan_id": "plan12345",
"gateway_auth_id": "6595231908096894505959"
}
},
"event_time": "2023-01-03T11:16:10+05:30",
"type": "SUBSCRIPTION_STATUS_CHANGE"
}
SUBSCRIPTION_AUTH_STATUS
The event is triggered when the checkout is completed by the customer for success and failed cases.
{
"data": {
"payment_id": "12345",
"cf_payment_id": "67890",
"cf_txn_id": "789012",
"cf_order_id": 98765,
"subscription_id": "sub12345",
"cf_subscription_id": "sub67890",
"payment_type": "DEBIT_CARD",
"authorization_details": {
"authorization_amount": 100,
"authorization_amount_refund": true,
"approve_by_time": "2024-07-20T16:09:50+05:30",
"authorization_reference": "6595231908096894505959",
"authorization_time": "2024-07-20T16:09:51",
"authorization_status": "ACTIVE",
"payment_id": "123",
"payment_method": "DEBIT_CARD",
"instrument_id": "hsdg9"
},
"payment_amount": 200.75,
"payment_schedule_date": "2024-07-20",
"payment_initiated_date": "2024-07-20",
"payment_remarks": "auth payment",
"retry_attempts": 0,
"failureDetails": null,
"payment_status": "SUCCESS",
"payment_gateway_details": {
"gateway_name": "CASHFREE",
"gateway_subscription_id": "Demo_Subscription",
"gateway_payment_id": "payment12345"
}
},
"event_time": "2024-07-20T11:16:10+05:30",
"type": "SUBSCRIPTION_AUTH_STATUS"
}
SUBSCRIPTION_PAYMENT_NOTIFICATION_INITIATED
This webhook is used to inform the merchant that we have sent a notification of payment to the customer.
{
"data": {
"payment_id": "12345",
"cf_payment_id": "67890",
"cf_txn_id": "789012",
"cf_order_id": 98765,
"subscription_id": "sub12345",
"cf_subscription_id": "sub67890",
"payment_type": "DEBIT_CARD",
"authorization_details": {
"authorization_amount": 100,
"authorization_amount_refund": true,
"approve_by_time": "2024-07-20T16:09:50+05:30",
"authorization_reference": "6595231908096894505959",
"authorization_time": "2024-07-20T16:09:51",
"authorization_status": "PENDING",
"payment_id": "123",
"payment_method": "DEBIT_CARD",
"instrument_id": "hsdg9"
},
"payment_amount": 200,
"payment_schedule_date": "2024-07-20",
"payment_initiated_date": "2024-07-20",
"payment_remarks": "payment",
"retry_attempts": 0,
"failureDetails": null,
"payment_status": "INITIALIZED",
"payment_gateway_details": {
"gateway_name": "CASHFREE",
"gateway_subscription_id": "Demo_Subscription",
"gateway_payment_id": "payment12345"
}
},
"event_time": "2024-07-20T11:16:10+05:30",
"type": "SUBSCRIPTION_PAYMENT_NOTIFICATION_INITIATED"
}
SUBSCRIPTION_PAYMENT_SUCCESS
This notification is sent whenever a successful payment is processed for an active subscription.
{
"data": {
"payment_id": "12345",
"cf_payment_id": "67890",
"cf_txn_id": "789012",
"cf_order_id": 98765,
"subscription_id": "sub12345",
"cf_subscription_id": "sub67890",
"payment_type": "DEBIT_CARD",
"authorization_details": {
"authorization_amount": 100,
"authorization_amount_refund": true,
"approve_by_time": "2024-07-20T16:09:50+05:30",
"authorization_reference": "6595231908096894505959",
"authorization_time": "2024-07-20T16:09:51",
"authorization_status": "ACTIVE",
"payment_id": "123",
"payment_method": "DEBIT_CARD",
"instrument_id": "hsdg9"
},
"payment_amount": 200,
"payment_schedule_date": "2024-07-20",
"payment_initiated_date": "2024-07-20",
"payment_remarks": "payment",
"retry_attempts": 0,
"failureDetails": null,
"payment_status": "SUCCESS",
"payment_gateway_details": {
"gateway_name": "CASHFREE",
"gateway_subscription_id": "Demo_Subscription",
"gateway_payment_id": "payment12345"
}
},
"event_time": "2024-07-20T11:16:10+05:30",
"type": "SUBSCRIPTION_PAYMENT_SUCCESS"
}
SUBSCRIPTION_PAYMENT_FAILED
This notification is sent whenever payment processing fails for an active subscription.
{
"data": {
"payment_id": "12345",
"cf_payment_id": "67890",
"cf_txn_id": "789012",
"cf_order_id": 98765,
"subscription_id": "sub12345",
"cf_subscription_id": "sub67890",
"payment_type": "DEBIT_CARD",
"authorization_details": {
"authorization_amount": 100,
"authorization_amount_refund": true,
"approve_by_time": "2024-07-18T16:09:50+05:30",
"authorization_reference": "6595231908096894505959",
"authorization_time": "2024-07-18T16:09:51",
"authorization_status": "ACTIVE",
"payment_id": "123",
"payment_method": "DEBIT_CARD",
"instrument_id": "hsdg9"
},
"payment_amount": 200,
"payment_schedule_date": "2024-07-20",
"payment_initiated_date": "2024-07-20",
"payment_remarks": "payment",
"retry_attempts": 0,
"failureDetails": {
"failureReason": "Insufficient balance"
},
"payment_status": "FAILED",
"payment_gateway_details": {
"gateway_name": "CASHFREE",
"gateway_subscription_id": "Demo_Subscription",
"gateway_payment_id": "payment12345"
}
},
"event_time": "2024-07-20T11:16:10+05:30",
"type": "SUBSCRIPTION_PAYMENT_FAILED"
}
SUBSCRIPTION_PAYMENT_CANCELLED
This notification is sent whenever payment processing is cancelled by user for an active subscription.
{
"data": {
"payment_id": "12345",
"cf_payment_id": "67890",
"cf_txn_id": "789012",
"cf_order_id": 98765,
"subscription_id": "sub12345",
"cf_subscription_id": "sub67890",
"payment_type": "DEBIT_CARD",
"authorization_details": {
"authorization_amount": 100,
"authorization_amount_refund": true,
"approve_by_time": "2024-07-18T16:09:50+05:30",
"authorization_reference": "6595231908096894505959",
"authorization_time": "2024-07-18T16:09:51",
"authorization_status": "ACTIVE",
"payment_id": "123",
"payment_method": "DEBIT_CARD",
"instrument_id": "hsdg9"
},
"payment_amount": 200,
"payment_schedule_date": "2024-07-20",
"payment_initiated_date": "2024-07-20",
"payment_remarks": "payment",
"retry_attempts": 0,
"failureDetails": {
"failureReason": "Subscription is not active"
},
"payment_status": "CANCELLED",
"payment_gateway_details": {
"gateway_name": "CASHFREE",
"gateway_subscription_id": "Demo_Subscription",
"gateway_payment_id": "payment12345"
}
},
"event_time": "2024-07-20T11:16:10+05:30",
"type": "SUBSCRIPTION_PAYMENT_CANCELLED"
}
SUBSCRIPTION_REFUND_STATUS
This event is triggered whenever a refund status of a transaction will be success, failed, or cancelled.
{
"data": {
"payment_id": "pay8643",
"cf_payment_id": "863782648",
"refund_id": "refund2",
"cf_refund_id": "ref_212",
"refund_amount": 100,
"refund_note": "test",
"refund_speed": "INSTANT",
"refund_status": "SUCCESS",
"failure_details": null,
"payment_gateway_details": {
"gateway_name": "CASHFREE",
"gateway_payment_id": "pay8643",
"gateway_refund_id": "refund2"
}
},
"event_time": "2023-01-03T11:16:10+05:30",
"type": "SUBSCRIPTION_REFUND_STATUS"
}
Was this page helpful?