On This Page
Send an Invoice
If you created an invoice that was not immediately delivered to the customer, you can use the
send an invoice
request to have Cybersource
email the invoice to the
customer. You can also use this request to resend an updated, unpaid, or a partially paid
invoice. Fully paid or cancelled invoices cannot be resent. Endpoints
Send your API request message to one of these endpoints. The
is the invoice number from the response to the create invoice request.
{id}
Test:
POST
https://apitest.cybersource.com
/invoicing/v2/invoices/{id}
/deliveryProduction:
POST
https://api.cybersource.com
/invoicing/v2/invoices/{id}
/deliveryIndia Production:
POST
https://api.in.cybersource.com/invoicing/v2/invoices/
{id}
/deliverySuccessful Response
A successful request is indicated by an updated submit time in the
submitTimeUtc
response field.The invoice status in the
status
response field might update to a new
status depending on the field value that was set in the
invoiceInformation.deliveryMode
request field when the invoice was
initially created.Use this table to determine how an invoice's status will change when you send or resend it.
The Initial Status column indicates the invoice's initial status, which was in the
status
response field. The Delivery Method column indicates whether or
not the customer was immediately emailed when the invoice was created, which was determined
by the invoiceInformation.deliveryMode
field value. The Notification
Description column explains what happens to an invoice when you submit a send invoice
request, which is the result of the invoice's initial status and whether or not it was
emailed to the customer. The New Status column indicates the new status of the invoice after
you submit a send invoice request, which can be found in the status
response field.Initial Status | Delivery Method | Notification Description | New Status |
|---|---|---|---|
DRAFT | email | An invoice email is sent to the customer. | SENT |
DRAFT | none | The customer is not sent an invoice email. To share the newly created
invoice with the customer, send the customer the redirect URL generated in the
invoiceInformation.paymentLink response field. | CREATED |
CREATED | email | An invoice email is sent to the customer. | SENT |
SENT | email | An invoice email is resent to the customer. | SENT |
PARTIAL | email | An invoice email is sent to the customer. | PARTIAL |
Example: Send an Invoice
Endpoint with an Invoice Number
https://api.cybersource.com/invoicing/v2/invoices/2675/delivery
Request
{}
Response to a Successful Request
{ "_links": { "self": { "href": "/v2/invoices/2675", "method": "GET" }, "update": { "href": "/v2/invoices/2675", "method": "PUT" }, "deliver": { "href": "/v2/invoices/2675/delivery", "method": "POST" }, "cancel": { "href": "/v2/invoices/2675/cancelation", "method": "POST" } }, "id": "2675", "submitTimeUtc": "2024-07-24T19:54:06.665139633Z", "status": "CREATED", "customerInformation": { "name": "Tanya Lee", "email": "tanya.lee@my-email.world", "merchantCustomerId": "1234", "company": { "name": "ABC" } }, "processingInformation": { "requestPhone": false, "requestShipping": false }, "invoiceInformation": { "invoiceNumber": "2675", "description": "This is a test invoice", "dueDate": "2019-07-11", "allowPartialPayments": true, "paymentLink": "https://developer.cybersource.com/ebc2/invoicing/payInvoice/9fO0CogtSMJiDO3VKR4GYijUSYHtKV4kjS6u0ENZpY9iq2pkdKJmwTTSlGCDOVHJ?version=v2.1", "deliveryMode": "None" }, "orderInformation": { "amountDetails": { "totalAmount": 2623.64, "currency": "USD", "balanceAmount": 2623.64, "discountAmount": 126.08, "discountPercent": 5, "subAmount": 2749.72, "minimumPartialAmount": 20, "taxDetails": { "type": "State Tax", "amount": 208, "rate": 8.25 }, "freight": { "amount": 20, "taxable": true } }, "lineItems": [ { "productSku": "P653727383", "productName": "First line item's name", "unitPrice": 12.05, "quantity": 20, "discountAmount": 13.04, "taxAmount": 0, "taxRate": 0, "totalAmount": 247.86 } ] } }