Cashfree
Create Order
POST
https://sandbox.cashfree.com/pg/orders
Use this API to create orders with Cashfree from your backend and get the payment link
BODY PARAMS
order_id
string
Order identifier present in your system. Alphanumeric and only - and _ allowed.
order_amount
double
required
Bill amount for the order. Provide upto two decimals. 10.15 means Rs 10 and 15 paisa.
order_currency
string
required
Currency for the order. INR if left empty. Contact care@cashfree.com to enable new currencies.
CUSTOMER DETAILS
customer_id
string
required
A unique identifier for the customer. Use alphanumeric values only.
customer_email
string
required
Customer email address.
customer_phone
string
required
Customer phone number.
customer_bank_account_number
string
Customer bank account. Required if you want to do a bank account check (TPV).
customer_bank_ifsc
string
Customer bank IFSC. Required if you want to do a bank account check (TPV)
customer_bank_code
string
Customer bank code. Required for net banking payments, if you want to do a bank account check (TPV)
order_meta
return_url
string
The URL to which user will be redirected to after the payment on bank OTP page. Maximum length: 250.
notify_url
string
Notification URL for server-server communication. Useful when user’s connection drops while re-directing. NotifyUrl should be an https URL. Maximum length: 250.y
payment_methods
string
Allowed payment modes for this order. Comma separated with following values - "cc", "dc", "ccc", "ppc", "nb", "upi", "paypal", "app"
HEADERS
x-client-id
string
Client app ID
s-client-secret
string
Client Secret key
x-api-version
string
API version to be used
Language
cURL
Node
Ruby
PHP
Python
REQUEST
curl --request POST \
--url https://sandbox.cashfree.com/pg/orders \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \