POST
/
orders
curl --request POST \
--url https://sandbox.cashfree.com/pg/orders \
--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 '{
"order_currency": "INR",
"order_amount": 10.34,
"customer_details": {
"customer_id": "7112AAA812234",
"customer_phone": "9898989898"
}
}'
{
  "cf_order_id": "2149460581",
  "created_at": "2023-08-11T18:02:46+05:30",
  "customer_details": {
    "customer_id": "409128494",
    "customer_name": "Johmn Doe",
    "customer_email": "pmlpayme@ntsas.com",
    "customer_phone": "9876543210",
    "customer_uid": "54deabb4-ba45-4a60-9e6a-9c016fe7ab10"
  },
  "entity": "order",
  "order_amount": 22,
  "payment_session_id": "session_a1VXIPJo8kh7IBigVXX8LgTMupQW_cu25FS8KwLwQLOmiHqbBxq5UhEilrhbDSKKHA6UAuOj9506aaHNlFAHEqYrHSEl9AVtYQN9LIIc4vkH",
  "order_currency": "INR",
  "order_expiry_time": "2023-09-09T18:02:46+05:30",
  "order_id": "order_3242Tq4Edj9CC5RDcMeobmJOWOBJij",
  "order_meta": {
    "return_url": "https://www.cashfree.com/devstudio/thankyou",
    "payment_methods": "cc",
    "notify_url": "https://example.com/cf_notify",
    "payment_methods_filters": {
      "method": {
        "action": "ALLOW",
        "values": [
          "debit_card",
          "credit_card",
          "credit_card_emi",
          "debit_card_emi"
        ]
      },
      "filters": {
        "card_bins": {
          "action": "ALLOW",
          "values": [
            441144,
            554455
          ]
        },
        "card_schemes": {
          "action": "ALLOW",
          "values": [
            "VISA",
            "MASTERCARD"
          ]
        },
        "card_suffix": {
          "action": "ALLOW",
          "values": [
            4433,
            8910
          ]
        },
        "card_emi_bins": {
          "action": "ALLOW",
          "values": [
            441144,
            554455
          ]
        },
        "card_emi_schemes": {
          "action": "ALLOW",
          "values": [
            "VISA",
            "MASTERCARD"
          ]
        },
        "card_emi_suffix": {
          "action": "ALLOW",
          "values": [
            4433,
            8910
          ]
        }
      }
    }
  },
  "order_note": "some order note LIST",
  "order_splits": [],
  "order_status": "ACTIVE",
  "order_tags": {
    "name": "John",
    "age": "19"
  },
  "terminal_data": null,
  "cart_details": {
    "cart_id": "1"
  }
}

Authorizations

x-client-id
string
header
required

Client app ID. You can find your app id in the merchant dashboard.

x-client-secret
string
header
required

Client secret key. You can find your secret in the merchant dashboard.

Headers

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

API version to be used. Format is in YYYY-MM-DD.

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

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 an order at cashfree

Response

200
application/json

OK

The complete order entity