Billing API
Version 1.0 OpenAPI 3.1.0
Read what your organization uses and owes from scripts and finance tools: the month's usage and projection, itemised usage, monthly statements, payments, the credit balance, the rate card, and the term commitment. Keep the billing details invoices are made out to up to date, and manage saved cards.
EvoHub is billed by usage, measured in EHU (EvoHub Units). Each metric has an EHU weight on the rate card, and each pricing tier a price per EHU, so every charge can be reproduced by hand. Each month's free allowance is applied before anything is charged.
Authentication. Every endpoint except the published price list
(/api/v1/pricing) and the current campaign (/api/v1/campaigns/active)
takes an EvoHub API key, sent as Authorization: Bearer evohub_… or as
X-API-Key: evohub_…. Each operation names the scope the key needs in its
description and in x-evohub-permission. A missing or invalid key gets
401; a valid key without the scope gets 403 FORBIDDEN, never
401. See the API overview,
API keys and scopes and Errors.
What a key cannot do. Adding a card and buying credit both end with
the card being confirmed in the browser, inside the console's secure card
form; they are listed in x-route-check.not-public and are done in the
console.
Responses. A successful answer carries its result in data. Errors
carry an error object with a machine-readable code, a message and a
request_id (also sent in the X-Request-ID header — quote it to
support). Amounts are in US dollars (_usd) or EHU (_ehu). Timestamps
are RFC 3339 in UTC; dates are YYYY-MM-DD and billing periods are UTC
calendar months.
Payments not enabled. Endpoints that read or change cards and
billing details answer 503 PAYMENTS_DISABLED when payments are not
enabled for the environment.
Servers
https://evohub.io
Authentication
bearerKeyHTTP BearerAn EvoHub API key (evohub_…) as a bearer token.headerKeyAPI key in the headerX-API-KeyAn EvoHub API key (evohub_…).
Usage
This month's usage, projection and allowance, and itemised usage over any range.
| GET | /api/v1/billing/summary | Get this month's summary |
| GET | /api/v1/billing/usage | Get itemised usage |
Statements
Monthly bills and everything charged to the organization.
| GET | /api/v1/billing/statements | List statements |
| GET | /api/v1/billing/statements/{period} | Get one statement |
| GET | /api/v1/billing/payments | List payments |
Rate card
The EHU weight of every metric and the price per EHU.
| GET | /api/v1/billing/rate-card | Get the rate card in force |
| GET | /api/v1/pricing | Get published pricing |
Credit
The prepaid EHU balance and its history.
| GET | /api/v1/billing/credit | Get the credit balance |
Payment methods
Cards saved for the organization.
| GET | /api/v1/billing/payment-methods | List saved cards |
| POST | /api/v1/billing/payment-methods/{id}/default | Make a card the default |
| DELETE | /api/v1/billing/payment-methods/{id} | Remove a card |
Billing details
Who invoices are made out to, and the tax registration.
| GET | /api/v1/billing/profile | Get billing details |
| PUT | /api/v1/billing/profile | Set billing details |
| GET | /api/v1/billing/tax-details | Get tax details |
| PUT | /api/v1/billing/tax-details | Set the tax number |
Commitment
A monthly volume agreed for a fixed term, at a lower price per EHU.
| GET | /api/v1/billing/commitment | Get the commitment |
| POST | /api/v1/billing/commitment | Enter a commitment |
| DELETE | /api/v1/billing/commitment | End the commitment early |
Campaigns
Credit campaigns and where the organization stands with them.
| GET | /api/v1/billing/campaign | Get the organization's campaign standing |
| GET | /api/v1/campaigns/active | Get the running campaign |

