Estimate the team's usage fee for the current month
get/v1/tenants/{tenant_id}/billing-profile/usage
Requires an API key
Requires billing:read, or a signed-in member whose team role manages billing (owner, admin, billing). The team's projects' kWh so far this month (sessions that ended), their rates, and the amount the month's invoice would have now, plus any balance carried from an earlier month. An estimate: the invoice is made after the month ends (UTC). Reads the CSMS, never Stripe.
Path parameters
- tenant_idintegerRequired
Returns · 200
- periodstringRequired
- fromstringRequired
- tostringRequired
- as_ofstringRequired
- team_idstring | null
- billable_fromstring | nullWhen the team's usage starts to be billed: the later of the fee's release and the end of the team's grace period. Usage before it is never invoiced.
- kwhstringRequiredThe team's projects' energy so far this month (sessions that ended).
- usage_minorintegerRequired
- discount_percentintegerDefault
0 - discount_minorintegerDefault
0 - carried_in_minorintegerRequired
- carried_fromstring | null
- estimated_minorintegerRequiredWhat the month's invoice would be now; invoiced after the month ends (UTC).
- minimum_minorintegerRequiredStripe's minimum charge; a smaller amount is carried to the next month.
- currencystringDefault
"usd" - billing_modeenumOne of
self_serve,enterprise· Default"self_serve" - minimum_commitment_minorintegerThe team's minimum monthly commitment (0: none).Default
0 - minimum_topup_minorintegerWhat the minimum adds to the month so far.Default
0 - rate_cents_per_kwhstringRequiredThe team's rate; a project's override is on its line.
- invoicedbooleanRequiredFalse for a waived or internal team.
- linesarray of InvoiceLineRecordRequired
Child attributes
- tenant_idintegerRequiredThe project.
- kindenumusage: the project's sessions that ended in the month. late: sessions of an earlier, already invoiced month that reached the CSMS after it was invoiced.One of
usage,late· Default"usage" - periodsarray of string | nulllate: the months those sessions ended in.
- kwhstringRequiredEnergy of the project's completed charging sessions (that ended in the month, or late ones): the exact decimal sum of the core's kWh.
- rate_cents_per_kwhstringRequired
- rate_sourceenumRequiredOne of
team,project - transactionsintegerRequired
- amount_minorintegerRequiredround_half_up(kwh x rate) in US cents.
- descriptionstring | nullThe invoice line: 'Ivora CSMS, <month>: <kWh> kWh x <rate> cents/kWh (project ...)'.
GET /v1/tenants/{tenant_id}/billing-profile/usage
curl --fail-with-body "https://api.ivoracharge.com/v1/tenants/1042/billing-profile/usage" \
-H "Authorization: Bearer $IVORA_API_KEY"Response · 200
{
"period": "string",
"from": "string",
"to": "string",
"as_of": "string",
"team_id": "team_0123456789abcdef",
"billable_from": "string",
"kwh": "string",
"usage_minor": 1250,
"discount_percent": 0,
"discount_minor": 0,
"carried_in_minor": 1250,
"carried_from": "string",
"estimated_minor": 1250,
"minimum_minor": 1250,
"currency": "usd",
"billing_mode": "self_serve",
"minimum_commitment_minor": 0,
"minimum_topup_minor": 0,
"rate_cents_per_kwh": "string",
"invoiced": false,
"lines": [
{
"tenant_id": 1042,
"kind": "usage",
"periods": [
"string"
],
"kwh": "string",
"rate_cents_per_kwh": "string",
"rate_source": "team",
"transactions": 1,
"amount_minor": 1250,
"description": "string"
}
]
}Try it is not available here yetRequests from this page are off until the production API at
https://api.ivoracharge.com is public. Use the code samples from your application server; Ivora grants production access. Keys are created in Developer tools.