REST API

Get Invoice Details

To get the details of a specific invoice, pass the invoice ID as a path parameter in the invoices resource.
Use the following resource to get the details of a specific invoice: 
  • Test:
    PUT https://
    https://apitest.cybersource.com
    /invoicing/v2/invoices/{id}
  • Live:
    PUT https://
    https://api.cybersource.com
    /invoicing/v2/invoices/{id}
  • Live in India:
    PUT https://api.in.cybersource.com/invoicing/v2/invoices/{id}
For more details, see the Get Invoice Details section of the interactive API Reference.
All
Cybersource
APIs require API authentication. See Getting Started with the REST API for details.

Request

To get the details of a specific invoice, pass the invoice ID as a path parameter.
Request example:
For invoice ID
A123456
:
GET https://
https://apitest.cybersource.com
/invoicing/v2/invoices/A123456

Response

A successful response contains the following invoice information:
  • submitTimeUtc
    — The date and time that the invoice was sent, in UTC format.
  • status
    — The invoice status. Possible values:
    • DRAFT
    • CREATED
    • SENT
    • PARTIAL
    • PAID
    • CANCELED
  • customerInformation
  • invoiceInformation
    • The
      paymentLink
      field contains the direct URL to the invoice.
  • orderInformation
  • invoiceHistory
    — An array of invoice status changes and the date and time stamp of each invoice status changed.
Response example:
If the request is successful, the API returns the details of the invoice.  
{ "submitTimeUtc": "2020-02-11T15:56:20Z", "status": "SENT", "customerInformation": { "name": "Tanya Lee", "email": "tanya.lee@my-email.world" }, "invoiceInformation": { "invoiceNumber": "A123456", "description": "This is a test invoice", "dueDate": "2019-07-11", "paymentLink": "
https://businesscenter.cybersource.com
/invoicing/payInvoice/ c7UI9Vz8rdhXbc8FdK6SaoeOATON4TQLhbd5lfib9UCyywvZLhIrSuYYNFMynMDd" }, "orderInformation": { "amountDetails": { "totalAmount": "2623.64", "currency": "USD", "balanceAmount": "2623.64", "discountAmount": "126.08", "discountPercent": "5", "subAmount": "2749.72", "taxDetails": { "type": "State Tax", "amount": "208.04", "rate": "8.25" }, "freight": { "amount": "20", "taxable": "true" } }, "lineItems": [{ "productSku": "P653727383", "productName": "First line item's name", "quantity": "21", "unitPrice": "120.08" }] }, "invoiceHistory": [{ "event": "CREATE", "date": "2020-02-10T06:51:51.91Z" }] }