Key benefits
- One-time authorisation: Customer provides approval once for multiple future debits
- Flexible charging: Debit multiple amounts until the blocked limit is reached or the mandate expires
- Fund management: Release unused blocked funds back to customers when needed
Workflow overview
The UPI Reserve Pay SBMD workflow involves the following steps:-
Create subscription for mandate setup
- You initialise the subscription with customer and plan details
- Subscription is created in
INITIALISEDstate
-
Raise authorisation to get customer approval
- You raise the authorisation request for blocking the amount
- Customer approves the blocked amount via UPI
- On success, subscription moves to
ACTIVEstate - Cashfree sends
SUBSCRIPTION_AUTH_STATUSwebhook
-
Raise charge to debit funds
- You raise charges against the blocked amount (partial or multiple)
- Payment is processed and status is sent via webhook:
SUBSCRIPTION_PAYMENT_SUCCESSSUBSCRIPTION_PAYMENT_FAILED
-
Get mandate details
- You fetch all charges and remaining limit using subscription ID
-
Refund individual charge
- You can refund an individual charge
- Notification of refund status is sent via
SUBSCRIPTION_REFUND_STATUSwebhook
-
Manage mandate
- You can unblock unused debits and release funds back to the customer
Implementation steps
UPI Reserve Pay extends the Subscription APIs with SBMD-specific parameters for fund blocking. Follow these steps to implement the feature:All API examples belong to version 2025-01-01.
Quick reference
Step 1: Create subscription
Create a subscription to set up the mandate for blocking funds. UPI Reserve Pay requires setting the subscription category toSBMD.
API Endpoint: POST https://api.cashfree.com/pg/subscriptions
Sandbox URL: https://sandbox.cashfree.com/pg/subscriptions
View complete SBMD request example
View complete SBMD request example
Request
INITIALISED state, ready for customer authorisation.
Step 2: Raise authorisation
Raise an authorisation request for customers to approve the fund blocking. The key requirement for SBMD is settingpayment_type to AUTH.
API Endpoint: POST https://api.cashfree.com/pg/subscriptions/pay
Sandbox URL: https://sandbox.cashfree.com/pg/subscriptions/pay
View UPI channel options
View UPI channel options
Available UPI channels:
link: Payment link that redirects to UPI appsqrcode: QR code for scanning with UPI appscollect: Direct UPI collect request (requiresupi_id)
SUBSCRIPTION_AUTH_STATUS webhook notification.
SUBSCRIPTION_AUTH_STATUS webhook
Step 3: Raise charges
After successful authorisation, you can debit amounts from the blocked funds. Setpayment_type to CHARGE for debit requests.
API Endpoint: POST https://api.cashfree.com/pg/subscriptions/pay
Sandbox URL: https://sandbox.cashfree.com/pg/subscriptions/pay
You’ll receive webhook notifications for each charge attempt:
SUBSCRIPTION_PAYMENT_SUCCESS webhook
Charge success notification
Charge success notification
Webhook Example
SUBSCRIPTION_PAYMENT_FAILED webhook
Charge failure notification
Charge failure notification
Webhook Example
Step 4: Get mandate details
Retrieve information about all payments made against a subscription and the remaining blocked amount. API Endpoint:GET https://api.cashfree.com/pg/subscriptions/{subscription_id}/payments
Sandbox URL: https://sandbox.cashfree.com/pg/subscriptions/{subscription_id}/payments
SBMD subscriptions use the same API as regular subscriptions. For complete response structure and parameters, see Fetch Payments API.To get individual payment details, use Fetch Payment API.
Step 5: Refund individual charges
Refund specific charges using the subscription refund APIs. SBMD refunds work the same as regular subscription refunds. Create Refund:POST https://api.cashfree.com/pg/subscriptions/{subscription_id}/refunds
Sandbox URL: https://sandbox.cashfree.com/pg/subscriptions/{subscription_id}/refunds
Get Refund Status: GET https://api.cashfree.com/pg/subscriptions/{subscription_id}/refunds/{refund_id}
Sandbox URL: https://sandbox.cashfree.com/pg/subscriptions/{subscription_id}/refunds/{refund_id}
For complete API documentation and examples, see:
Step 6: Manage mandate
Release unused blocked funds back to the customer using the manage subscription API. API Endpoint:POST https://api.cashfree.com/pg/subscriptions/{subscription_id}/manage
Sandbox URL: https://sandbox.cashfree.com/pg/subscriptions/{subscription_id}/manage
Subscription webhooks
Cashfree sends webhook notifications for various subscription events during the SBMD lifecycle.SUBSCRIPTION_STATUS_CHANGED
This webhook is sent when a subscription’s status changes during the lifecycle.Subscription status change notification
Subscription status change notification
Webhook Example