Fetch All Invoices
GET
/v1/invoices
Click 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": "Gaurav Kumar",14"email": "gaurav.kumar@example.com",15"contact": "9977886633",16"billing_address": {17"id": "addr_DAtUWoxgu91obl",18"type": "billing_address",19"primary": true,20"line1": "318 C-Wing, Suyog Co. Housing Society Ltd.",21"line2": "T.P.S Road, Vazira, Borivali",22"zipcode": "400092",23"city": "Mumbai",24"state": "Maharashtra",25"country": "in"26},27"shipping_address": null,28"customer_name": "Gaurav Kumar",29"customer_email": "gaurav.kumar@example.com",30"customer_contact": "9977886633"31},32"order_id": null,33"line_items": [34{35"id": "li_DAweOizsysoJU6",36"item_id": null,37"name": "Book / English August - Updated name and quantity",38"description": "150 points in Quidditch",39"amount": 400,40"unit_amount": 400,41"gross_amount": 400,42"tax_amount": 0,43"taxable_amount": 400,44"net_amount": 400,45"currency": "MYR",46"type": "invoice",47"tax_inclusive": false,48"hsn_code": null,49"sac_code": null,50"tax_rate": null,51"unit": null,52"quantity": 1,53"taxes": []54},55{56"id": "li_DAwjWQUo07lnjF",57"item_id": null,58"name": "Book / A Wild Sheep Chase",59"description": null,60"amount": 200,61"unit_amount": 200,62"gross_amount": 200,63"tax_amount": 0,64"taxable_amount": 200,65"net_amount": 200,66"currency": "MYR",67"type": "invoice",68"tax_inclusive": false,69"hsn_code": null,70"sac_code": null,71"tax_rate": null,72"unit": null,73"quantity": 1,74"taxes": []75}76],77"payment_id": null,78"status": "draft",79"expire_by": 1567103399,80"issued_at": null,81"paid_at": null,82"cancelled_at": null,83"expired_at": null,84"sms_status": null,85"email_status": null,86"date": 1566891149,87"terms": null,88"partial_payment": false,89"gross_amount": 600,90"tax_amount": 0,91"taxable_amount": 600,92"amount": 600,93"amount_paid": null,94"amount_due": null,95"currency": "MYR",96"description": "This is a test invoice.",97"notes": {98"updated-key": "An updated note."99},100"comment": null,101"short_url": null,102"view_less": true,103"billing_start": null,104"billing_end": null,105"type": "invoice",106"group_taxes_discounts": false,107"created_at": 1566906474,108"idempotency_key": null109},110{111"id": "inv_DAul2TA6zodukS",112"entity": "invoice",113"receipt": null,114"invoice_number": null,115"customer_id": "cust_DAuFux32LnIsqJ",116"customer_details": {117"id": "cust_DAuFux32LnIsqJ",118"name": "Saurav Kumar",119"email": "saurav.kumar@example.com",120"contact": "9988776655",121"billing_address": {122"id": "addr_DAuFuz499I5mgk",123"type": "billing_address",124"primary": true,125"line1": "L-16, The Business Centre,",126"line2": "61, Wellfield Road",127"zipcode": "110001",128"city": "New Delhi",129"state": "Delhi",130"country": "in"131},132"shipping_address": null,133"customer_name": "Saurav Kumar",134"customer_email": "saurav.kumar@example.com",135"customer_contact": "9988776655"136},137"order_id": "order_DAul2V0vnGXIML",138"line_items": [139{140"id": "li_DAul2TuV4fhwd3",141"item_id": "item_DAqThJ7v09UO3n",142"name": "Magic Beans",143"description": "Beans that make you go kaput!",144"amount": 2000,145"unit_amount": 2000,146"gross_amount": 2000,147"tax_amount": 0,148"taxable_amount": 2000,149"net_amount": 2000,150"currency": "MYR",151"type": "invoice",152"tax_inclusive": false,153"hsn_code": null,154"sac_code": null,155"tax_rate": null,156"unit": null,157"quantity": 1,158"taxes": []159}160],161"payment_id": null,162"status": "cancelled",163"expire_by": null,164"issued_at": 1566899808,165"paid_at": null,166"cancelled_at": 1566973122,167"expired_at": null,168"sms_status": "sent",169"email_status": "sent",170"date": 1566994898,171"terms": "Updated terms and conditions for Acme Corp",172"partial_payment": false,173"gross_amount": 2000,174"tax_amount": 0,175"taxable_amount": 2000,176"amount": 2000,177"amount_paid": 0,178"amount_due": 2000,179"currency": "MYR",180"description": null,181"notes": [],182"comment": "Updated comment on the Invoice",183"short_url": "https://rzp.io/i/F7EPd9Q",184"view_less": true,185"billing_start": null,186"billing_end": null,187"type": "invoice",188"group_taxes_discounts": false,189"created_at": 1566899808,190"idempotency_key": null191}192]193}
Query Parameters
type
string
Here, it is invoice
.
payment_id
string
The unique identifier of the payment made by the customer against the invoice.
receipt
string
The unique receipt number that you entered for internal purposes.
customer_id
string
The unique identifier of the customer. When used, fetches all invoices generated for a customer.
Response Parameters
id
string
The unique identifier of the invoice.
entity
string
Indicates the type of entity. Here, it is invoice
.
type
string
Here, it should be invoice
.
invoice_number
string
Unique number you added for internal reference. The minimum character length is 1 and maximum is 40.
customer_id
string
The unique identifier of the customer. You can create customer_id
using the
customer_details
object
Details of the customer.
Show child parameters (6)
order_id
string
The unique identifier of the order associated with the invoice.
line_items
object
Details of the line item that is billed in the invoice. Maximum of 50 line items.
Show child parameters (8)
payment_id
string
Unique identifier of a payment made against this invoice.
status
string
The status of the invoice. Know more about
. Possible values:draft
issued
partially_paid
paid
cancelled
expired
deleted
expire_by
integer
Timestamp, in Unix format, at which the invoice will expire.
issued_at
integer
Timestamp, in Unix format, at which the invoice was issued to the customer.
paid_at
integer
Timestamp, in Unix format, at which the payment was made.
cancelled_at
integer
Timestamp, in Unix format, at which the invoice was cancelled.
expired_at
integer
Timestamp, in Unix format, at which the invoice expired.
sms_status
string
The delivery status of the SMS notification for the invoice sent to the customer. Possible values:
pending
sent
email_status
string
The delivery status of the email notification for the invoice sent to the customer. Possible values:
pending
sent
partial_payment
boolean
Indicates 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.
amount
integer
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 RMÂ 300.00, pass the value as 30000
.
amount_paid
integer
Amount paid by the customer against the invoice.
amount_due
integer
The remaining amount to be paid by the customer for the issued invoice.
currency
string
The currency associated with the invoice. Possible value: MYR
.
description
string
A brief description of the invoice. The maximum character length is 2048.
notes
object
Any custom notes added to the invoice. Maximum of 2048 characters.
short_url
string
The short URL that is generated. Share this link with customers to accept payments.
date
integer
Timestamp, in Unix format, that indicates the issue date of the invoice.
terms
string
Any terms to be included in the invoice. Maximum of 2048 characters.
comment
string
Any 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/invoices
Click 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
string
The unique identifier of the payment made by the customer against the invoice.
receipt
string
The unique receipt number that you entered for internal purposes.
customer_id
string
The unique identifier of the customer. When used, fetches all invoices generated for a customer.
Response Parameters
id
string
The unique identifier of the invoice.
entity
string
Indicates the type of entity. Here, it is invoice
.
type
string
Here, it should be invoice
.
invoice_number
string
Unique number you added for internal reference. The minimum character length is 1 and maximum is 40.
customer_id
string
The unique identifier of the customer. You can create customer_id
using the
customer_details
object
Details of the customer.
Show child parameters (6)
order_id
string
The unique identifier of the order associated with the invoice.
line_items
object
Details of the line item that is billed in the invoice. Maximum of 50 line items.
Show child parameters (8)
payment_id
string
Unique identifier of a payment made against this invoice.
status
string
The status of the invoice. Know more about
. Possible values:draft
issued
partially_paid
paid
cancelled
expired
deleted
expire_by
integer
Timestamp, in Unix format, at which the invoice will expire.
issued_at
integer
Timestamp, in Unix format, at which the invoice was issued to the customer.
paid_at
integer
Timestamp, in Unix format, at which the payment was made.
cancelled_at
integer
Timestamp, in Unix format, at which the invoice was cancelled.
expired_at
integer
Timestamp, in Unix format, at which the invoice expired.
sms_status
string
The delivery status of the SMS notification for the invoice sent to the customer. Possible values:
pending
sent
email_status
string
The delivery status of the email notification for the invoice sent to the customer. Possible values:
pending
sent
partial_payment
boolean
Indicates 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.
amount
integer
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 RMÂ 300.00, pass the value as 30000
.
amount_paid
integer
Amount paid by the customer against the invoice.
amount_due
integer
The remaining amount to be paid by the customer for the issued invoice.
currency
string
The currency associated with the invoice. Possible value: MYR
.
description
string
A brief description of the invoice. The maximum character length is 2048.
notes
object
Any custom notes added to the invoice. Maximum of 2048 characters.
short_url
string
The short URL that is generated. Share this link with customers to accept payments.
date
integer
Timestamp, in Unix format, that indicates the issue date of the invoice.
terms
string
Any terms to be included in the invoice. Maximum of 2048 characters.
comment
string
Any 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": "Gaurav Kumar",14"email": "gaurav.kumar@example.com",15"contact": "9977886633",16"billing_address": {17"id": "addr_DAtUWoxgu91obl",18"type": "billing_address",19"primary": true,20"line1": "318 C-Wing, Suyog Co. Housing Society Ltd.",21"line2": "T.P.S Road, Vazira, Borivali",22"zipcode": "400092",23"city": "Mumbai",24"state": "Maharashtra",25"country": "in"26},27"shipping_address": null,28"customer_name": "Gaurav Kumar",29"customer_email": "gaurav.kumar@example.com",30"customer_contact": "9977886633"31},32"order_id": null,33"line_items": [34{35"id": "li_DAweOizsysoJU6",36"item_id": null,37"name": "Book / English August - Updated name and quantity",38"description": "150 points in Quidditch",39"amount": 400,40"unit_amount": 400,41"gross_amount": 400,42"tax_amount": 0,43"taxable_amount": 400,44"net_amount": 400,45"currency": "MYR",46"type": "invoice",47"tax_inclusive": false,48"hsn_code": null,49"sac_code": null,50"tax_rate": null,51"unit": null,52"quantity": 1,53"taxes": []54},55{56"id": "li_DAwjWQUo07lnjF",57"item_id": null,58"name": "Book / A Wild Sheep Chase",59"description": null,60"amount": 200,61"unit_amount": 200,62"gross_amount": 200,63"tax_amount": 0,64"taxable_amount": 200,65"net_amount": 200,66"currency": "MYR",67"type": "invoice",68"tax_inclusive": false,69"hsn_code": null,70"sac_code": null,71"tax_rate": null,72"unit": null,73"quantity": 1,74"taxes": []75}76],77"payment_id": null,78"status": "draft",79"expire_by": 1567103399,80"issued_at": null,81"paid_at": null,82"cancelled_at": null,83"expired_at": null,84"sms_status": null,85"email_status": null,86"date": 1566891149,87"terms": null,88"partial_payment": false,89"gross_amount": 600,90"tax_amount": 0,91"taxable_amount": 600,92"amount": 600,93"amount_paid": null,94"amount_due": null,95"currency": "MYR",96"description": "This is a test invoice.",97"notes": {98"updated-key": "An updated note."99},100"comment": null,101"short_url": null,102"view_less": true,103"billing_start": null,104"billing_end": null,105"type": "invoice",106"group_taxes_discounts": false,107"created_at": 1566906474,108"idempotency_key": null109},110{111"id": "inv_DAul2TA6zodukS",112"entity": "invoice",113"receipt": null,114"invoice_number": null,115"customer_id": "cust_DAuFux32LnIsqJ",116"customer_details": {117"id": "cust_DAuFux32LnIsqJ",118"name": "Saurav Kumar",119"email": "saurav.kumar@example.com",120"contact": "9988776655",121"billing_address": {122"id": "addr_DAuFuz499I5mgk",123"type": "billing_address",124"primary": true,125"line1": "L-16, The Business Centre,",126"line2": "61, Wellfield Road",127"zipcode": "110001",128"city": "New Delhi",129"state": "Delhi",130"country": "in"131},132"shipping_address": null,133"customer_name": "Saurav Kumar",134"customer_email": "saurav.kumar@example.com",135"customer_contact": "9988776655"136},137"order_id": "order_DAul2V0vnGXIML",138"line_items": [139{140"id": "li_DAul2TuV4fhwd3",141"item_id": "item_DAqThJ7v09UO3n",142"name": "Magic Beans",143"description": "Beans that make you go kaput!",144"amount": 2000,145"unit_amount": 2000,146"gross_amount": 2000,147"tax_amount": 0,148"taxable_amount": 2000,149"net_amount": 2000,150"currency": "MYR",151"type": "invoice",152"tax_inclusive": false,153"hsn_code": null,154"sac_code": null,155"tax_rate": null,156"unit": null,157"quantity": 1,158"taxes": []159}160],161"payment_id": null,162"status": "cancelled",163"expire_by": null,164"issued_at": 1566899808,165"paid_at": null,166"cancelled_at": 1566973122,167"expired_at": null,168"sms_status": "sent",169"email_status": "sent",170"date": 1566994898,171"terms": "Updated terms and conditions for Acme Corp",172"partial_payment": false,173"gross_amount": 2000,174"tax_amount": 0,175"taxable_amount": 2000,176"amount": 2000,177"amount_paid": 0,178"amount_due": 2000,179"currency": "MYR",180"description": null,181"notes": [],182"comment": "Updated comment on the Invoice",183"short_url": "https://rzp.io/i/F7EPd9Q",184"view_less": true,185"billing_start": null,186"billing_end": null,187"type": "invoice",188"group_taxes_discounts": false,189"created_at": 1566899808,190"idempotency_key": null191}192]193}