Invoice payments represent payments made by customers of a business. Payments may be made at any time and applied to any outstanding (sent, but not fully paid) invoice.

Attributes

id
string
required

Unique identifier for the payment.

external_id
string

Unique ID of the invoice payment in an external system for linking and idempotency.

at
string
required

Timestamp when the payment was completed.

method
enum
required

Payment method. Possible values are: CASH, CHECK, CREDIT_CARD, ACH, REDEEMED_PREPAYMENT, OTHER

fee
integer
required

Fee paid by business for processing of payment in positive cents.

amount
integer
required

Customer payment amount, in cents.

processor
string

Processor used to make the payment, if any. Any processor name can be provided and will be tracked. Supported processors (STRIPE, SHOPIFY) will have additional asset balance tracking.

imported_at
ISO8601 timestamp
required

Timestamp when the payment was imported into Layer.

allocations
array of InvoicePaymentAllocation objects
required

Invoice allocations allow specifying a payment to be for multiple invoices. Most commonly the full payment will be allocated to a single invoice, but any number of allocations are allowed. The sum of all allocations must be equal to the payment amount.