Skip to main content
POST

Path Parameters

string
ID of the Business the invoice is associated with.

Body

string
required
External ID for the invoice within your platform. Idempotency key.
ISO8601 timestamp
required
When the invoice was sent by the business to the recipient.
ISO8601 timestamp
When the invoice is due.
ISO8601 timestamp
When the invoice was voided. Voiding excludes the invoice entirely from accounting.
string
Number for the invoice for display to end-users.
string
ID of the Customer the invoice is associated with. Either the customer_id or the customer_external_id must be provided.
string
External ID of the Customer the invoice is associated with. Either the customer_id or the customer_external_id must be provided.A customer does not need to be created before creating an invoice. When you provide a customer external id, Layer will create a customer object with the provided external id if it does not already exist. Customer details can be updated later using the Update a customer endpoint.
false
Any text you would like to associate with the invoice (for example, to display to end users)
array of InvoiceLineItem objects
required
Line items making up the invoice.
integer
Additional discount applied to the whole invoice in addition to individual line items.
array of TaxLineItem objects
List of sales tax obligations on this line item.
integer
Tips included by the buyer, in cents.
object
The Account Identifier for a tips account. If not specified, tips will be attributed to the Chart of Account’s default tips account, default a liability account. Alternate accounts can be specified in case tips should be tracked as revenue.
array of InvoicePayment objects
Payments that have been made towards the balance of the invoice.
array of TagKeyValue objects
json object
Arbitrary metadata you can include with the invoice

Response

Returns the created Invoice Object

Optional: Create a Paid invoice

You can specify an invoice as immediately paid by including InvoicePayment object(s) in the payments field of the invoice. This allows you to create and invoice and specify the full payment information in a single API call. This is equivalent to creating an invoice and then creating a payment fully allocated to that invoice.

InvoicePayment parameters

string
required
External ID for the invoice within your platform. Idempotency key.
enum
required
Method used to make the payment. Values can be: CASH, CHECK, CREDIT_CARD, ACH, CREDIT_BALANCE, OTHER
integer
Fee associated with processing a payment, e.g. credit card processing fees, in cents.
array of InvoicePaymentFee objects
integer
Value of the payment, in cents. If blank, this is assumed to be the entire total of the invoice.

Optional: Create refunds with the invoice

This field can be specified when creating an invoice and any of its invoice line items or invoice payments
array of CreateDedicatedRefundParams objects
List of Dedicated Refunds to create with this payment