Use a supplier credit
purchasing_use_creditPut a credit with a supplier (a prepayment or an overpayment) on one of their open bills, like Xero's allocate credit: bill_id, and amount (default all it can: what is left on the credit or the bill, the smaller); the bill records it as a payment with method credit, and its share of the credit's VAT comes back off. Or refund: true records what is left (or amount) coming back from the supplier, with date and method; or void: true takes back a prepayment recorded by mistake while none of it is used. Same supplier and currency only. Costs $0.01 per call; nothing if it fails.
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": "<credit>"
},
"name": "purchasing_use_credit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | YYYY-MM-DD | |
| void | No | ||
| amount | No | ||
| credit | Yes | The credit's number, like "SC-0001" (purchasing_list_credits). | |
| method | No | bank_transfer | |
| refund | No | ||
| bill_id | No | The bill_id purchasing_create_bill returned. | |
| reference | No |