Create An Invoice
A draft invoice. Lines are before tax. Tax is worked out from each line's sales_tax_code at the rates where the customer is, on the issue date.
Parameters
organizationIdUUID!requiredOrganization ID
nameString!required"create_invoice"
params.customer_nameStringFinds or adds the customer (or pass contact_id). On update_invoice it must match a customer you already have
params.customer_emailStringWho the invoice is emailed to: one or more emails, comma-separated. Saved on the customer, so the next invoice and reminders go there too
params.customer_regionStringThe customer's province, as a code (NS) or its name. Saved on the customer. Tax follows it: a Nova Scotia customer pays Nova Scotia HST, and a customer in a GST-only province pays GST alone. Leave it out to tax at your own province's rates
params.lines[Object!]!requiredEach: description, unit_price, quantity (default 1), revenue_account_id, sales_tax_code (one of your tax options from invoice_settings, e.g. hst in Ontario, st_ny in New York), tax_amount (needed where tax isn't worked out from a rate, like US sales tax)
params.terms_daysIntDays to pay (default 30)
params.currencyStringCAD, USD, EUR, GBP, AUD or JPY. Default: the customer's usual currency, else your books' own
params.fx_rateStringOther currencies: your books' currency per 1 of the invoice's (1.3684). Default: the Bank of Canada rate on the issue date
params.numberStringOnly to use your own number
params.trade_nameStringThe trade name this invoice leads with, instead of the one in invoice_settings. An empty string prints your legal name alone. Default: the settings' trade name. On update_invoice, use_default_trade_name: true goes back to it
applyBooleantrue to keep it