Create an Order
POST/v1/ordersClick to copy
Use this endpoint to create an order with basic details such as amount and currency.
Is this page helpful?
Curl
change language
change language
1curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \2-X POST https://api.razorpay.com/v1/orders \3-H "content-type: application/json" \4-d '{5"amount": 5000,6"currency": "",7"receipt": "receipt#1",8"notes": {9"key1": "value3",10"key2": "value2"11}12}'
Success
Failure
1{2"amount": 5000,3"amount_due": 5000,4"amount_paid": 0,5"attempts": 0,6"created_at": 1756455561,7"currency": "INR",8"entity": "order",9"id": "order_RB58MiP5SPFYyM",10"notes": {11"key1": "value3",12"key2": "value2"13},14"offer_id": null,15"receipt": "receipt#1",16"status": "created"17}
Request Parameters
amount *
integer The amount for which the order was created, in currency subunits. For example, for an amount of $295.00, enter 29500. Payment can only be made for this amount against the Order.
currency *
stringISO code for the currency in which you want to accept the payment. The default length is 3 characters.
receipt stringReceipt number that corresponds to this order, set for your internal reference. Can have a maximum length of 40 characters and has to be unique.
notes json object Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.
partial_payment booleanIndicates whether the customer can make a partial payment. Possible values:
true: The customer can make partial payments.false(default) : The customer cannot make partial payments.
first_payment_min_amount integer Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of $700.00 is to be received from the customer in two installments of #1 - $500.00, #2 - $200.00, then you can set this value as 50000. This parameter should be passed only if partial_payment is true.
Response Parameters
idstringThe unique identifier of the order.
amountinteger The amount for which the order was created, in currency subunits. For example, for an amount of $295.00, enter 29500.
entitystring Name of the entity. Here, it is order.
amount_paidintegerThe amount paid against the order.
amount_dueintegerThe amount pending against the order.
currencystringISO code for the currency in which you want to accept the payment. The default length is 3 characters.
receiptstringReceipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique.
statusstringThe status of the order. Possible values:
created: When you create an order it is in thecreatedstate. It stays in this state till a payment is attempted on it.attempted: An order moves fromcreatedtoattemptedstate when a payment is first attempted on it. It remains in theattemptedstate till one payment associated with that order is captured.paid: After the successful capture of the payment, the order moves to thepaidstate. No further payment requests are permitted once the order moves to thepaidstate. The order stays in thepaidstate even if the payment associated with the order is refunded.
attemptsintegerThe number of payment attempts, successful and failed, that have been made against this order.
notesjson object Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.
created_atintegerIndicates the Unix timestamp when this order was created.
Errors
Authentication failed.
Error Status: 400
The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons:
- Different keys for test mode and live modes.
- Expired API key.
Solution
Order amount less than minimum amount allowed.
Error Status: 400
The amount specified is less than the minimum amount, that is 10.
Solution
The field name is required.
Error Status: 400
A mandatory field is missing.
Solution
Create an Order
POST/v1/ordersClick to copy
Use this endpoint to create an order with basic details such as amount and currency.
Is this page helpful?
Request Parameters
amount *
integer The amount for which the order was created, in currency subunits. For example, for an amount of $295.00, enter 29500. Payment can only be made for this amount against the Order.
currency *
stringISO code for the currency in which you want to accept the payment. The default length is 3 characters.
receipt stringReceipt number that corresponds to this order, set for your internal reference. Can have a maximum length of 40 characters and has to be unique.
notes json object Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.
partial_payment booleanIndicates whether the customer can make a partial payment. Possible values:
true: The customer can make partial payments.false(default) : The customer cannot make partial payments.
first_payment_min_amount integer Minimum amount that must be paid by the customer as the first partial payment. For example, if an amount of $700.00 is to be received from the customer in two installments of #1 - $500.00, #2 - $200.00, then you can set this value as 50000. This parameter should be passed only if partial_payment is true.
Response Parameters
idstringThe unique identifier of the order.
amountinteger The amount for which the order was created, in currency subunits. For example, for an amount of $295.00, enter 29500.
entitystring Name of the entity. Here, it is order.
amount_paidintegerThe amount paid against the order.
amount_dueintegerThe amount pending against the order.
currencystringISO code for the currency in which you want to accept the payment. The default length is 3 characters.
receiptstringReceipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique.
statusstringThe status of the order. Possible values:
created: When you create an order it is in thecreatedstate. It stays in this state till a payment is attempted on it.attempted: An order moves fromcreatedtoattemptedstate when a payment is first attempted on it. It remains in theattemptedstate till one payment associated with that order is captured.paid: After the successful capture of the payment, the order moves to thepaidstate. No further payment requests are permitted once the order moves to thepaidstate. The order stays in thepaidstate even if the payment associated with the order is refunded.
attemptsintegerThe number of payment attempts, successful and failed, that have been made against this order.
notesjson object Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.
created_atintegerIndicates the Unix timestamp when this order was created.
Errors
Authentication failed.
Error Status: 400
The API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons:
- Different keys for test mode and live modes.
- Expired API key.
Solution
Order amount less than minimum amount allowed.
Error Status: 400
The amount specified is less than the minimum amount, that is 10.
Solution
The field name is required.
Error Status: 400
A mandatory field is missing.
Solution
Curl
change language
change language
1curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \2-X POST https://api.razorpay.com/v1/orders \3-H "content-type: application/json" \4-d '{5"amount": 5000,6"currency": "",7"receipt": "receipt#1",8"notes": {9"key1": "value3",10"key2": "value2"11}12}'
Success
Failure
1{2"amount": 5000,3"amount_due": 5000,4"amount_paid": 0,5"attempts": 0,6"created_at": 1756455561,7"currency": "INR",8"entity": "order",9"id": "order_RB58MiP5SPFYyM",10"notes": {11"key1": "value3",12"key2": "value2"13},14"offer_id": null,15"receipt": "receipt#1",16"status": "created"17}