Fetch All Invoices
GET/v1/invoicesClick to copy
Use this endpoint to retrieve the details of all invoices.
Is this page helpful?
Curl
change language
change language
1curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \2-X GET https://api.razorpay.com/v1/invoices/
Success
Failure
1{2"entity": "collection",3"count": 2,4"items": [5{6"id": "inv_DAweOiQ7amIUVd",7"entity": "invoice",8"receipt": "#0961",9"invoice_number": "#0961",10"customer_id": "cust_DAtUWmvpktokrT",11"customer_details": {12"id": "cust_DAtUWmvpktokrT",13"name": "John Smith",14"email": "john.smith@example.com",15"contact": "+11234567890",16"gstin": null,17"billing_address": {18"id": "addr_DAtUWoxgu91obl",19"type": "billing_address",20"primary": true,21"line1": "Bakers Street",22"line2": "Country Road",23"zipcode": "400092",24"city": "Mumbai",25"state": "Maharashtra",26"country": "in"27},28"shipping_address": null,29"customer_name": "John Smith",30"customer_email": "john.smith@example.com",31"customer_contact": "+11234567890"32},33"order_id": null,34"line_items": [35{36"id": "li_DAweOizsysoJU6",37"item_id": null,38"name": "Book / English August - Updated name and quantity",39"description": "150 points in Quidditch",40"amount": 400,41"unit_amount": 400,42"gross_amount": 400,43"tax_amount": 0,44"taxable_amount": 400,45"net_amount": 400,46"currency": "",47"type": "invoice",48"tax_inclusive": false,49"hsn_code": null,50"sac_code": null,51"tax_rate": null,52"unit": null,53"quantity": 1,54"taxes": []55},56{57"id": "li_DAwjWQUo07lnjF",58"item_id": null,59"name": "Book / A Wild Sheep Chase",60"description": null,61"amount": 200,62"unit_amount": 200,63"gross_amount": 200,64"tax_amount": 0,65"taxable_amount": 200,66"net_amount": 200,67"currency": "",68"type": "invoice",69"tax_inclusive": false,70"hsn_code": null,71"sac_code": null,72"tax_rate": null,73"unit": null,74"quantity": 1,75"taxes": []76}77],78"payment_id": null,79"status": "draft",80"expire_by": 1567103399,81"issued_at": null,82"paid_at": null,83"cancelled_at": null,84"expired_at": null,85"sms_status": null,86"email_status": null,87"date": 1566891149,88"terms": null,89"partial_payment": false,90"gross_amount": 600,91"tax_amount": 0,92"taxable_amount": 600,93"amount": 600,94"amount_paid": null,95"amount_due": null,96"currency": "",97"currency_symbol": "<currency_symbol>",98"description": "This is a test invoice.",99"notes": {100"updated-key": "An updated note."101},102"comment": null,103"short_url": null,104"view_less": true,105"billing_start": null,106"billing_end": null,107"type": "invoice",108"group_taxes_discounts": false,109"created_at": 1566906474,110"idempotency_key": null111},112{113"id": "inv_DAul2TA6zodukS",114"entity": "invoice",115"receipt": null,116"invoice_number": null,117"customer_id": "cust_DAuFux32LnIsqJ",118"customer_details": {119"id": "cust_DAuFux32LnIsqJ",120"name": "John Smith",121"email": "john.smith@example.com",122"contact": "+11234567890",123"gstin": null,124"billing_address": {125"id": "addr_DAuFuz499I5mgk",126"type": "billing_address",127"primary": true,128"line1": "L-16, The Business Centre,",129"line2": "61, Wellfield Road",130"zipcode": "110001",131"city": "New Delhi",132"state": "Delhi",133"country": "in"134},135"shipping_address": null,136"customer_name": "John Smith",137"customer_email": "john.smith@example.com",138"customer_contact": "+11234567890"139},140"order_id": "order_DAul2V0vnGXIML",141"line_items": [142{143"id": "li_DAul2TuV4fhwd3",144"item_id": "item_DAqThJ7v09UO3n",145"name": "Magic Beans",146"description": "Beans that make you go kaput!",147"amount": 2000,148"unit_amount": 2000,149"gross_amount": 2000,150"tax_amount": 0,151"taxable_amount": 2000,152"net_amount": 2000,153"currency": "",154"type": "invoice",155"tax_inclusive": false,156"hsn_code": null,157"sac_code": null,158"tax_rate": null,159"unit": null,160"quantity": 1,161"taxes": []162}163],164"payment_id": null,165"status": "cancelled",166"expire_by": null,167"issued_at": 1566899808,168"paid_at": null,169"cancelled_at": 1566973122,170"expired_at": null,171"sms_status": "sent",172"email_status": "sent",173"date": 1566994898,174"terms": "Updated terms and conditions for Acme Corp",175"partial_payment": false,176"gross_amount": 2000,177"tax_amount": 0,178"taxable_amount": 2000,179"amount": 2000,180"amount_paid": 0,181"amount_due": 2000,182"currency": "",183"description": null,184"notes": [],185"comment": "Updated comment on the Invoice",186"short_url": "https://rzp.io/i/F7EPd9Q",187"view_less": true,188"billing_start": null,189"billing_end": null,190"type": "invoice",191"group_taxes_discounts": false,192"created_at": 1566899808,193"idempotency_key": null194}195]196}
Query Parameters
type string Here, it is invoice.
payment_id stringThe unique identifier of the payment made by the customer against the invoice.
receipt stringThe unique receipt number that you entered for internal purposes.
customer_id stringThe unique identifier of the customer. When used, fetches all invoices generated for a customer.
Response Parameters
idstringThe unique identifier of the invoice.
entitystring Indicates the type of entity. Here, it is invoice.
typestring Here, it should be invoice.
invoice_numberstringUnique number you added for internal reference. The minimum character length is 1 and maximum is 40.
customer_idstring The unique identifier of the customer. You can create customer_id using the
customer_detailsobjectDetails of the customer.
Show child parameters (6)
order_idstringThe unique identifier of the order associated with the invoice.
line_itemsobjectDetails of the line item that is billed in the invoice. Maximum of 50 line items.
Show child parameters (8)
payment_idstringUnique identifier of a payment made against this invoice.
statusstringThe status of the invoice. Know more about
. Possible values:draftissuedpartially_paidpaidcancelledexpireddeleted
expire_byintegerTimestamp, in Unix format, at which the invoice will expire.
issued_atintegerTimestamp, in Unix format, at which the invoice was issued to the customer.
paid_atintegerTimestamp, in Unix format, at which the payment was made.
cancelled_atintegerTimestamp, in Unix format, at which the invoice was cancelled.
expired_atintegerTimestamp, in Unix format, at which the invoice expired.
sms_statusstringThe delivery status of the SMS notification for the invoice sent to the customer. Possible values:
pendingsent
email_statusstringThe delivery status of the email notification for the invoice sent to the customer. Possible values:
pendingsent
partial_paymentbooleanIndicates whether the customer can make a partial payment on the invoice. Possible values:
true: The customer can make partial payments.false(default): The customer cannot make partial payments.
amountinteger Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is $300.00, pass the value as 30000.
amount_paidintegerAmount paid by the customer against the invoice.
amount_dueintegerThe remaining amount to be paid by the customer for the issued invoice.
currencystring The currency associated with the invoice. Possible value: USD.
descriptionstringA brief description of the invoice. The maximum character length is 2048.
notesobjectAny custom notes added to the invoice. Maximum of 2048 characters.
short_urlstringThe short URL that is generated. Share this link with customers to accept payments.
dateintegerTimestamp, in Unix format, that indicates the issue date of the invoice.
termsstringAny terms to be included in the invoice. Maximum of 2048 characters.
commentstringAny comments to be added in the invoice. Maximum of 2048 characters.
Errors
The API <key/secret> provided is invalid.
Error Status: 4xx
The API key or secret are not entered or an invalid API key is used.
Solution
The id provided does not exist.
Error Status: 400
The invoice id entered is either invalid or does not belong to the requester account.
Solution
Fetch All Invoices
GET/v1/invoicesClick to copy
Use this endpoint to retrieve the details of all invoices.
Is this page helpful?
Query Parameters
type string Here, it is invoice.
payment_id stringThe unique identifier of the payment made by the customer against the invoice.
receipt stringThe unique receipt number that you entered for internal purposes.
customer_id stringThe unique identifier of the customer. When used, fetches all invoices generated for a customer.
Response Parameters
idstringThe unique identifier of the invoice.
entitystring Indicates the type of entity. Here, it is invoice.
typestring Here, it should be invoice.
invoice_numberstringUnique number you added for internal reference. The minimum character length is 1 and maximum is 40.
customer_idstring The unique identifier of the customer. You can create customer_id using the
customer_detailsobjectDetails of the customer.
Show child parameters (6)
order_idstringThe unique identifier of the order associated with the invoice.
line_itemsobjectDetails of the line item that is billed in the invoice. Maximum of 50 line items.
Show child parameters (8)
payment_idstringUnique identifier of a payment made against this invoice.
statusstringThe status of the invoice. Know more about
. Possible values:draftissuedpartially_paidpaidcancelledexpireddeleted
expire_byintegerTimestamp, in Unix format, at which the invoice will expire.
issued_atintegerTimestamp, in Unix format, at which the invoice was issued to the customer.
paid_atintegerTimestamp, in Unix format, at which the payment was made.
cancelled_atintegerTimestamp, in Unix format, at which the invoice was cancelled.
expired_atintegerTimestamp, in Unix format, at which the invoice expired.
sms_statusstringThe delivery status of the SMS notification for the invoice sent to the customer. Possible values:
pendingsent
email_statusstringThe delivery status of the email notification for the invoice sent to the customer. Possible values:
pendingsent
partial_paymentbooleanIndicates whether the customer can make a partial payment on the invoice. Possible values:
true: The customer can make partial payments.false(default): The customer cannot make partial payments.
amountinteger Amount to be paid using the invoice. Must be in the smallest unit of the currency. For example, if the amount to be received from the customer is $300.00, pass the value as 30000.
amount_paidintegerAmount paid by the customer against the invoice.
amount_dueintegerThe remaining amount to be paid by the customer for the issued invoice.
currencystring The currency associated with the invoice. Possible value: USD.
descriptionstringA brief description of the invoice. The maximum character length is 2048.
notesobjectAny custom notes added to the invoice. Maximum of 2048 characters.
short_urlstringThe short URL that is generated. Share this link with customers to accept payments.
dateintegerTimestamp, in Unix format, that indicates the issue date of the invoice.
termsstringAny terms to be included in the invoice. Maximum of 2048 characters.
commentstringAny comments to be added in the invoice. Maximum of 2048 characters.
Errors
The API <key/secret> provided is invalid.
Error Status: 4xx
The API key or secret are not entered or an invalid API key is used.
Solution
The id provided does not exist.
Error Status: 400
The invoice id entered is either invalid or does not belong to the requester account.
Solution
Curl
change language
change language
1curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \2-X GET https://api.razorpay.com/v1/invoices/
Success
Failure
1{2"entity": "collection",3"count": 2,4"items": [5{6"id": "inv_DAweOiQ7amIUVd",7"entity": "invoice",8"receipt": "#0961",9"invoice_number": "#0961",10"customer_id": "cust_DAtUWmvpktokrT",11"customer_details": {12"id": "cust_DAtUWmvpktokrT",13"name": "John Smith",14"email": "john.smith@example.com",15"contact": "+11234567890",16"gstin": null,17"billing_address": {18"id": "addr_DAtUWoxgu91obl",19"type": "billing_address",20"primary": true,21"line1": "Bakers Street",22"line2": "Country Road",23"zipcode": "400092",24"city": "Mumbai",25"state": "Maharashtra",26"country": "in"27},28"shipping_address": null,29"customer_name": "John Smith",30"customer_email": "john.smith@example.com",31"customer_contact": "+11234567890"32},33"order_id": null,34"line_items": [35{36"id": "li_DAweOizsysoJU6",37"item_id": null,38"name": "Book / English August - Updated name and quantity",39"description": "150 points in Quidditch",40"amount": 400,41"unit_amount": 400,42"gross_amount": 400,43"tax_amount": 0,44"taxable_amount": 400,45"net_amount": 400,46"currency": "",47"type": "invoice",48"tax_inclusive": false,49"hsn_code": null,50"sac_code": null,51"tax_rate": null,52"unit": null,53"quantity": 1,54"taxes": []55},56{57"id": "li_DAwjWQUo07lnjF",58"item_id": null,59"name": "Book / A Wild Sheep Chase",60"description": null,61"amount": 200,62"unit_amount": 200,63"gross_amount": 200,64"tax_amount": 0,65"taxable_amount": 200,66"net_amount": 200,67"currency": "",68"type": "invoice",69"tax_inclusive": false,70"hsn_code": null,71"sac_code": null,72"tax_rate": null,73"unit": null,74"quantity": 1,75"taxes": []76}77],78"payment_id": null,79"status": "draft",80"expire_by": 1567103399,81"issued_at": null,82"paid_at": null,83"cancelled_at": null,84"expired_at": null,85"sms_status": null,86"email_status": null,87"date": 1566891149,88"terms": null,89"partial_payment": false,90"gross_amount": 600,91"tax_amount": 0,92"taxable_amount": 600,93"amount": 600,94"amount_paid": null,95"amount_due": null,96"currency": "",97"currency_symbol": "<currency_symbol>",98"description": "This is a test invoice.",99"notes": {100"updated-key": "An updated note."101},102"comment": null,103"short_url": null,104"view_less": true,105"billing_start": null,106"billing_end": null,107"type": "invoice",108"group_taxes_discounts": false,109"created_at": 1566906474,110"idempotency_key": null111},112{113"id": "inv_DAul2TA6zodukS",114"entity": "invoice",115"receipt": null,116"invoice_number": null,117"customer_id": "cust_DAuFux32LnIsqJ",118"customer_details": {119"id": "cust_DAuFux32LnIsqJ",120"name": "John Smith",121"email": "john.smith@example.com",122"contact": "+11234567890",123"gstin": null,124"billing_address": {125"id": "addr_DAuFuz499I5mgk",126"type": "billing_address",127"primary": true,128"line1": "L-16, The Business Centre,",129"line2": "61, Wellfield Road",130"zipcode": "110001",131"city": "New Delhi",132"state": "Delhi",133"country": "in"134},135"shipping_address": null,136"customer_name": "John Smith",137"customer_email": "john.smith@example.com",138"customer_contact": "+11234567890"139},140"order_id": "order_DAul2V0vnGXIML",141"line_items": [142{143"id": "li_DAul2TuV4fhwd3",144"item_id": "item_DAqThJ7v09UO3n",145"name": "Magic Beans",146"description": "Beans that make you go kaput!",147"amount": 2000,148"unit_amount": 2000,149"gross_amount": 2000,150"tax_amount": 0,151"taxable_amount": 2000,152"net_amount": 2000,153"currency": "",154"type": "invoice",155"tax_inclusive": false,156"hsn_code": null,157"sac_code": null,158"tax_rate": null,159"unit": null,160"quantity": 1,161"taxes": []162}163],164"payment_id": null,165"status": "cancelled",166"expire_by": null,167"issued_at": 1566899808,168"paid_at": null,169"cancelled_at": 1566973122,170"expired_at": null,171"sms_status": "sent",172"email_status": "sent",173"date": 1566994898,174"terms": "Updated terms and conditions for Acme Corp",175"partial_payment": false,176"gross_amount": 2000,177"tax_amount": 0,178"taxable_amount": 2000,179"amount": 2000,180"amount_paid": 0,181"amount_due": 2000,182"currency": "",183"description": null,184"notes": [],185"comment": "Updated comment on the Invoice",186"short_url": "https://rzp.io/i/F7EPd9Q",187"view_less": true,188"billing_start": null,189"billing_end": null,190"type": "invoice",191"group_taxes_discounts": false,192"created_at": 1566899808,193"idempotency_key": null194}195]196}