Create draft invoice or add to next bill
Requires write:billing. Creates a one-off invoice as a draft for a customer, from one-time products (default or chosen price, or a custom amount) and/or custom lines (description + amountCents), with an optional car per line, due date and memo. Nothing is sent or charged; sending is a separate action, and staff can also finish it at dashboardUrl. Tax and processing fees follow the facility’s settings. With billingOption: "next_bill" no invoice is created: the lines are added to the customer’s next monthly plan bill and charged with it (409 no_eligible_plan when there is no active monthly plan).
Authorizations
Body
draft (default) creates a draft invoice. next_bill creates no invoice: each line is added to the customer's next monthly plan bill and charged with it (one charge per line). Answers 409 (code: no_eligible_plan) when the customer has no active monthly plan to add to, 409 (code: out_of_stock) when a capped product is sold out, 409 (code: idempotency_conflict) when idempotencyKey was already used for different lines, 409 (code: busy) when the plan's add-ons are being changed (retry shortly), or 409 (code: needs_confirmation) for a large amount sent without confirmedLargeAmount: true. dueDate and memo are ignored.
draft, next_bill next_bill only: set to true to add a large amount: any line over the facility's line amount, or lines that take the plan's waiting add-ons over its plan amount (set in Billing settings; $10,000 and $25,000 unless changed, and either can be turned off). Without it such a request stores nothing and answers 409 (code: needs_confirmation, details.largeAmount with the amount and the facility's limit as thresholdCents). Confirm with the person asking, then resend with the same idempotencyKey.