invoice_payment_record
Records a money-in fact row against an invoice (by invoice_id or its invoice_number) in ONE call: money is integer CENTS via amount_cents, or a decimal STRING via amount — never multiply or divide yourself. A draft invoice auto-advances to 'sent'; a cancelled invoice refuses; an amount above the remaining balance refuses unless allow_overpayment is true. status 'paid' derives from the ledger this writes, so this is how an invoice becomes paid. A same invoice/amount/day repeat refuses as a likely duplicate unless resent with force:true. NEXT: invoice_read to read it back.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| force | No | Confirms a genuine second payment when the same invoice/amount/day already has one recorded (default false refuses it as a likely duplicate) — resend the SAME call with force:true. | |
| amount | No | Money as a decimal STRING ("1500.00" = $1,500.00), parsed server-side. Use amount_cents for integer CENTS instead — never convert units yourself. | |
| method | No | ||
| currency | No | ||
| invoice_id | No | ||
| occurred_at | No | ||
| amount_cents | No | ||
| invoice_number | No | Alias of invoice_id — the invoice's own number (tenant-unique), resolved server-side. | |
| allow_overpayment | No | Explicit override (default false): record more than the remaining balance / pay an already-settled invoice. |