On This Page
Example: Updating an Invoice
Endpoint to Update an Invoice
https://api.cybersource.com/invoicing/v2/invoices/98761
Request
{ "customerInformation": { "name": "Tanya Lee", "email": "tanya.lee@my-email.world" }, "invoiceInformation": { "dueDate": "2019-07-15" }, "orderInformation": { "amountDetails": { "totalAmount": "2623.64", "currency": "USD" }, "lineItems": [ { "productSku": "P653727383", "productName": "First line item's name", "quantity": "20", "unitPrice": "12.05", "totalAmount": "247.86" } ] } }
Response to a Successful Request
{ "_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", "submitTimeUtc": "2024-07-24T19:40:37.289869220Z", "status": "SENT", "customerInformation": { "name": "Tanya Lee", "email": "tanya.lee@my-email.world" }, "processingInformation": { "requestPhone": false, "requestShipping": false }, "invoiceInformation": { "invoiceNumber": "2670", "dueDate": "2019-07-15", "allowPartialPayments": false, "paymentLink": "https://businesscenter.cybersource.com/ebc2/invoicing/payInvoice/W447tdnINi5t5wu6QA0KUE2HYWY2rQQ0zXL5b5z6M50w4Ea9FFlcYrEmp09pFlzl?version=v2.1", "deliveryMode": "Email" }, "orderInformation": { "amountDetails": { "totalAmount": 2623.64, "currency": "USD", "balanceAmount": 2623.64 }, "lineItems": [ { "productSku": "P653727383", "productName": "First line item's name", "unitPrice": 12.05, "quantity": 20, "totalAmount": 247.86 } ] } }
Request with Optional Fields
{ "customerInformation": { "name": "Tanya Lee", "email": "tanya.lee@my-email.world", "merchantCustomerId": "1234", "company": { "name": "ABC" } }, "invoiceInformation": { "description": "This is an updated test invoice", "dueDate": "2019-07-15", "allowPartialPayments": true, "deliveryMode": "none" }, "orderInformation": { "amountDetails": { "totalAmount": "2623.64", "currency": "USD", "discountAmount": "126.08", "discountPercent": 5, "subAmount": 2749.72, "minimumPartialAmount": 200, "taxDetails": { "type": "State Tax", "amount": "208.00", "rate": "8.25" }, "freight": { "amount": "20.00", "taxable": true, "taxRate": "0.01" } }, "lineItems": [ { "productSku": "P653727383", "productName": "First line item's name", "quantity": "20", "unitPrice": "12.05", "discountAmount": "13.04", "discountRate": "0.0", "taxAmount": "0.0", "taxRate": "0.0", "totalAmount": "247.86" } ] } }
Response to a Successful Request with Optional Fields
{ "_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", "submitTimeUtc": "2024-07-24T19:46:18.914132825Z", "status": "SENT", "customerInformation": { "name": "Tanya Lee", "email": "tanya.lee@my-email.world", "merchantCustomerId": "1234", "company": { "name": "ABC" } }, "processingInformation": { "requestPhone": false, "requestShipping": false }, "invoiceInformation": { "invoiceNumber": "2670", "description": "This is an updated test invoice", "dueDate": "2019-07-15", "allowPartialPayments": true, "paymentLink": "https://businesscenter.cybersource.com/ebc2/invoicing/payInvoice/W447tdnINi5t5wu6QA0KUE2HYWY2rQQ0zXL5b5z6M50w4Ea9FFlcYrEmp09pFlzl?version=v2.1", "deliveryMode": "None" }, "orderInformation": { "amountDetails": { "totalAmount": 2623.64, "currency": "USD", "balanceAmount": 2623.64, "discountAmount": 126.08, "discountPercent": 5, "subAmount": 2749.72, "minimumPartialAmount": 200, "taxDetails": { "type": "State Tax", "amount": 208, "rate": 8.25 }, "freight": { "amount": 20, "taxable": true, "taxRate": 0.01 } }, "lineItems": [ { "productSku": "P653727383", "productName": "First line item's name", "unitPrice": 12.05, "quantity": 20, "discountAmount": 13.04, "taxAmount": 0, "taxRate": 0, "totalAmount": 247.86 } ] } }