Create Order
Order
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.
Authorizations
Client app ID. You can find your app id in the Merchant Dashboard.
Client secret key. You can find your secret in the Merchant Dashboard.
Headers
API version to be used. Format is in YYYY-MM-DD
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.
Body
Request body to create an order at cashfree
The customer details that are necessary. Note that you can pass dummy details if your use case does not require the customer details.
Bill amount for the order. Provide upto two decimals. 10.15 means Rs 10 and 15 paisa
x > 1
Currency for the order. INR if left empty. Contact care@cashfree.com to enable new currencies.
The cart details that are necessary like shipping address, billing address and more.
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
Order identifier present in your system. Alphanumeric, '_' and '-' only
3 - 45
Optional meta details to control how the customer pays and how payment journey completes
Order note for reference.
3 - 200
If you have Easy split enabled in your Cashfree account then you can use this option to split the order amount.
Custom Tags in thr form of {"key":"value"} which can be passed for an order. A maximum of 10 tags can be added
Use this to set configurations for the products like One Click Checkout, Verify and Pay, if they are enabled for your account
Use this if you are creating an order for cashfree's softPOS
Response
The complete order entity
Cart Details in the Order Entity Response
unique id generated by cashfree for your order
When the order was created at cashfree's server
The customer details that are necessary. Note that you can pass dummy details if your use case does not require the customer details.
Type of the entity.
Currency of the order. Example INR
order_id sent during the api request
Optional meta details to control how the customer pays and how payment journey completes
Additional note for order
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 terminatedTERMINATION_REQUESTED
: Order termination requested
Custom Tags in thr form of {"key":"value"} which can be passed for an order. A maximum of 10 tags can be added
Configurations for the products like One Click Checkout, Verify and Pay, if they are enabled for your account
Was this page helpful?