Create a loan payment
Records a payment against a loan, split into principal, interest, and fee portions. Identify the loan with either loan_id or loan_external_id.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The UUID of the business.
Body
The loan payment to create.
Parameters for recording a loan payment. Provide exactly one of loan_id or loan_external_id to identify the loan.
Total payment amount, in cents. Must equal the sum of the splits.
Date of the payment.
ID of the loan being paid. Provide this or loan_external_id.
External ID of the loan being paid. Provide this or loan_id.
Unique ID of the payment in your system for linking purposes.
Breakdown of the payment into principal, interest, and fee portions. Optional for MCA and flex loans: when omitted, Layer derives a PRINCIPAL/FEE split from the loan's fee_percentage (principal = amount / (1 + fee_percentage / 100), fee = remainder). Required for all other loan types. Provide explicit splits to override the derived ones.
If true, the payment is recorded but not posted to the ledger until it is paid out or its due date is reached.
Set to true when recording a historical payment that the loan's opening balance already reflects. The payment must be dated before the opening balance's effective_at (its date is evaluated as midnight US Eastern time at the start of the day). Layer increases the opening balance by the payment's principal portion and moves the opening balance's effective_at back to the payment date, so the explicit record replaces what the opening balance implied and the loan's balance is unchanged. Without this flag, payments dated before the opening balance's effective_at are rejected with a 400. Sending the flag when the loan has no active opening balance, or when the event is not dated before it, also fails with a 400.
Payment method. Defaults to OTHER.
CASH, CHECK, CREDIT_CARD, ACH, CREDIT_BALANCE, OTHER Payment processor, if any (e.g. stripe).
Override the clearing account used for the payment. Defaults based on method.
- Account ID
- Account Stable Name
Internal note about the payment.
Arbitrary JSON object you can attach for your own use. Layer stores and returns it unchanged.
Reference number for the payment.
Response
Loan payment created successfully.
A payment made against a loan, broken down into principal, interest, and fee splits.