Apply credit to invoice
o2c_apply_creditApply some or all of a credit note to an invoice. Same bounds as cash: never more than the credit note has left, never more than the invoice still owes, never across customers. A credit note the customer wants paid out instead is a refund, not an application. Effects: application recorded; invoice.status -> paid when fully settled; credit_note.status -> settled when exhausted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | No | How much to apply. Omit to apply the smaller of what is left on each side. In cents (integer minor units) — 1250 means $12.50. | |
| invoice_id | Yes | The invoice it settles. An existing invoice id. | |
| credit_note_id | Yes | The credit note. An existing credit_note id. |