Fetch All Orders (With Expanded Payments)
GET/v1/orders?expand[]=paymentsClick to copy
Use this endpoint to retrieve the details of all the orders that you created, with the payment parameter expanded.
Is this page helpful?
Curl
1curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]2-X GET https://api.razorpay.com/v1/orders?expand[]=payments
Success
1{2"entity": "collection",3"count": 2,4"items": [5{6"id": "order_EpMTIJM0rhOj3H",7"entity": "order",8"amount": 10000,9"amount_paid": 0,10"amount_due": 10000,11"currency": "",12"receipt": null,13"payments": {14"entity": "collection",15"count": 1,16"items": [17{18"id": "pay_EpMq4YcK0z5UYk",19"entity": "payment",20"amount": 10000,21"currency": "",22"status": "authorized",23"order_id": "order_EpMTIJM0rhOj3H",24"invoice_id": null,25"international": false,26"method": "card",27"amount_refunded": 0,28"refund_status": null,29"captured": false,30"description": null,31"card_id": "card_EpMq4e7H6fHBQZ",32"bank": null,33"wallet": null,34"vpa": null,35"email": "nur.aisyah@example.com",36"contact": "+60123456789",37"notes": [],38"fee": null,39"tax": null,40"error_code": null,41"error_description": null,42"error_source": null,43"error_step": null,44"error_reason": null,45"created_at": 158926939046}47]48},49"offer_id": null,50"status": "attempted",51"attempts": 1,52"notes": [],53"created_at": 158926809654},55{56"id": "order_Eoryq8z9wd0y7i",57"entity": "order",58"amount": 10000,59"amount_paid": 0,60"amount_due": 10000,61"currency": "",62"receipt": null,63"payments": {64"entity": "collection",65"count": 1,66"items": [67{68"id": "pay_EpMr7r6DRIdYPO",69"entity": "payment",70"amount": 10000,71"currency": "",72"status": "authorized",73"order_id": "order_Eoryq8z9wd0y7i",74"invoice_id": null,75"international": false,76"method": "card",77"amount_refunded": 0,78"refund_status": null,79"captured": false,80"description": null,81"card_id": "card_EpMr7y6E5cDXvd",82"bank": null,83"wallet": null,84"vpa": null,85"email": "nur.aisyah@example.com",86"contact": "+60123456789",87"notes": [],88"fee": null,89"tax": null,90"error_code": null,91"error_description": null,92"error_source": null,93"error_step": null,94"error_reason": null,95"created_at": 158926945096}97]98},99"offer_id": null,100"status": "attempted",101"attempts": 1,102"notes": [],103"created_at": 1589160718104}105]106}
Query Parameters
expand[]=paymentsstringUse to expand the payments made for an order.
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 RM 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.
currency *
stringISO 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.
paymentsobjectDetails of the payment.
Show child parameters (27)
Fetch All Orders (With Expanded Payments)
GET/v1/orders?expand[]=paymentsClick to copy
Use this endpoint to retrieve the details of all the orders that you created, with the payment parameter expanded.
Is this page helpful?
Query Parameters
expand[]=paymentsstringUse to expand the payments made for an order.
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 RM 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.
currency *
stringISO 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.
paymentsobjectDetails of the payment.
Show child parameters (27)
Curl
1curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]2-X GET https://api.razorpay.com/v1/orders?expand[]=payments
Success
1{2"entity": "collection",3"count": 2,4"items": [5{6"id": "order_EpMTIJM0rhOj3H",7"entity": "order",8"amount": 10000,9"amount_paid": 0,10"amount_due": 10000,11"currency": "",12"receipt": null,13"payments": {14"entity": "collection",15"count": 1,16"items": [17{18"id": "pay_EpMq4YcK0z5UYk",19"entity": "payment",20"amount": 10000,21"currency": "",22"status": "authorized",23"order_id": "order_EpMTIJM0rhOj3H",24"invoice_id": null,25"international": false,26"method": "card",27"amount_refunded": 0,28"refund_status": null,29"captured": false,30"description": null,31"card_id": "card_EpMq4e7H6fHBQZ",32"bank": null,33"wallet": null,34"vpa": null,35"email": "nur.aisyah@example.com",36"contact": "+60123456789",37"notes": [],38"fee": null,39"tax": null,40"error_code": null,41"error_description": null,42"error_source": null,43"error_step": null,44"error_reason": null,45"created_at": 158926939046}47]48},49"offer_id": null,50"status": "attempted",51"attempts": 1,52"notes": [],53"created_at": 158926809654},55{56"id": "order_Eoryq8z9wd0y7i",57"entity": "order",58"amount": 10000,59"amount_paid": 0,60"amount_due": 10000,61"currency": "",62"receipt": null,63"payments": {64"entity": "collection",65"count": 1,66"items": [67{68"id": "pay_EpMr7r6DRIdYPO",69"entity": "payment",70"amount": 10000,71"currency": "",72"status": "authorized",73"order_id": "order_Eoryq8z9wd0y7i",74"invoice_id": null,75"international": false,76"method": "card",77"amount_refunded": 0,78"refund_status": null,79"captured": false,80"description": null,81"card_id": "card_EpMr7y6E5cDXvd",82"bank": null,83"wallet": null,84"vpa": null,85"email": "nur.aisyah@example.com",86"contact": "+60123456789",87"notes": [],88"fee": null,89"tax": null,90"error_code": null,91"error_description": null,92"error_source": null,93"error_step": null,94"error_reason": null,95"created_at": 158926945096}97]98},99"offer_id": null,100"status": "attempted",101"attempts": 1,102"notes": [],103"created_at": 1589160718104}105]106}