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
Team API key from Settings → Integrations. Use Authorization: Bearer <key> or x-api-key.
Body
Customer id from list_customers.
1 - 25 elementsDue date (YYYY-MM-DD). Defaults to the facility's usual terms.
^\d{4}-\d{2}-\d{2}$Note shown on the invoice.
500draft (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: the plan to add to (from list_billing_subscriptions). Defaults to the plan that renews soonest.
next_bill only: when the plan has a percent-off discount on the whole plan, whether these lines get it too. Saved on the plan and used for later add-ons. Without an answer, add-ons pay full price.
next_bill only: send the same key when retrying so each line is stored once.
1 - 200next_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.
Response
Draft invoice created, or (next_bill) the lines added to the next bill.
- Option 1
- Option 2