Example: Cancelling an Invoice

Light Dark
Endpoint with an Invoice Number
1
https://apitest.cybersource.com/invoicing/v2/invoices/2675/cancelation
Request
1
{}
Response to a Successful Request
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
{"_links": { "self": { "href": "/v2/invoices/2675", "method": "GET" } }, "id": "2675", "submitTimeUtc": "2024-07-24T19:56:06.410896558Z", "status": "CANCELED", "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, "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 } ] }}