Authentication failed
Authentication failed
- Test credentials are used in the production environment or vice versa.
- Client ID and Client Secret are passed in the request body instead of as headers.
- API keys from different environments are mixed (for example, a Sandbox App ID used with a Production Secret Key).
- Incorrect API keys are used, such as keys copied incorrectly or taken from a different account.
- Ensure you are using the correct API keys displayed in the Merchant Dashboard.
- Use test credentials in the test environment and production credentials in the live environment. For example, use the Client ID and Client Secret generated for the Test/Sandbox environment when making requests to
https://sandbox.cashfree.com. - When calling the production API, use the Production API Key and Secret Key with the Production endpoint (for example,
https://api.cashfree.com/pg/orders/{order_id}). Do not mix Sandbox credentials with the Production endpoint, or vice versa. - Pass the Client ID and Client Secret as headers, not in the request body.
- Ensure both keys are from the same environment.
S2S_enabled_not_approved or POST/orders/pay is not enabled or approved
S2S_enabled_not_approved or POST/orders/pay is not enabled or approved
- The prerequisite for S2S is that it requires PCI DSS compliance.
- To enable it, contact your Account Manager or fill in the Support Form. Once your account is reviewed and approved, this feature will be enabled.
Payment mode not enabled for merchant
Payment mode not enabled for merchant
- Log in to the Merchant Dashboard and go to Settings > Payment Methods to enable the mode.
- Alternatively, contact your Account Manager or fill in the Support Form.
Unable to delink existing AmazonPay wallet and add a new one
Unable to delink existing AmazonPay wallet and add a new one
- The user needs to log out of the Amazon account from that system, clear the browser cache and try once again.
Null objects in Get Order / Payment API response
Null objects in Get Order / Payment API response
- When no payment is associated with the order yet. ie a payment has not yet been attempted against the Order.
- If there’s a delay in the payment being recorded due to bank or network delays.
- You are hitting the Get payments for an order API before your end customer has tried to pay.
- Please Configure webhooks to receive real-time payment updates.
- Use the Get Payments for Order API, as the Get Order Status API will only return the order’s current state and not the payment specifics.
Why does the Get Payments for an Order API return an empty array?
Why does the Get Payments for an Order API return an empty array?
GET /pg/orders/{order_id}/payments) returns an empty array ([]) when no payment attempt exists for the order. This happens if the customer opens checkout and then exits, closes the page, or goes back without selecting a payment method such as UPI, card, or netbanking. Cashfree creates a payment object only after the customer selects a method and starts an attempt.Handle the response as follows:- Empty array (
[]): no payment attempt. Do not treat this asUSER_DROPPED.USER_DROPPEDappears on a payment object after the customer selected a method and then left the flow. - One or more payment objects: use
payment_statuson each object. Possible values areSUCCESS,FAILED,PENDING,NOT_ATTEMPTED,USER_DROPPED,VOID, andCANCELLED.
Which headers does the Get Payments for an Order API require?
Which headers does the Get Payments for an Order API require?
x-api-version: the API version you integrate with. Latest is2026-01-01.x-client-id: your App ID.x-client-secret: your Secret Key.
x-partner-apikey and x-partner-merchantid instead of x-client-id and x-client-secret. See API authentication.How do I avoid storing payment instrument details during checkout?
How do I avoid storing payment instrument details during checkout?
9999999999 in the customer_phone field of your Create Order API request to avoid storing payment instrument details such as cards or UPI handles. Cashfree does not store instrument details against this dummy number.Order Amount Invalid
Order Amount Invalid
- More than two decimal places have been provided for the ‘order_amount’ field. For example,
10.123or11089.360are invalid;11089.36is valid. - Order Amount is 0 or negative.
- You have exceeded the maximum amount limit set for your MID.
- Configure
order_amountwith a maximum of two decimal places. - A minimum amount of one rupee is required.
- Kindly get the maximum amount limit raised for your Merchant ID. Please contact your Account Manager or fill in the Support Form
UPI Intent not visible on checkout
UPI Intent not visible on checkout
How does Cashfree handle invalid card details on the checkout page?
How does Cashfree handle invalid card details on the checkout page?
Is customer_phone required during order creation?
Is customer_phone required during order creation?
customer_phone is a required field during order creation. You cannot omit the phone number or pass an empty value. The standard checkout pre-fills the value you provide and allows the customer to edit it before completing the payment.The phone number does not directly affect the availability of UPI Intent or UPI QR. It is used for checkout personalisation and eligibility, including recommended payment methods, offers, Pay Later eligibility, card saving, and card linking.Is customer_email required when creating an order?
Is customer_email required when creating an order?
customer_details object, customer_id and customer_phone are required, and customer_email is optional. If you omit customer_email, the order request does not fail validation.What causes the customer_phone_invalid error during order creation?
What causes the customer_phone_invalid error during order creation?
customer_phone field in the customer_details object is missing or invalid. Pass the phone number in one of the following formats:- Indian mobile number: a 10-digit number (for example,
9090407368) or the number with the+91country code (for example,+919090407368). - International number: the number prefixed with
+and the country code (for example,+16014635923).
Why does my API response show a failed payment status while the Merchant Dashboard shows the order as successful?
Why does my API response show a failed payment status while the Merchant Dashboard shows the order as successful?
How do I retrieve the cf_payment_id for an order?
How do I retrieve the cf_payment_id for an order?
cf_payment_id values, use the Get Payments for an Order API. Pass the order ID as a path parameter. The response returns a list of all payment attempts made for that order, each containing its cf_payment_id.Why does the Get Payment by ID API return NOT_ATTEMPTED even though the webhook reports SUCCESS?
Why does the Get Payment by ID API return NOT_ATTEMPTED even though the webhook reports SUCCESS?
NOT_ATTEMPTED while the webhook confirms SUCCESS, verify that you are passing the correct cf_payment_id in the API request path. Ensure you are not passing a phone number or any other session-derived value in the URL path where the API expects the cf_payment_id (for example, /pg/orders/{order_id}/payments/{cf_payment_id}). Always extract the cf_payment_id directly from the Cashfree webhook payload or the initial payment response.Which API should I use to check the status of a payment for a specific order?
Which API should I use to check the status of a payment for a specific order?
https://api.cashfree.com/pg/orders/{order_id}/payments/{cf_payment_id}. This API returns the details of the payment ID passed, including the payment_status field.How can I see sample API responses for different payment modes?
How can I see sample API responses for different payment modes?
Why does my Cashfree checkout UI look outdated or different from the modern version?
Why does my Cashfree checkout UI look outdated or different from the modern version?
Why are previously used UPI IDs or saved cards appearing for different users on the checkout page?
Why are previously used UPI IDs or saved cards appearing for different users on the checkout page?
customer_phone for each user in the Create Order API request.Can I disable saved payment instruments for my Cashfree account?
Can I disable saved payment instruments for my Cashfree account?
Is it normal for a payment_session_id to contain the suffix 'paymentpayment'?
Is it normal for a payment_session_id to contain the suffix 'paymentpayment'?
payment_session_id that contains the suffix paymentpayment is expected behaviour, not a malformed value. The session ID still functions correctly for opening the checkout.