Skip to main content
POST
S2S enablement required: To call the Seamless Payment Creation API, make sure the required S2S flag is enabled for your account. To enable it, submit a request through the Support Form.
  • S2S card flag: To enable card payments, share your PCI DSS compliance certificate through the Support Form.
  • Main S2S flag for other payment modes: To enable seamless payments for modes other than cards, submit a GST return showing an annual turnover of more than Rs. 1 crore. After the document is verified, Cashfree enables the seamless flow.

Client environment headers

Cashfree requires information about the customer’s device environment to enforce NPCI rules. You must include the following headers in your Order Pay API and Get Eligible Payment Methods request:
x-client-rendering-type is required only when x-client-device is set to mobile. For desktop and tablet devices, this header is optional.

Error codes

The following table lists the error codes, descriptions, and types you may encounter when initiating a payment:

Headers

x-api-version
string
default:2026-01-01
required

API version to be used.

x-request-id
string

Request ID for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to Cashfree.

x-idempotency-key
string<UUID>

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.

x-client-device
string

The type of device on which the payment is initiated.

x-client-os
string

The operating system of the client device used to make the payment.

x-client-rendering-type
string

Indicates how the payment experience is rendered to the user. - mweb – Payment rendered in a mobile browser (browser on a mobile device) - webview – Payment rendered inside an in-app browser (WebView within a merchant app) - native – Payment rendered natively within the merchant’s mobile app using SDKs.

x-client-browser
string

The browser used to initiate the payment.

Body

application/json

Request body to create a transaction at Cashfree using payment_session_id.

payment_session_id
string
required

Unique identifier for the payment session, returned in the response of the Create Order API.

Example:

"session__CvcEmNKDkmERQrxnx39ibhJ3Ii034pjc8ZVxf3qcgEXCWlgDDlHRgz2XYZCqpajDQSXMMtCusPgOIxYP2LZx0-05p39gC2Vgmq1RAj--gcn"

payment_method
CardPaymentMethod · object
required

Payload for different payment methods is given below.

save_instrument
boolean

Send as true if the customer has given consent to save or tokenise the card; otherwise, send as false.

offer_id
string

This is required if any offers needs to be applied to the order.

Example:

"faa6cc05-d1e2-401c-b0cf-0c9db3ff0f0b"

transaction_expiry_time
string<ISO8601>

The maximum time for the payment attempt to reach a terminal state. If this timestamp expires, the transaction is marked as failed and cannot be retried. Provide the value in ISO 8601 timestamp format. Timestamps are stored in IST. IST appears as 2021-07-02T10:20:12+05:30, UTC appears as 2021-07-02T10:20:12Z.

Example:

"2021-07-02T10:20:12+05:30"

Response

Success response for order pay.

Order pay response once you create a transaction for that order.

payment_amount
number

Total amount payable.

cf_payment_id
string<int64>

Payment identifier created by Cashfree.

payment_method
enum<string>

The payment method used for this transaction.

  • netbanking: Net banking payment.
  • card: Credit or debit card payment.
  • upi: UPI payment via collect, intent, or QR code.
  • app: Wallet-based payment.
  • cardless_emi: Cardless EMI payment.
  • paylater: Pay later payment.
  • banktransfer: Direct bank transfer payment.
  • applepay: Apple Pay payment.
Available options:
netbanking,
card,
upi,
app,
cardless_emi,
paylater,
banktransfer,
applepay
channel
enum<string>

The channel used for the payment method.

  • link: Redirect-based flow where the customer is taken to an external page.
  • post: Native OTP flow where the merchant renders a custom UI to collect OTP.
  • collect: UPI collect request sent to the customer's VPA.
  • qrcode: UPI QR code for the customer to scan.
  • podQrCode: Pay on delivery QR code.
Available options:
link,
post,
collect,
qrcode,
podQrCode
action
enum<string>

The action to complete the payment.

  • link: Redirect the customer to data.url using a browser or in-app webview.
  • post: Render a native UI, collect required input, and POST it to data.url.
  • form: Render the form from data.payload and auto-submit it to data.url.
  • custom: Follow integration-specific instructions or SDK handling.
Available options:
link,
post,
custom,
form
data
OrderPayData · object

The data object of Order Pay API.