Menu

Get Invoice List

To get a list of your invoices, send a request to the invoices resource. You can use query parameters to filter the results.  
Use the following resource to get a list of your invoices:  
Sandbox:
 
GET https://apitest.cybersource.com/invoicing/v2/invoices
Live:
 
GET https://api.cybersource.com/invoicing/v2/invoices
Live in India:
 
GET https://api.in.cybersource.com/invoicing/v2/invoices
For more details, see the Get a List of Invoices section of the interactive API Reference.
Note:
 All CyberSource APIs require API authentication. See Authentication for details. 

Request

Filter the list of invoices by these query string parameters: 
  1. offset
     — Page offset number.
  2. limit
     — Maximum number of items you would like returned.
  3. status
     — The status of the invoice. Possible values:
    • DRAFT
    • CREATED
    • SENT
    • PARTIAL
    • PAID
    • CANCELED
Request example:
 
To return up to 100 of your draft invoices, set the 
limit
 query parameter to 
100
 and 
status
 to 
DRAFT
. See the following example: 
GET https://apitest.cybersource.com/invoicing/v2/invoices?offset=0&limit=100&status=DRAFT

Response

If the request is successful, the API returns your list of invoices. The response also includes 
_links
 and 
_supportedActions
 for each of your invoices.  
  1. Links
    • To get the list of invoices again, use the overall 
      self
       link path:
      https://apitest.cybersource.com/invoicing/v2/invoices?offset=0&limit=100&status=DRAFT
    • To get the details of a specific invoice, use that invoice's 
      self
       link path:
      https://apitest.cybersource.com/invoicing/v2/invoices/A123457
  2. Supported Actions
    • Send — Use the 
      delivery
       action to send a draft or created invoice or to resend a sent or partially paid invoice. Paid or canceled invoices cannot be resent at this time. See Send an Invoice for details.
    • Cancelation — Use the 
      cancelation
       action to cancel an invoice. See Cancel an Invoice for details.
    • Update — Use the 
      PUT
       HTTP method to update an invoice as long as no payment has been made on the invoice. See Update an Invoice for details.
Response example:
{ "_links": { "self": { "href": "/invoicing/v2/invoices/?offset=0&limit=100&status=DRAFT", "method": "GET" } }, "submitTimeUtc": "2020-02-11T03:51:40Z", "totalInvoices": 2, "invoices": [{ "_links": { "self": { "href": "/invoicing/v2/invoices/A123457", "method": "GET" } }, "_supportedActions": [{ "href": "/invoicing/v2/invoices/A123457/delivery", "method": "POST" }, { "href": "/invoicing/v2/invoices/A123457", "method": "PUT" }, { "href": "/invoicing/v2/invoices/A123457/cancelation", "method": "POST" }], "id": "A123457", "status": "DRAFT", "customerInformation": { "name": "Mary Smith" }, "invoiceInformation": { "dueDate": "2020-02-28" }, "orderInformation": { "amountDetails": { "totalAmount": "500.00", "currency": "USD" } } },{ "_links": { "self": { "href": "/invoicing/v2/invoices/A123458", "method": "GET" } }, "_supportedActions": [{ "href": "/invoicing/v2/invoices/A123458/delivery", "method": "POST" }, { "href": "/invoicing/v2/invoices/A123458", "method": "PUT" }, { "href": "/invoicing/v2/invoices/A123458/cancelation", "method": "POST" }], "id": "A123458", "status": "DRAFT", "customerInformation": { "name": "John Morgan" }, "invoiceInformation": { "dueDate": "2020-03-15" }, "orderInformation": { "amountDetails": { "totalAmount": "750.00", "currency": "USD" } } }] }
For more details, see the Get a List of Invoices section of the interactive API Reference.
Back to top