Bill against price models, and automatically create an invoice and subscription as needed

Body Params
string
required

Id of the account owner being billed

string
required

Id of the Product being billed for

string

Id of the PriceModel being billed for. Either priceModelId or oneOffLineItems must be provided.

string

(Optional) The date that the generated invoice, if any, should be due. Defaults to 30 days after

oneOffLineItems
array of objects
oneOffLineItems
date

The date of the first full invoice and anchors subsequent invoices on the the day of the month.

For example, a $30 dollar monthly recurring bill that is sent in the middle of April with an billing cycle anchor of May 1st would result in an invoice created immediately for $15 and then another $30 invoice sent out on May 1st.

variables
object

An object representing the arguments supplied to the PriceModel. Each key in the object is a NamedPriceFunction Id, and the value is an object representing the arguments to that specific NamedPriceFunction.

metadata
object

An object representing additional metadata to be attached to any invoices that are created from /bill/

boolean

True means that any subscription created will be billed in arrears i.e. at the end of the billing cycle. False means the subscription will be billed at the beginning of the billing cycle.

string

A description that will be added as the invoice memo

date

Time at which the contract started or is scheduled to start. Used for revenue recognition, and in the case of a subscription, also used for backdating the start date.

date

Time at which the contract is scheduled to end.

boolean

True by default - any invoices created are a draft invoice and must be sent/finalized first. False means we create a finalized invoice

Response
200

Successfully billed the AccountOwner. Will create an invoice or subscription, depending on the price model provided.

Language
Credentials
Header
Response
Click Try It! to start a request and see the response here!