Record payment
o2c_record_paymentRecord cash received from a customer. Recording the receipt and deciding what it settles are two acts, and this is only the first. A payment that arrives without a remittance advice sits as unapplied cash — which is the correct state, and visible in o2c_unapplied_cash. Never guess which invoice a payment is for to make the aging look tidy. Effects: payment recorded as unapplied cash.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Amount received. In cents (integer minor units) — 1250 means $12.50. | |
| method | No | How it arrived. | |
| reference | No | Check number, wire reference, remittance id — exactly as printed. | |
| customer_id | Yes | Who paid. An existing customer id. | |
| received_at | No | Value date. Defaults to today. ISO date, YYYY-MM-DD. |