REST API

Send an Invoice

You can send an invoice in draft or created mode or resend a sent or partially paid invoice. Fully paid or canceled invoices cannot be resent.
Use the following resource to send or resend an invoice: 
Sandbox:
POST https://apitest.cybersource.com/invoicing/v2/invoices/{id}/delivery
Live:
POST https://api.cybersource.com/invoicing/v2/invoices/{id}/delivery
Live in India:
POST https://api.in.cybersource.com/invoicing/v2/invoices/{id}/delivery
For more details, see the Send an Invoice section of the interactive API Reference.
Note:
All CyberSource APIs require API authentication. See Authentication for details.

Request

To send an invoice, pass the invoice ID as a path parameter.
Request example:
POST https://apitest.cybersource.com/invoicing/v2/invoices/{id}/delivery

Response

If the request is successful, the API sends or resends the invoice and updates
submitTimeUtc
.
The API also sets the invoice
status
depending on:
  1. The invoice's current status
  2. The value you set for the
    deliveryMode
    field when you created or last updated the invoice.
The following table details the invoice delivery actions and how the invoice status changes after you send the invoice:
Invoice's original status
Value of deliveryMode
After you make an invoices/{id}/delivery request
DRAFT
email
Emails the invoice to the customer and changes the invoice status to
SENT
DRAFT
none
Does not email the invoice and changes the status to
CREATED
. You can view the invoice at the URL returned in the
invoiceInformation.paymentLink
response field. You can choose to provide your customers with this direct link to the invoice.
CREATED
email
Emails the invoice to the customer and changes the invoice status to
SENT
SENT
email
Resends the invoice to the customer and the invoice status remains
SENT
PARTIAL
email
Emails the invoice to the customer and the invoice status remains
PARTIAL
The response also includes the invoice details,
_links
and
_supportedActions
.
  1. Links
    • To get the invoice details again, use the
      self
      link path:
      https://apitest.cybersource.com/v2/invoices/A123456
  2. Supported Actions
    • 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.
    • Use the
      cancelation
      action to cancel an invoice. See Cancel an Invoice for details.
    • 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/A123456", "method": "GET" } }, "_supportedActions": [{ "href": "/invoicing/v2/invoices/A123456/delivery", "method": "POST" }, { "href": "/invoicing/v2/invoices/A123456/cancelation", "method": "POST" }, { "href": "/invoicing/v2/invoices/A123456", "method": "PUT" }], "id": "A123456",
"submitTimeUtc": "2020-02-11T06:32:06Z"
,
"status": "SENT"
, "customerInformation": { "name": "Tanya Lee", "email": "[email protected]" }, "invoiceInformation": { "invoiceNumber": "A123456", "description": "This is a test invoice", "dueDate": "2019-07-11", "paymentLink": "https://businesscenter.cybersource.com/ebc2/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.00", "taxable": "true" } }, "lineItems": [{ "productSku": "P653727383", "productName": "First line item's name", "quantity": "21", "unitPrice": "120.08" }] }
For more details, see the Send an Invoice section of the interactive API Reference.