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
Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors.
Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders
Body
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
x >= 1
10.15
Currency for the order. INR if left empty. Fill out the 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": "john@cashfree.com",
"customer_phone": "9908734801",
"customer_name": "John Doe",
"customer_bank_account_number": "1518121112",
"customer_bank_ifsc": "XITI0000001",
"customer_bank_code": 3333
}
Order identifier present in your system. Alphanumeric, '_' and '-' only
3 - 45
"your-order-id"
Use this if you are creating an order for cashfree's softPOS
{
"terminal_phone_no": "6309291183",
"terminal_id": "terminal-123",
"terminal_type": "SPOS",
"added_on": "2023-08-04T13:12:58+05:30",
"cf_terminal_id": 1051123,
"last_updated_on": "2023-09-06T14:07:00+05:30",
"terminal_address": "Banglore",
"terminal_name": "test",
"terminal_note": "POS vertical",
"terminal_status": "ACTIVE"
}
Optional meta details to control how the customer pays and how payment journey completes
{
"return_url": "https://example.com?order_id={order_id}",
"notify_url": "https://example.com/webhook.php",
"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 thr form of {"key":"value"} which can be passed for an order. A maximum of 10 tags can be added
{
"name": "John Doe",
"city": "Bangalore",
"product": "Laptop",
"shipping_address": "123 Main St"
}
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" }]
Response
OK
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.
Additional 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": "john@cashfree.com",
"customer_phone": "9908734801",
"customer_name": "John Doe",
"customer_bank_account_number": "1518121112",
"customer_bank_ifsc": "XITI0000001",
"customer_bank_code": 3333
}
Optional meta details to control how the customer pays and how payment journey completes
URL for payment retrieval for an order
Settlement URL object
URL to get refunds for order
Custom Tags in thr 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"
}