Skip to main content
POST
Create a loan payment

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

businessId
string<uuid>
required

The UUID of the business.

Body

application/json

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.

amount
integer<int64>
required

Total payment amount, in cents. Must equal the sum of the splits.

date
string<date>
required

Date of the payment.

loan_id
string<uuid> | null

ID of the loan being paid. Provide this or loan_external_id.

loan_external_id
string | null

External ID of the loan being paid. Provide this or loan_id.

external_id
string | null

Unique ID of the payment in your system for linking purposes.

splits
object[] | null

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.

defer_posting
boolean
default:false

If true, the payment is recorded but not posted to the ledger until it is paid out or its due date is reached.

method
enum<string>
default:OTHER

Payment method. Defaults to OTHER.

Available options:
CASH,
CHECK,
CREDIT_CARD,
ACH,
CREDIT_BALANCE,
OTHER
Example:

"ACH"

processor
string | null

Payment processor, if any (e.g. stripe).

payment_clearing_account_identifier
Account ID · object

Override the clearing account used for the payment. Defaults based on method.

memo
string | null

Internal note about the payment.

metadata
object | null

Arbitrary JSON object you can attach for your own use. Layer stores and returns it unchanged.

reference_number
string | null

Reference number for the payment.

Response

201 - application/json

Loan payment created successfully.

data
object
required

A payment made against a loan, broken down into principal, interest, and fee splits.