Use or pay back a credit
invoices_use_creditPut a customer's credit (a prepayment or an overpayment) on one of their sent invoices, like Xero's allocate credit: invoice_id, and amount (default all it can: what is left on the credit or the invoice, the smaller); the invoice records it as a payment with method credit, and its share of the credit's VAT comes back off. Or refund: true pays what is left (or amount) back to the customer, with date and method; or void: true takes back a prepayment recorded by mistake while none of it is used. Same customer and currency only. Costs $0.01 per call; nothing if it fails.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | YYYY-MM-DD | |
| void | No | ||
| amount | No | ||
| credit | Yes | The credit's number, like "CR-0001" (invoices_list_credits). | |
| method | No | bank_transfer | |
| refund | No | ||
| reference | No | ||
| invoice_id | No | The invoice_id invoices_create returned (quotes and credit notes have one too). |