- The original payment never changes after you record it.
- The credit balance is visible on the balance sheet until the customer uses it.
All amounts are integer cents. All examples use Record a payment:
POST /v1/businesses/{businessId}/invoices/payments.Record an overpayment
Allocate the invoice amount to the invoice, and allocate the extra amount to a liability account. In this example, a customer pays $125.00 on a $100.00 invoice.inv-500 is fully paid, and $25.00 sits in Unearned Revenue as a customer credit.
Record a deposit before an invoice exists
A deposit, such as a payment on an accepted quote, uses the same pattern. Allocate the full amount to the liability account.Apply the credit to a later invoice
When the customer uses the credit, record a new payment with methodCREDIT_BALANCE. Set paid_at to the date that the credit is applied. Set redemption_account to the same account that holds the credit.
In this example, the customer applies the $25.00 credit to a $60.00 invoice.
amount to the part that is used. The rest stays in the liability account.
CREDIT_BALANCE payments have these rules:
- Do not send a
processor,fee, oradditional_fees. - Send
redemption_accountonly with methodCREDIT_BALANCE. If you omit it, Layer uses Unearned Revenue. - The sum of
invoice_paymentsmust not be more thanamount.
Accounting effect
Track different types of credit
You can track deposits, overpayments, and gift balances separately. Create child accounts under Unearned Revenue, or other liability accounts, with Create ledger account. Use the same account in the original allocation and inredemption_account. Separate accounts are optional. They are not an accounting requirement.
Related documentation
Import sales and AR data
Review how invoices, payments, refunds, and payouts flow into Layer.
Record a payment
Review the request parameters for invoice payments.