An order is an entity which has a amount and currency associated with it. It is something for which you want to collect payment for.
Use this API to create orders with Cashfree from your backend to get a payment_sessions_id.
You can use the payment_sessions_id to create a transaction for the order.
Client app ID. You can find your app id in the Merchant Dashboard.
Client secret key. You can find your secret key in the Merchant Dashboard.
API version to be used. Format is in YYYY-MM-DD. API version to be used
Request ID for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to Cashfree.
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.
Request body to create an order at Cashfree.
Request body to create an order at Cashfree.
Bill amount for the order. Provide upto two decimals. 10.15 means Rs 10 and 15 paisa. For orders in non-INR currency, please refer to supported amounts per currency.
x >= 110.15
Currency for the order. INR if left empty. For support currency list, refer here. Submit Support Form to enable new currencies.
"INR"
The customer details that are necessary. Note that you can pass dummy details if your use case does not require the customer details.
{
"customer_id": "7112AAA812234",
"customer_email": "[email protected]",
"customer_phone": "9908734801",
"customer_name": "John Doe",
"customer_bank_account_number": "1518121112",
"customer_bank_ifsc": "XITI0000001",
"customer_bank_code": 3333,
"customer_uid": "54deabb4-ba45-4a60-9e6a-9c016fe7ab10"
}Order identifier present in your system. Alphanumeric, '_' and '-' only
3 - 45"your-order-id"
The cart details that are necessary like shipping address, billing address and more.
Use this if you are creating an order for cashfree's softPOS
{
"added_on": "2023-08-04T13:12:58+05:30",
"cf_terminal_id": "31051123",
"last_updated_on": "2023-09-06T14:07:00+05:30",
"terminal_address": "Banglore",
"terminal_id": "terminal-1212",
"terminal_name": "test",
"terminal_note": "POS vertical",
"terminal_phone_no": "6309291183",
"terminal_status": "ACTIVE",
"terminal_type": "SPOS"
}Optional meta details to control how the customer pays and how payment journey completes
{
"return_url": "https://www.cashfree.com/devstudio/thankyou",
"payment_methods": "cc,dc"
}Time after which the order expires. Customers will not be able to make the payment beyond the time specified here. We store timestamps in IST, but you can provide them in a valid ISO 8601 time format. Example 2021-07-02T10:20:12+05:30 for IST, 2021-07-02T10:20:12Z for UTC
"2021-07-02T10:20:12+05:30"
Order note for reference.
3 - 200"Test order"
Custom Tags in the form of {"key":"value"} which can be passed for an order. A maximum of 10 tags can be added
{
"product": "Laptop",
"shipping_address": "123 Main St",
"name": "John Doe",
"city": "Bangalore"
}If you have Easy split enabled in your Cashfree account then you can use this option to split the order amount.
[{ "amount": 10, "vendor": "john" }]Use this to set configurations for the products like One Click Checkout, Verify and Pay, if they are enabled for your account
The complete order entity.
The complete order entity.
unique id generated by cashfree for your order
order_id sent during the api request
Type of the entity.
Currency of the order. Example INR
Possible values are
ACTIVE: Order does not have a sucessful transaction yetPAID: Order is PAID with one successful transactionEXPIRED: Order was not PAID and not it has expired. No transaction can be initiated for an EXPIRED order.
TERMINATED: Order terminated
TERMINATION_REQUESTED: Order termination requestedAdditional note for order
When the order was created at cashfree's server
"2022-08-16T14:45:38+05:30"
The customer details that are necessary. Note that you can pass dummy details if your use case does not require the customer details.
{
"customer_id": "7112AAA812234",
"customer_email": "[email protected]",
"customer_phone": "9908734801",
"customer_name": "John Doe",
"customer_bank_account_number": "1518121112",
"customer_bank_ifsc": "XITI0000001",
"customer_bank_code": 3333,
"customer_uid": "54deabb4-ba45-4a60-9e6a-9c016fe7ab10"
}Optional meta details to control how the customer pays and how payment journey completes
Custom Tags in the form of {"key":"value"} which can be passed for an order. A maximum of 10 tags can be added
{
"product": "Laptop",
"shipping_address": "123 Main St"
}Cart Details in the Order Entity Response
Terminal Data in the create order response
{
"agent_mobile_number": "9876543214",
"cf_terminal_id": 1838,
"merchant_terminal_id": "ahdsgadjhgfaj7137e",
"terminal_type": "STOREFRONT"
}Configurations for the products like One Click Checkout, Verify and Pay, if they are enabled for your account