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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"credit_note_id": "<credit_note_id>",
"invoice_id": "<invoice_id>"
},
"name": "o2c_apply_credit"
}
}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. |