Invoice a customer's balance (write)
bill_customerCreates an invoice from a customer's accrued balance lines and returns it, triggering payment if on an automated method.
Instructions
WRITE. Creates an invoice from the lines currently sitting in a ProAbono customer's balance, and returns it. Whatever is in the balance is what gets invoiced, so create_balance_line is what decides the amount and runs first -- billing an empty balance invoices nothing. The invoice is issued for real and, for a customer on an automated payment method, a charge is attempted immediately. Read it back afterwards with get_invoice, whose answer carries the PDF URL.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Note printed at the bottom of this invoice, above the customer service section. | |
| period_end | No | Ignore balance lines after this date, ISO 8601. | |
| customer_ref | Yes | Shared reference of the customer to invoice. | |
| period_start | No | Ignore balance lines before this date, ISO 8601. | |
| force_offline | No | Issue an offline invoice even for a customer on card or direct debit. | |
| ensure_billable | No | Force the payment-information check even when the amount is zero. |