1000000 = $1.00) are computed once at signing time using the ETH/USD oracle and stored immutably.
Authentication
Two auth modes are accepted. The tenant boundary is enforced identically in both: theclientId in the URL path must match the authenticated principal’s app.
Confidential client (recommended for server-to-server)
Provider dashboard session
A logged-in session whose user is the app’s owner, a platform admin, or aproviderAdmins team member may call this endpoint without Basic auth.
Requests that satisfy neither auth mode, or whose authenticated principal does not match the path
clientId, receive 404 Not Found. The endpoint deliberately does not distinguish “unauthenticated” from “not found” to avoid leaking app existence.Endpoint
Path parameters
No query parameters.
Response
200 OK
Response fields
Plan types and overage logic
For
free plans, overageUnits and overageWei are always "0".
Starter plan
Every app has a Starter plan created automatically (isStarterDefault: true). It is separate from custom billing plans and from the Network Price discovery plan. Starter carries an includedUsdMicros allowance (default 5000000 = $5.00) and is automatically synced to OpenMeter.
New end-users are auto-subscribed to the Starter plan when provisioned (via POST /users, signer token mint, or signed-ticket ingest) if they have no existing subscription.
Providers can update the Starter allowance via:
Invoices
Tenant-scoped invoice list (OpenMeter DTO mapped):Merchant billing (Stripe Connect)
Stripe Connect is used for invoicing and end-user checkout, not for plan provisioning in OpenMeter.All Stripe Connect operations require a provider dashboard session. M2M Basic auth is not accepted on these routes.
Period fallback
When the app has no active subscription, the billing period defaults to the current calendar month in UTC (midnight on the 1st to the last millisecond of the last day). This fallback applies wheneversubscription is null in the response.
Example
jq:
Error responses
Security boundaries
- Tenant isolation: the authenticated M2M client’s
appIdmust equal the pathclientId. A valid credential for a different app returns404. - Provider sessions must be the app owner, a platform admin, or a
providerAdminsteam member. - No secrets, signer material, or per-request payloads are returned.
- Confidential client secrets must stay server-side. Do not call this endpoint from the browser with Basic auth.
Key design decisions
- Single-call snapshot. Plan, subscription, usage totals, timeline, overage, and USD breakdowns are assembled in one response so dashboard UIs can render a complete billing view without multiple round trips.
- Day-granularity timeline, not raw records. The timeline buckets fee and request data by calendar day (UTC), keeping the response size bounded. For raw per-pipeline/model data, use
GET /api/v1/apps/{clientId}/usage?groupBy=pipeline_model(see Usage API). - Calendar-month fallback when no subscription. Apps on the Starter plan or free-tier state still get a consistent period reference (the current calendar month).
404for all auth and tenant-mismatch failures. Prevents enumeration of validclientIds.- USD micros stored at signing time. Historical USD accuracy depends on the oracle at signing time; do not recompute historical values from the current oracle rate.
Implementation tasks
- Parse all
*Weifields withBigIntbefore any arithmetic. Do not cast toNumberbefore comparing or summing. - Use
networkFeeUsdMicrosandownerChargeUsdMicrosfor fiat-denominated cost reporting;totalFeeWeifor wei-denominated analytics. - Use the
timelinearray to drive sparklines or bar charts — every calendar day in the period is always present, so you never need to fill gaps client-side. - When
planisnull, surface a “No plan configured” state rather than treating it as an error. - For overage alerting, poll this endpoint on a schedule and compare
cycle.overage.overageUnitsagainst thresholds you define in your system. - For per-user attribution and pipeline/model breakdown, use the Usage API with
groupBy=userorgroupBy=pipeline_model. - To create or change plans, use Plans from a provider dashboard session (not M2M).
- For per-user entitlement balances and allowance top-ups, see Allowances.