Billing
QDivZero bills by the second for the active time of each instance. Top-ups, debits, and adjustments all flow through an append-only ledger, so the balance is always the sum of the entries in front of it. There are no token meters, no per-request fees, and no surprise overage charges.
Currency
All amounts are in EUR. The backend stores integer cents to avoid floating-point drift. The frontend formats with
Intl.NumberFormat.Concepts
| Concept | Description |
|---|---|
| Account | A billing entity. One account can own many members and one balance. |
| Balance | Available EUR the platform can debit against. Stored as integer cents in the backend. |
| Ledger | Append-only log of every balance change. Top-ups, debits, refunds, adjustments. |
| Debit | A deduction triggered by billable seconds, top-up reversals, or manual adjustments. |
| Capacity tier | secure or community. Determines which providers may host your instances. |
| Pricing snapshot | A price is locked at launch. Subsequent provider cost changes do not affect active instances. |
Top-up flow
- Open Billing → Top up.
- Choose the amount in EUR. The platform converts to cents on submission.
- Confirm the secure checkout session. The balance is credited only after the gateway confirms.
- The ledger shows a positive entry with reference = the checkout session id.
curl
1curl -X POST https://api.qdiv0.com/v1/billing/checkout \
2 -H "Authorization: Bearer $QDIV0_API_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "amount_cents": 5000,
6 "currency": "eur",
7 "success_url": "https://app.qdiv0.com/billing/top-up/success",
8 "cancel_url": "https://app.qdiv0.com/billing/top-up"
9 }'How debits are produced
- The scheduler emits a billing tick every few minutes per active instance.
- Each tick translates billable seconds into a debit and writes a ledger entry.
- The balance decreases monotonically. Failed ticks are retried with backoff.
- If the balance goes negative the platform blocks new launches but keeps existing instances running for a grace window.
Pricing model
Pricing is a per-model, per-GPU hourly rate. The rate is recorded as a pricing snapshot on the instance at launch time, so the invoice is reproducible even if catalog prices change later. Provider cost is tracked separately and never feeds back into the user-facing price.
- Capacity tier
secure: guaranteed capacity, higher rate. - Capacity tier
community: spot or shared capacity, lower rate, may be reclaimed.
API surface
| Endpoint | Purpose |
|---|---|
| GET /billing/balance | Current balance in cents. |
| GET /billing/ledger | Append-only ledger entries. |
| POST /billing/checkout | Start a top-up checkout session. |
| POST /billing/debit | Internal endpoint used by the scheduler. |