curl --request POST \
--url https://sandbox.cashfree.com/pg/orders/{order_id}/authorization \
--header 'Content-Type: application/json' \
--header 'x-api-version: <x-api-version>' \
--header 'x-client-id: <api-key>' \
--header 'x-client-secret: <api-key>' \
--data '
{
"action": "CAPTURE",
"amount": 100
}
'{
"auth_id": 16381,
"authorization": {
"action": "CAPTURE",
"status": "SUCCESS",
"captured_amount": 1,
"start_time": "2025-07-15T16:40:24+05:30",
"end_time": "2025-07-18T16:40:24+05:30",
"approve_by": null,
"action_reference": "7525782703466058805917",
"action_time": "2025-07-15T16:47:50.285775"
},
"bank_reference": "519611740779",
"cf_payment_id": "4129256397",
"entity": "payment",
"error_details": null,
"international_payment": {
"international": false
},
"is_captured": true,
"order_amount": 1,
"order_currency": "INR",
"order_id": "abhishek-287",
"payment_amount": 1,
"payment_completion_time": "2025-07-15T16:40:51+05:30",
"payment_currency": "INR",
"payment_gateway_details": {
"gateway_name": "CASHFREE",
"gateway_order_id": null,
"gateway_payment_id": null,
"gateway_order_reference_id": null,
"gateway_status_code": null,
"gateway_settlement": "cashfree",
"gateway_reference_name": null
},
"payment_group": "debit_card",
"payment_message": "PRE_AUTH|Transaction Success",
"payment_method": {
"card": {
"card_bank_name": "KOTAK MAHINDRA BANK",
"card_country": "IN",
"card_network": "visa",
"card_network_reference_id": null,
"card_number": "XXXXXXXXXXXX4738",
"card_sub_type": "R",
"card_type": "debit_card",
"channel": "link"
}
},
"payment_offers": null,
"payment_status": "SUCCESS",
"payment_surcharge": null,
"payment_time": "2025-07-15T16:40:24+05:30"
}Preauthorisation
Use this API to capture or void a pre-authorised payment.
curl --request POST \
--url https://sandbox.cashfree.com/pg/orders/{order_id}/authorization \
--header 'Content-Type: application/json' \
--header 'x-api-version: <x-api-version>' \
--header 'x-client-id: <api-key>' \
--header 'x-client-secret: <api-key>' \
--data '
{
"action": "CAPTURE",
"amount": 100
}
'{
"auth_id": 16381,
"authorization": {
"action": "CAPTURE",
"status": "SUCCESS",
"captured_amount": 1,
"start_time": "2025-07-15T16:40:24+05:30",
"end_time": "2025-07-18T16:40:24+05:30",
"approve_by": null,
"action_reference": "7525782703466058805917",
"action_time": "2025-07-15T16:47:50.285775"
},
"bank_reference": "519611740779",
"cf_payment_id": "4129256397",
"entity": "payment",
"error_details": null,
"international_payment": {
"international": false
},
"is_captured": true,
"order_amount": 1,
"order_currency": "INR",
"order_id": "abhishek-287",
"payment_amount": 1,
"payment_completion_time": "2025-07-15T16:40:51+05:30",
"payment_currency": "INR",
"payment_gateway_details": {
"gateway_name": "CASHFREE",
"gateway_order_id": null,
"gateway_payment_id": null,
"gateway_order_reference_id": null,
"gateway_status_code": null,
"gateway_settlement": "cashfree",
"gateway_reference_name": null
},
"payment_group": "debit_card",
"payment_message": "PRE_AUTH|Transaction Success",
"payment_method": {
"card": {
"card_bank_name": "KOTAK MAHINDRA BANK",
"card_country": "IN",
"card_network": "visa",
"card_network_reference_id": null,
"card_number": "XXXXXXXXXXXX4738",
"card_sub_type": "R",
"card_type": "debit_card",
"channel": "link"
}
},
"payment_offers": null,
"payment_status": "SUCCESS",
"payment_surcharge": null,
"payment_time": "2025-07-15T16:40:24+05:30"
}Authorizations
Client app ID. You can find your app id in the Merchant Dashboard.
Client secret key. You can find your secret key in the Merchant Dashboard.
Headers
API version to be used.
Request ID for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to Cashfree.
An idempotency key is a unique identifier you include with your API call. If the request fails or times out, you can safely retry it using the same key to avoid duplicate actions.
Path Parameters
The ID which uniquely identifies your order.
Body
Response
Success response for preauthorisation.
Payment entity full object.
The error details are present only for failed payments.
Show child attributes
Show child attributes
{
"error_code": "TRANSACTION_DECLINED",
"error_description": "issuer bank or payment service provider declined the transaction",
"error_reason": "auth_declined",
"error_source": "customer",
"error_code_raw": "ZM",
"error_description_raw": "INVALID / INCORRECT MPIN",
"error_subcode_raw": ""
}
Order amount can be different from payment amount if you collect service fee from the customer.
Type of payment group. One of ['prepaid_card', 'upi_ppi_offline', 'cash', 'upi_credit_card', 'paypal', 'net_banking', 'cardless_emi', 'credit_card', 'bank_transfer', 'pay_later', 'debit_card_emi', 'debit_card', 'wallet', 'upi_ppi', 'upi', 'credit_card_emi'].
This is the time when the payment was initiated.
This is the time when the payment reaches its terminal state.
The transaction status can be one of ["SUCCESS", "NOT_ATTEMPTED", "FAILED", "USER_DROPPED", "VOID", "CANCELLED", "PENDING"].
SUCCESS, NOT_ATTEMPTED, FAILED, USER_DROPPED, VOID, CANCELLED, PENDING Issuing bankās transaction reference number.
Authorisation ID provided by the issuing bank.
If preauth enabled for account you will get this body.
Show child attributes
Show child attributes
{
"action": "CAPTURE",
"status": "PENDING",
"captured_amount": 100,
"start_time": "2022-02-09T18:04:34+05:30",
"end_time": "2022-02-19T18:04:34+05:30",
"approve_by": "2022-02-09T18:04:34+05:30",
"action_reference": "6595231908096894505959",
"action_time": "2022-08-03T16:09:51"
}
The following code samples show the payment method object payload for different payment methods.
- Card
- Net banking
- UPI
- App
- Cardless EMI
- Pay later
- Card EMI
- Bank transfer
Show child attributes
Show child attributes
International payment details.
Show child attributes
Show child attributes
payment gateway details present in the webhook response.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?