{
   "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": [],
         "metadata": {}
       }
     ],
     "transaction_tags": [],
     "metadata": {}
   }
 }
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, CREDIT_BALANCE, OTHER
fee
integer
required
Fee paid by business for processing of payment in positive cents.
additional_fees
array of InvoicePaymentFee objects
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.
imported_at
ISO8601 timestamp
required
Timestamp when the payment was imported into Layer.
dedicated_refunds
array of CreateDedicatedRefundParams objects
List of Dedicated Refunds to create with this payment
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.
transaction_tags
Array of Tags
memo
string
Memo for any text you would like to associate with the invoice payment (for example, to display to end users).
metadata
object
Arbitrary custom metadata in JSON format with a size limit of 10KB.
reference_number
string
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": [],
         "metadata": {}
       }
     ],
     "transaction_tags": [],
     "metadata": {}
   }
 }