Read the account's cost this month and unpaid balance
GET/api/:accountName/billing/cost
Amounts are whole minor units of the currency, cents for USD, and currency is its upper-case ISO 4217 code; they are estimates as of asOf, the invoice is the final amount, and no tax is charged today. monthToDateCost is what the usage since the 1st of the month, in UTC, costs, whether or not it has been invoiced yet. unpaidBalance is what the account has not paid yet: notYetInvoiced, the usage not yet on any invoice, plus invoicedAwaitingPayment, what its issued invoices still owe. The not-yet-invoiced amount is invoiced and charged when it reaches billingThreshold, or at the end of the month; billingThreshold is null when the account's subscription has none, and then only the end of the month invoices it. Usage can take up to 30 minutes to reach the figures after the platform records it, and reaches them in whole units: the seconds a task or run leaves over are added when it ends, rounded up to the next minute; egress and account storage are rounded up when the month is invoiced. The figures are kept for up to five minutes, and read again as soon as an invoice is raised, paid or fails to be paid. An account with no billing subscription yet answers 404.
Request
Responses
- 200
The account's estimated cost this month and unpaid balance.