Account billing snapshot (plan, cycle, balance, caps, status)
The billing "wallet/statement" view: current plan, billing cycle,
accrued balance + remaining credits this period, spend caps, and
payment / access status. This is the billing half of the legacy
/v1/usage-stats snapshot — the per-product consumption half is metering
and lives on GET /v1/usage.
Usage-based (Metronome) accounts get a populated balance; legacy Stripe
accounts get balance: null plus a deprecated legacy.limits block and,
when payment-blocked, status.openInvoiceUrl / status.declineReason.
API key authentication - use your Zernio API key as a Bearer token
In: header
Response Body
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.usage.getBilling();console.log(data);{
"billingSystem": "metronome",
"plan": {
"name": "string",
"isUsageBased": true
},
"period": {
"start": "2019-08-24T14:15:22Z",
"end": "2019-08-24T14:15:22Z",
"anchorDay": 0
},
"balance": {
"accruedThisPeriodCents": 0,
"creditsRemainingCents": 0
},
"caps": {
"xSpendUsedCents": 0,
"xSpendLimitCents": 0
},
"status": {
"hasAccess": true,
"suspended": true,
"suspendedAt": "2019-08-24T14:15:22Z",
"suspensionReason": "string",
"openInvoiceUrl": "string",
"declineReason": "string",
"autoUpgradeEnabled": true
},
"legacy": {
"limits": {
"uploads": 0,
"profiles": 0
}
}
}{
"error": "Unauthorized"
}{
"error": "Not found"
}List activity logs GET
Unified logs endpoint. Returns logs for publishing, connections, webhooks, and messaging. Filter by type, platform, status, and time range. Logs are retained for 90 days.
Calling usage and cost GET
Aggregated calling usage across your numbers, both channels (WhatsApp Business Calling + regular phone/PSTN): call counts, answered counts, minutes, and cost. Use it for cost visibility or to rebill your own customers per number. Costs come from each call's billing snapshot, so this endpoint always agrees with the invoice: `billableUSD` is what Zernio bills; `metaUSD` is the WhatsApp per-minute charge Meta bills directly to your WABA (display only, never billed by Zernio). Optional `groupBy` returns a breakdown by UTC day, by your number, or by channel. Defaults to the last 30 days.