Get current usage balance
Returns the current usage balance for a customer or subscription in the active billing period. Shows per-meter breakdown with included allowance, overage, estimated charges, and margin data. A subscription has one currency; metered usage attributed to the subscription is assumed to be in that same currency. RevKeen does not perform FX conversion in the metering layer. --- **Common errors** - `400 invalid_request` — malformed payload or failed validation. - `401 authentication_error` — missing, invalid, expired, or revoked credential. Codes: `authentication_failed`, `invalid_api_key`, `expired_api_key`, `api_key_revoked`, `session_invalid`, `merchant_required`. Carries a `WWW-Authenticate: Bearer` challenge.
Returns the current usage balance for a customer or subscription in the active billing period. Shows per-meter breakdown with included allowance, overage, estimated charges, and margin data. A subscription has one currency; metered usage attributed to the subscription is assumed to be in that same currency. RevKeen does not perform FX conversion in the metering layer.
Common errors
400 invalid_request— malformed payload or failed validation.401 authentication_error— missing, invalid, expired, or revoked credential. Codes:authentication_failed,invalid_api_key,expired_api_key,api_key_revoked,session_invalid,merchant_required. Carries aWWW-Authenticate: Bearerchallenge.
Authorization
apiKey Your RevKeen merchant API key. Create and manage keys in Dashboard → Settings → Developer. Use rk_sandbox_* for staging/test and rk_live_* for production. The same key may be sent as Authorization: Bearer <key> if that suits your HTTP client better. A missing, invalid, expired, or revoked key returns 401 with a WWW-Authenticate: Bearer challenge; a valid key without the required scope returns 403.
In: header
Query Parameters
Filter to a specific subscription
uuidFilter to a specific customer by RevKeen ID
uuidFilter to a customer by your external identifier
Filter to a single meter
uuidResponse Body
application/json
application/json
application/json
application/json
curl "https://api.revkeen.com/v2/usage/balance" \
-H "x-api-key: $REVKEEN_API_KEY"{ "object": "usage_balance", "meters": [ { "meter_id": "string", "meter_name": "string", "price_name": "string", "unit_name": "string", "billing_scheme": "string", "tiers_mode": "string", "unit_amount_minor": 0, "unit_amount_decimal": "string", "package_size": 0, "percentage_rate_bps": 0, "current_value": 0, "included_quantity": 0, "used_quantity": 0, "remaining_included": 0, "overage_quantity": 0, "estimated_amount_minor": 0, "total_cost_minor": 0, "margin_minor": 0, "currency": "string", "period_start": "string", "period_end": "string", "last_event_at": "2019-08-24T14:15:22Z" } ], "total_estimated_amount_minor": 0, "total_cost_minor": 0, "total_payment_processing_cost_minor": 0, "total_platform_fee_minor": 0, "true_net_margin_minor": 0, "true_net_margin_percent": 0, "currency": "string"}List transactions GET
List all transactions for the authenticated merchant. Transactions represent the unified financial truth — every sale, refund, void, capture, dispute, and adjustment. --- **Related endpoints** - `GET /transactions/{id}` — Get transaction by ID **Common errors** - `401 authentication_error` — missing, invalid, expired, or revoked credential. Codes: `authentication_failed`, `invalid_api_key`, `expired_api_key`, `api_key_revoked`, `session_invalid`, `merchant_required`. Carries a `WWW-Authenticate: Bearer` challenge. **Pagination** Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.
Get aggregated usage GET
Get aggregated usage for a specific meter over a time range. Returns the computed value using the meter's aggregation method. --- **Related endpoints** - `POST /usage-events` — Ingest usage events - `GET /usage-events` — Query usage events - `POST /usage-events/dry-run` — Dry-run usage events **Common errors** - `400 invalid_request` — malformed payload or failed validation. - `401 authentication_error` — missing, invalid, expired, or revoked credential. Codes: `authentication_failed`, `invalid_api_key`, `expired_api_key`, `api_key_revoked`, `session_invalid`, `merchant_required`. Carries a `WWW-Authenticate: Bearer` challenge.