Refund
o2c_refundRecord money returned to the customer against an unapplied payment or credit note balance. Records the fact that money went back; actually moving it is out of scope, like every other outbound act. Bounded by the unapplied balance of the source instrument — you cannot refund what is already applied to an invoice without unwinding that application first (which does not exist yet, on purpose: reverse by credit note instead). Effects: refund recorded; source unapplied balance reduced; credit_note.status -> settled when exhausted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Amount returned. In cents (integer minor units) — 1250 means $12.50. | |
| method | No | How it went back. | |
| reference | No | Bank reference, exactly as printed. | |
| source_id | Yes | The payment or credit note id. | |
| source_type | Yes | What the refund draws down. |