Orders
Fetch an Order With ID
Fetches an Order with its id using the Razorpay Orders API.
GET
Use this endpoint to retrieve details of a particular order as per the id.
Path Parameters
string
required
Unique identifier of the order to be retrieved.
Response Parameters
string
The unique identifier of the order.
integer
The amount for which the order was created, in currency subunits. For example, for an amount of , enter
29500.string
Name of the entity. Here, it is
order.integer
The amount paid against the order.
integer
The amount pending against the order.
string
ISO code for the currency in which you want to accept the payment. The default length is 3 characters. Refer to the list of supported currencies.
string
Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique.
string
The 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.
integer
The number of payment attempts, successful and failed, that have been made against this order.
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”.integer
Indicates the Unix timestamp when this order was created.
object
Checkout configuration applied to this order, when the order was created with checkout-time options (theme, prefill, partial-payment settings).
string
A brief description of the order, used for display purposes.
array
List of offer IDs (
offer_xxxx) applied to this order, if any.string
Unique identifier of the offer associated with this order.
Errors
The API `<key/secret>
` provided is invalid.
The API `<key/secret> ` provided is invalid.
Code:
400The 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.
id is not a valid id.
id is not a valid id.
Code:
400The order_id passed is invalid.Solution: Use a valid order_id.The id provided does not exist
The id provided does not exist
Code:
400The order_id does not exist or does not belong to the requestor.Solution: Ensure that you use a valid order_id that belongs to the requestor.Order older than 180 days, please use reports.
Order older than 180 days, please use reports.
Code:
400The order being fetched was created more than 180 days ago. The live Orders API only retains recent orders for direct fetch.Solution: For orders older than 180 days, use the Reports / Settlements export from the Dashboard rather than the live API.