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
Unique identifier for the payment.
Unique ID of the invoice payment in an external system for linking and
idempotency.
Timestamp when the payment was completed.
Payment method. Possible values are: CASH, CHECK, CREDIT_CARD, ACH,
CREDIT_BALANCE, OTHER
Fee paid by business for processing of payment in positive cents.
additional_fees
array of InvoicePaymentFee objects
Show InvoicePaymentFee properties
Optional description of the fee.
Amount of the fee in cents.
Whether or not the fee is passed to the customer. It is paid by the business otherwise.
When calculating the outstanding balance on the invoice, only the portion of each payment allocation that is applied to the invoice (excluding pass-through fees) is considered. This allows customers to pay the invoice amount plus any pass-through fees without the invoice being considered overpaid.
Customer payment amount, in cents.
Processor used to make the payment, if any.
Any processor name can be provided and will be tracked.
imported_at
ISO8601 timestamp
required
Timestamp when the payment was imported into Layer.
dedicated_refunds
array of CreateDedicatedRefundParams objects
tags
array of TagKeyValue objects
Tags to apply to the payment. Tags are key-value pairs that can be used to categorize and filter payments. Show TagKeyValue properties
The tag dimension key (e.g., “department”, “project”, “location”)
Optional display name for the tag dimension. If not specified, key will be displayed.
The tag value (e.g., “engineering”, “project-alpha”, “san-francisco”)
Optional display name for the tag value definition. If not specified, value will be displayed.
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. Show InvoicePaymentAllocation properties
ID of an invoice to which this payment is be applied.
ID of the payment this this allocation applies from.
Customer payment amount, in cents.
Unique identifier for the tag
Display name for the tag dimension
Display name for the tag value
ID of the tag value definition
created_at
ISO8601 timestamp
required
When the tag was created
updated_at
ISO8601 timestamp
required
When the tag was last updated
When the tag was archived
Unique identifier for the tag
Display name for the tag dimension
Display name for the tag value
ID of the tag value definition
created_at
ISO8601 timestamp
required
When the tag was created
updated_at
ISO8601 timestamp
required
When the tag was last updated
When the tag was archived
Memo for any text you would like to associate with the invoice payment (for example, to display to end users).
Arbitrary custom metadata in JSON format with a size limit of 1KB.
Any (typically user-visible) identifier you would like to associate with the invoice payment. Can be used to filter when listing invoice payment.
{
"data" : {
"type" : "Payment" ,
"id" : "e67c216b-28f4-4a0e-9a21-7f05c19e4c66" ,
"external_id" : "payment-1" ,
"at" : "2024-02-27T02:16:40.369432Z" ,
"method" : "CREDIT_CARD" ,
"fee" : 20 ,
"amount" : 90 ,
"processor" : "STRIPE" ,
"imported_at" : "2024-02-27T02:16:40.389772Z" ,
"allocations" : [
{
"invoice_id" : "57f0fada-bb56-4f3e-9afa-2a222b68009e" ,
"payment_id" : "e67c216b-28f4-4a0e-9a21-7f05c19e4c66" ,
"amount" : 90 ,
"transaction_tags" : [
{
"id" : "a1b2c3d4-e5f6-7890-abcd-ef1234567890" ,
"key" : "department" ,
"value" : "sales" ,
"dimension_display_name" : "Department" ,
"value_display_name" : "Sales Team" ,
"dimension_id" : "d1e2f3a4-b5c6-7890-abcd-ef1234567890" ,
"definition_id" : "f1e2d3c4-b5a6-7890-abcd-ef1234567890" ,
"created_at" : "2024-02-27T02:16:40.389772Z" ,
"updated_at" : "2024-02-27T02:16:40.389772Z" ,
"deleted_at" : null ,
"archived_at" : null
}
],
"metadata" : {}
}
],
"transaction_tags" : [
{
"id" : "a1b2c3d4-e5f6-7890-abcd-ef1234567890" ,
"key" : "department" ,
"value" : "sales" ,
"dimension_display_name" : "Department" ,
"value_display_name" : "Sales Team" ,
"dimension_id" : "d1e2f3a4-b5c6-7890-abcd-ef1234567890" ,
"definition_id" : "f1e2d3c4-b5a6-7890-abcd-ef1234567890" ,
"created_at" : "2024-02-27T02:16:40.389772Z" ,
"updated_at" : "2024-02-27T02:16:40.389772Z" ,
"deleted_at" : null ,
"archived_at" : null
}
],
"metadata" : {}
}
}
Optional: Create refunds with the invoice payment
This field can be specified when creating an invoice and any of its invoice line items or invoice payments
dedicated_refunds
array of CreateDedicatedRefundParams objects