Skip to main content
POST
/
bill
curl --request POST \
     --url https://api.tryaqueduct.com/v1/bill \
     --header 'Authorization: null' \
     --header 'Content-Type: application/json'
curl --request POST \
     --url https://api.tryaqueduct.com/v1/bill \
     --header 'Authorization: null' \
     --header 'Content-Type: application/json'

Authorizations

Authorization
string
header
required

Body

application/json
customerId
string
required

Id of the account owner being billed

Example:

"owner_01FSSVRVGQ7GGB13815DE3F518"

productId
string
required

Id of the Product being billed for

Example:

"prod_23481242"

priceModelId
string

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

Example:

"prmod_23487324"

oneOffLineItems
object[]
firstBillingDate
string<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.

Example:

"2022-03-15T15:53:00.000Z"

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.

Example:
{
"price_234535": { "percent": 20 },
"price_456789": { "unitCount": 3 }
}
contractStartDate
string<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.

contractEndDate
string<date>

Time at which the contract is scheduled to end.

Response

200

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