Create Deliverable Draft Invoice
Drafting an invoice creates an unpublished invoice that is viewable only by the merchant. To draft an invoice that will be delivered to the customer in an email message when you publish it, set the invoiceInformation.deliveryMode request field to email. When you are ready to publish and share the invoice with a customer, you can send the follow-on send invoice request. The customer then receives an email with the invoice and the invoice status updates from DRAFT to SENT.
Itemized Invoices: An invoice can display a single billed amount or list up to 30 billed items. To list the billed items in the invoice, include the items in the request using the line item array fields. An invoice with line items is known as an itemized invoice.
Invoice Numbers: You can assign a unique invoice number in the invoiceInformation.invoiceNumber request field. The invoice number is required for follow-on API requests and tracking. You should store the invoice number in your system so that you can optimally perform the follow-on requests. If you do not include a unique invoice number when creating an invoice, generates a unique invoice number for you in the invoiceInformation.invoiceNumber response field.
Installment Payments: Invoices can be paid in installment payments when these fields and values are included in the request. If an invoice is payable in installments, multiple customers can make payments towards the same invoice.
- Set
invoiceInformation.allowPartialPaymentstotrue. - Set
orderInformation.amountDetails.minimumPartialAmountto the minimum amount allowed for a partial payment.
Partner Information: If your merchant account is associated with a partner, you can include your partner solution ID (PSID) in the request message for tracking and reporting purposes. To include your PSID, use the clientReferenceInformation.partner.solutionId request field and set its field value to your PSID.
A successfully drafted invoice is indicated by the DRAFT status in the status response field.
The redirect URL generated in the invoiceInformation.paymentLink response field is usable only by the merchant, not the customer.
Follow-on operations: Send Invoice, Update Invoice, Cancel Invoice, Get Invoice Details, Get Invoices
Draft an In-Person Invoice
Endpoint
POST /invoicing/v2/invoices
POST /invoicing/v2/invoices
POST /invoicing/v2/invoices
Example
{ "customerInformation": { "name": "Tanya Lee", "email": "[email protected]" }, "invoiceInformation": { "dueDate": "2019-07-11", "sendImmediately": false, "deliveryMode": "email" }, "orderInformation": { "amountDetails": { "totalAmount": "241.00", "currency": "USD" }, "lineItems": [ { "productSku": "P653727383", "productName": "First line item's name", "quantity": 20, "unitPrice": 12.05, "totalAmount": 241.00 } ] }}{ "_links": { "self": { "href": "/v2/invoices/2669", "method": "GET" }, "update": { "href": "/v2/invoices/2669", "method": "PUT" }, "deliver": { "href": "/v2/invoices/2669/delivery", "method": "POST" }, "cancel": { "href": "/v2/invoices/2669/cancelation", "method": "POST" } }, "id": "2669", "submitTimeUtc": "2024-07-24T18:24:36.153361386Z", "status": "DRAFT", "customerInformation": { "name": "Tanya Lee", "email": "[email protected]" }, "processingInformation": { "requestPhone": false, "requestShipping": false }, "invoiceInformation": { "invoiceNumber": "2669", "dueDate": "2019-07-11", "allowPartialPayments": false, "deliveryMode": "Email" }, "orderInformation": { "amountDetails": { "totalAmount": 241.00, "currency": "USD", "balanceAmount": 241.00 }, "lineItems": [ { "productSku": "P653727383", "productName": "First line item's name", "unitPrice": 12.05, "quantity": 20, "totalAmount": 241.00 } ] }}Required Fields
| Field | Type | Description |
|---|---|---|
invoiceInformation.deliveryMode | string | Set to one of these possible values to determine whether the invoice is emailed to the customer when you send a send invoice request: email: an invoice email is sent to the customer when you send the follow-on send invoice request for this invoice draft. The invoice status updates to SENT. none: when you process a follow-on send invoice request to publish the drafted invoice, the invoice is not sent in an email to the customer. To share the invoice with the customer, send the customer the redirect URL in the invoiceInformation.paymentLink response field. The invoice updates change to CREATED. |
invoiceInformation.description | string | Customer-facing description of the invoice. Optional when orderInformation.lineItems[] fields are included. |
invoiceInformation.dueDate | string | The date payment is due. Format: YYYY-MM-DD. |
invoiceInformation.sendImmediately | boolean | Set to false. |
orderInformation.amountDetails.currency | string | The ISO 4217 three-letter currency code for the invoice. |
orderInformation.amountDetails.totalAmount | string | The total charge amount for the invoice, as a decimal string. |
Draft an Email Invoice
Endpoint
POST /invoicing/v2/invoices
POST /invoicing/v2/invoices
POST /invoicing/v2/invoices
Required Fields
| Field | Type | Description |
|---|---|---|
customerInformation.email | string | Customer's email address. The invoice is sent to this address. |
customerInformation.name | string | Customer's full name as it appears on the invoice. |
invoiceInformation.deliveryMode | string | Set to email. |
invoiceInformation.description | string | Customer-facing description of the invoice. Optional when orderInformation.lineItems[] fields are included. |
invoiceInformation.dueDate | string | The date payment is due. Format: YYYY-MM-DD. |
invoiceInformation.sendImmediately | boolean | Set to false. |
orderInformation.amountDetails.currency | string | The ISO 4217 three-letter currency code for the invoice. |
orderInformation.amountDetails.totalAmount | string | The total charge amount for the invoice, as a decimal string. |
Draft an Invoice with Line Items
Endpoint
POST /invoicing/v2/invoices
POST /invoicing/v2/invoices
POST /invoicing/v2/invoices
Example
{ "customerInformation": { "name": "Tanya Lee", "email": "[email protected]" }, "invoiceInformation": { "dueDate": "2019-07-11", "sendImmediately": false, "deliveryMode": "email" }, "orderInformation": { "amountDetails": { "totalAmount": 293.5, "currency": "USD" }, "lineItems": [ { "productSku": "P653727383", "productName": "First line item's name", "unitPrice": 12.05, "quantity": 20, "totalAmount": 241 }, { "productSku": "P987654321", "productName": "Second line item's name", "unitPrice": 5.25, "quantity": 10, "totalAmount": 52.5 } ] }}{ "_links": { "self": { "href": "/v2/invoices/98765", "method": "GET" }, "update": { "href": "/v2/invoices/98765", "method": "PUT" }, "deliver": { "href": "/v2/invoices/98765/delivery", "method": "POST" }, "cancel": { "href": "/v2/invoices/98765/cancelation", "method": "POST" } }, "id": "98765", "submitTimeUtc": "2024-08-02T22:18:24.341304588Z", "status": "DRAFT", "customerInformation": { "name": "Tanya Lee", "email": "[email protected]" }, "processingInformation": { "requestPhone": false, "requestShipping": false }, "invoiceInformation": { "invoiceNumber": "98765", "dueDate": "2019-07-11", "allowPartialPayments": false, "deliveryMode": "Email" }, "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": "P987654321", "productName": "Second line item's name", "unitPrice": 5.25, "quantity": 10, "totalAmount": 52.5 } ] }}Required Fields
| Field | Type | Description |
|---|---|---|
customerInformation.email | string | Customer's email address. The invoice is sent to this address. |
customerInformation.name | string | Customer's full name as it appears on the invoice. |
invoiceInformation.deliveryMode | string | Set to one of these possible values to determine whether the invoice is emailed to the customer when you send a send invoice request: email: an invoice email is sent to the customer when you send the follow-on send invoice request for this invoice draft. The invoice status changes to SENT. none: when you process a follow-on send invoice request to publish the drafted invoice, the invoice is not sent in an email to the customer. To share the invoice with the customer, send the customer the redirect URL in the invoiceInformation.paymentLink response field. The invoice status changes to CREATED. |
invoiceInformation.dueDate | string | The date payment is due. Format: YYYY-MM-DD. |
invoiceInformation.sendImmediately | boolean | Set to false. |
orderInformation.amountDetails.currency | string | The ISO 4217 three-letter currency code for the invoice. |
orderInformation.amountDetails.totalAmount | string | The total charge amount for the invoice, as a decimal string. |
orderInformation.lineItems[].productName | string | The display name of the line item as it appears on the invoice. |
orderInformation.lineItems[].productSku | string | The stock-keeping unit identifier for this line item. |
orderInformation.lineItems[].quantity | integer | The number of units for this line item. |
orderInformation.lineItems[].totalAmount | number | The total amount for this line item. |
orderInformation.lineItems[].unitPrice | number | The price per unit for this line item. |
Optional Fields
You can include these optional fields when sending create invoice requests:
Optional Fields
| Field | Type | Description |
|---|---|---|
clientReferenceInformation.partner.developerId | string | Set to your developer ID. |
clientReferenceInformation.partner.solutionId | string | Set to your partner solution ID (PSID). |
customerInformation.company.name | string | Customer's company name as it appears on the invoice. |
customerInformation.email | string | Customer's email address. |
customerInformation.merchantCustomerId | string | Your identifier for this customer in your system. |
customerInformation.name | string | Customer's full name as it appears on the invoice. |
invoiceInformation.allowPartialPayments | boolean | Set to one of these possible values: false: the invoice must be paid in a single payment. true: the invoice is payable in installments. |
invoiceInformation.deliveryMode | string | Set to email to email the invoice to the customer, or none to create a payable link without sending an email. |
invoiceInformation.description | string | This field is optional when the line item fields are present in the request message. |
invoiceInformation.expirationDate | string | Set to the expiration date. Format: YYYY-MM-DD. The invoice expires on this date at 00:00 UTC. |
invoiceInformation.invoiceNumber | string | Set to a unique number to create an invoice number. If you do not include this field and a unique value, the invoicing API automatically generates an invoice number for the new invoice. You cannot update this invoice number after sending the API request. |
merchantDefinedFieldValues.definition id[].value | string | Value for a merchant-defined custom field. |
orderInformation.amountDetails.freight.amount | number | Freight or shipping amount added to the invoice total. |
orderInformation.amountDetails.freight.taxable | boolean | Set to true if freight is subject to tax. |
orderInformation.amountDetails.freight.taxRate | number | Tax rate applied to the freight amount. |
orderInformation.amountDetails.minimumPartialAmount | number | The minimum amount allowed for a single installment payment. Only applies when allowPartialPayments is true. |
orderInformation.amountDetails.subAmount | number | The subtotal before discounts or tax adjustments. |
Thanks for your feedback!
Last published: September 29, 2026