Skip to main content
POST
/
orders
/
sessions
curl --request POST \
  --url https://sandbox.cashfree.com/pg/orders/sessions \
  --header 'Content-Type: application/json' \
  --header 'x-api-version: <x-api-version>' \
  --data '
{
  "payment_session_id": "session__someidwhichislongandhasnumbers1232132andcharacterscn",
  "payment_method": {
    "upi": {
      "channel": "link"
    }
  }
}
'
{
"action": "link",
"cf_payment_id": "4105073870",
"channel": "link",
"payment_amount": 1.75,
"payment_method": "card",
"data": {
"url": "https://api.cashfree.com/pg/view/gateway/session_FEeYTISZ-xOJcuR7YeOZOm1MhVIrjHa2l1G79Pg_ZktVJxPSdu7oAKf9RTFZQlR19lkBU7VGIh8dARedu9otO8VstZVT3-HpjLpIn75v-hKCNOxYuEOV_wJ975ed89f2-ad57-4094-8728-7cff9f1928f2",
"payload": null,
"content_type": null,
"method": null
}
}
Run in Postman: You can also try this API in our Postman Collection.

Headers

x-api-version
string
default:2025-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.

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"

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.