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?
How do I load the checkout page after creating an order?
How do I load the checkout page after creating an order?
payment_session_id, use the Order Pay API to load the checkout page. You can also use Cashfree Dev Studio for testing and implementation.Why is my callback URL receiving an empty response from Cashfree?
Why is my callback URL receiving an empty response from Cashfree?
return_url is expected. The return_url is a browser redirect (GET request) and does not carry a JSON response body. To receive programmatic payment status updates, configure a separate webhook endpoint (notify_url), which receives server-to-server POST notifications. You can also fetch the final status using the Get Order API once the customer returns to your site.Why does a broken link or stuck timer appear in my mobile app after a payment?
Why does a broken link or stuck timer appear in my mobile app after a payment?
dismissWeb or dismissLoader. Your app must intercept these signals (or detect the final status via polling or webhooks) and immediately close the WebView. If the WebView remains open, it may attempt to load the return_url as a page, which can appear broken or keep a timer visible in the background.What is the character limit for return_url and notify_url?
What is the character limit for return_url and notify_url?
return_url and notify_url must be within a maximum of 250 characters. Using long wrapped URLs or security proxies that exceed this limit can cause integration issues.Why am I receiving an 'order_not_found' error during the Create Order API call even though the order is created?
Why am I receiving an 'order_not_found' error during the Create Order API call even though the order is created?
order_not_found error during the Create Order API call can occur due to a brief propagation or replication delay between systems. In this scenario, the order is successfully created in the backend but the API response fails to find it immediately. To verify whether the order exists, call the Get Order API (GET /pg/orders/{order_id}) shortly after receiving the error. If the order is returned as ACTIVE, the order record exists and is awaiting payment. No customer charges have occurred at this stage.Why am I getting an 'order_id_not_found' or 'internal_error' when calling the Create Terminal Transaction API?
Why am I getting an 'order_id_not_found' or 'internal_error' when calling the Create Terminal Transaction API?
terminal_id passed in the Create Order request exactly matches the cf_terminal_id or terminal_id used in the POST /pg/terminal/transactions call for that specific order.How do I enable UPI Intent for a mobile web-based integration?
How do I enable UPI Intent for a mobile web-based integration?
payment_session_id, and the frontend loads the Cashfree Checkout JS SDK. UPI Intent options (GPay, PhonePe, and others) appear automatically when the checkout page is accessed via a mobile browser.For more details, refer to the web integration documentation.Why am I getting a 'channel_invalid' error when calling the Sessions API for a wallet payment?
Why am I getting a 'channel_invalid' error when calling the Sessions API for a wallet payment?
channel_invalid error in the Sessions API occurs when the value provided in the channel field of the payment_method object is not accepted for that specific payment method. For certain wallet or PPI (Prepaid Payment Instrument) transactions, link is the only allowed value for the channel.Can I test real-time NPCI or bank transfers in the Cashfree Sandbox environment?
Can I test real-time NPCI or bank transfers in the Cashfree Sandbox environment?
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.