Example: Creating an Invoice
Visa Platform ConnectAPI
Request
123456789101112{"invoiceInformation": { "description": "Food", "dueDate": "2019-07-11", "sendImmediately": true, "deliveryMode": "none" }, "orderInformation": { "amountDetails": { "totalAmount": "2623.64", "currency": "USD" } }}
Response to a Successful Request
12345678910111213141516171819202122232425262728293031323334353637383940{"_links": { "self": { "href": "/v2/invoices/98761", "method": "GET" }, "update": { "href": "/v2/invoices/98761", "method": "PUT" }, "deliver": { "href": "/v2/invoices/98761/delivery", "method": "POST" }, "cancel": { "href": "/v2/invoices/98761/cancelation", "method": "POST" } }, "id": "98761", "submitTimeUtc": "2024-08-02T18:39:57.548314337Z", "status": "CREATED", "processingInformation": { "requestPhone": false, "requestShipping": false }, "invoiceInformation": { "invoiceNumber": "98761", "description": "Food", "dueDate": "2019-07-11", "allowPartialPayments": false, "paymentLink": "https://businesscenter.cybersource.com/ebc2/invoicing/payInvoice/wzvrzUssiXFLJ2RcJcmbuQEoHSrlcQudy9dL91Jxo8n4VcoRhNWRp8wvVDz8xtlD?version=v2.1", "deliveryMode": "None" }, "orderInformation": { "amountDetails": { "totalAmount": 2623.64, "currency": "USD", "balanceAmount": 2623.64 } }}
Request
12345678910111213141516171819202122232425262728293031{"customerInformation": { "name": "Tanya Lee", "email": "tanya.lee@my-email.world" }, "invoiceInformation": { "dueDate": "2019-07-11", "sendImmediately": true, "deliveryMode": "none" }, "orderInformation": { "amountDetails": { "totalAmount": 293.5, "currency": "USD" }, "lineItems": [ { "productSku": "P653727383", "productName": "First line item's name", "unitPrice": 12.05, "quantity": 20, "totalAmount": 241 }, { "productSku": "P653727383", "productName": "First line item's name", "unitPrice": 5.25, "quantity": 10, "totalAmount": 52.5 } ] }}
Response to a Successful Request
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859{"_links": { "self": { "href": "/v2/invoices/98766", "method": "GET" }, "update": { "href": "/v2/invoices/98766", "method": "PUT" }, "deliver": { "href": "/v2/invoices/98766/delivery", "method": "POST" }, "cancel": { "href": "/v2/invoices/98766/cancelation", "method": "POST" } }, "id": "98766", "submitTimeUtc": "2024-08-03T00:02:49.453695409Z", "status": "CREATED", "customerInformation": { "name": "Tanya Lee", "email": "tanya.lee@my-email.world" }, "processingInformation": { "requestPhone": false, "requestShipping": false }, "invoiceInformation": { "invoiceNumber": "98766", "dueDate": "2019-07-11", "allowPartialPayments": false, "paymentLink": "/ebc2/invoicing/payInvoice/JBOA7CQeoSFuUluwLqw2c6n8rf0KCO0cgJz19uQmxO9rF5tT8FdNGRTL9OHapjlr?version=v2.1", "deliveryMode": "None" }, "orderInformation": { "amountDetails": { "totalAmount": 293.5, "currency": "USD", "balanceAmount": 293.5 }, "lineItems": [ { "productSku": "P653727383", "productName": "First line item's name", "unitPrice": 12.05, "quantity": 20, "totalAmount": 241 }, { "productSku": "P653727383", "productName": "First line item's name", "unitPrice": 5.25, "quantity": 10, "totalAmount": 52.5 } ] }}