Record a payment
record_paymentRecord a payment against a finalized invoice. Defaults: amount = outstanding balance, date = today. Sets status to PAID or PARTIAL. No fiscal logic, it records what the user says was collected. Returns the invoice's new status, how much is now paid and still outstanding, and the payment id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | No | ||
| amount | No | Defaults to the outstanding amount | |
| method | No | ||
| invoice_id | Yes | ||
| payment_date | No | YYYY-MM-DD, defaults to today | |
| referencia_pago | No | Where the money came from in the calling system (bank line id, Stripe payment_intent, receipt no.). Unique per tenant: a second call with the same reference is rejected instead of paying twice. Always pass it when booking automatically. |