Get a List of Invoices

You can retrieve a list of your invoices by sending a get invoice list request. To filter the list results, you can add an optional string of query parameters to the endpoint. Filtering list results can help you retrieve specific invoices faster.
You can filter invoices by:
  • Number of invoices retrieved
  • Order of invoices
  • Status

Endpoints

Send your API request to one of these endpoints:
Test:
 
GET
https://apitest.cybersource.com
/invoicing/v2/invoices
Production:
 
GET
https://api.cybersource.com
/invoicing/v2/invoices
Production in India:
 
GET https://api.in.cybersource.com/invoicing/v2/invoices

Generate an Endpoint with Query Parameters

You can filter your search results by appending an optional string of query parameters to the endpoint. A query parameter is also known as a
query-string
.
Begin each string with a question mark (
?
) to designate the start of the query parameters, and include an ampersand (
&
) at the beginning of each consecutive query parameter.
Use this format for appending a string of query parameters as name-value pairs:
?name1=value&name2=value&nameN=value
These are the query parameters to filter the retrieved list results:
Query Parameters
Query Parameter
Description
offset
The page offset number. This determines the order in which the invoices are retrieved, beginning with the consecutive number from the string value. For example, an offset of
3
results in a filtered list that begins with the fourth listed invoice.
Set to a whole number.
limit
The maximum number of items being retrieved.
Set to a whole number.
status
The status of the invoice.
Set to one of these possible values:
  • CANCELED
  • CREATED
  • DRAFT
  • PAID
  • PARTIAL
  • PENDING
    : The customer has initiated a payment for an invoice that is in the
    CREATED
    ,
    SENT
    , or
    PARTIAL
    status. The invoice can no longer be edited, and the customer can no longer initiate an payment in order to avoid a double payment. If the invoice payment requires a fraud review, the invoice will remain in the
    PENDING
    status until you approve or reject it.
  • SENT
In this example, up to 100 draft invoices are retrieved beginning with the fourth listed invoice:
GET https://apitest.cybersource.com/invoicing/v2/invoices?offset=3&limit=100&status=DRAFT

Example: Get a List of Invoices

REST Interactive Example: Get a List of Invoices

Click this image to access the interactive code example for retrieving a list of invoices.

Figure:

Interactive Code
Image and link to the interactive code example for creating a new
                            invoice.
Light Dark
Endpoint with Optional Query Parameters
1
GET://apitest.cybersource.com/invoicing/v2/invoices?offset=0&limit=5&status=DRAFT
Request
1
{}
Response to a Successful Request
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
{"_links": { "self": { "href": "/v2/invoices/?offset=0&limit=5", "method": "GET" }, "next": { "href": "/v2/invoices/?offset=5&limit=5", "method": "GET" } }, "submitTimeUtc": "2024-07-24T18:44:11.469054445Z", "totalInvoices": 38449, "invoices": [ { "_links": { "self": { "href": "/v2/invoices/2670", "method": "GET" }, "update": { "href": "/v2/invoices/2670", "method": "PUT" }, "deliver": { "href": "/v2/invoices/2670/delivery", "method": "POST" }, "cancel": { "href": "/v2/invoices/2670/cancelation", "method": "POST" } }, "id": "2670", "status": "SENT", "customerInformation": { "name": "Tanya Lee" }, "invoiceInformation": { "dueDate": "2019-07-11", "paymentLink": "https://developer.cybersource.com/ebc2/invoicing/payInvoice/W447tdnINi5t5wu6QA0KUE2HYWY2rQQ0zXL5b5z6M50w4Ea9FFlcYrEmp09pFlzl?version=v2.1" }, "orderInformation": { "amountDetails": { "totalAmount": 247.86, "currency": "USD" } } }, { "_links": { "self": { "href": "/v2/invoices/2669", "method": "GET" }, "update": { "href": "/v2/invoices/2669", "method": "PUT" }, "deliver": { "href": "/v2/invoices/2669/delivery", "method": "POST" }, "cancel": { "href": "/v2/invoices/2669/cancelation", "method": "POST" } }, "id": "2669", "status": "DRAFT", "customerInformation": { "name": "Tanya Lee" }, "invoiceInformation": { "dueDate": "2019-07-11" }, "orderInformation": { "amountDetails": { "totalAmount": 247.86, "currency": "USD" } } }, { "_links": { "self": { "href": "/v2/invoices/2668", "method": "GET" }, "update": { "href": "/v2/invoices/2668", "method": "PUT" }, "deliver": { "href": "/v2/invoices/2668/delivery", "method": "POST" }, "cancel": { "href": "/v2/invoices/2668/cancelation", "method": "POST" } }, "id": "2668", "status": "DRAFT", "customerInformation": { "name": "Tanya Lee" }, "invoiceInformation": { "dueDate": "2019-07-11" }, "orderInformation": { "amountDetails": { "totalAmount": 2623.64, "currency": "USD" } } }, { "_links": { "self": { "href": "/v2/invoices/2667", "method": "GET" }, "update": { "href": "/v2/invoices/2667", "method": "PUT" }, "deliver": { "href": "/v2/invoices/2667/delivery", "method": "POST" }, "cancel": { "href": "/v2/invoices/2667/cancelation", "method": "POST" } }, "id": "2667", "status": "DRAFT", "customerInformation": { "name": "Tanya Lee" }, "invoiceInformation": { "dueDate": "2019-07-11" }, "orderInformation": { "amountDetails": { "totalAmount": 2623.64, "currency": "USD" } } }, { "_links": { "self": { "href": "/v2/invoices/2666", "method": "GET" }, "update": { "href": "/v2/invoices/2666", "method": "PUT" }, "deliver": { "href": "/v2/invoices/2666/delivery", "method": "POST" }, "cancel": { "href": "/v2/invoices/2666/cancelation", "method": "POST" } }, "id": "2666", "status": "CREATED", "customerInformation": { "name": "Tanya Lee" }, "invoiceInformation": { "dueDate": "2019-07-11", "paymentLink": "https://developer.cybersource.com/ebc2/invoicing/payInvoice/i0wUKECHxctWAjRPKFgyEtZiSWxwgtZljBVSrxfFjbBVGgLpET8ROvOPdnhwCJTC?version=v2.1" }, "orderInformation": { "amountDetails": { "totalAmount": 2623.64, "currency": "USD" } } } ]}