Explain invoice usage charges
Return why this invoice billed the amount it did: line-item attribution plus usage provenance counts for usage lines. Use this instead of chaining invoices_get + invoice_line_items_list_usage_events.
/invoices/{id}/usage-explainReturn why this invoice billed the amount it did: line-item attribution plus usage provenance counts for usage lines. Use this instead of chaining invoices_get + invoice_line_items_list_usage_events.
Related endpoints
PUT /invoices/external/batch— Batch upsert invoices by external IDGET /invoices— List invoicesPOST /invoices— Create invoiceGET /invoices/{id}— Get invoicePATCH /invoices/{id}— Update invoiceDELETE /invoices/{id}— Delete invoicePOST /invoices/{id}/margin-estimate— Estimate invoice net by payment railPOST /invoices/{id}/refund— Refund invoice
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 aWWW-Authenticate: Bearerchallenge.404 resource_missing— the referenced resource does not exist or is not visible to your key.
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
Path Parameters
Invoice UUID
uuidResponse Body
application/json
application/json
application/json
application/json
curl -X GET "https://api.revkeen.com/v2/invoices/11111111-1111-4111-8111-111111111111/usage-explain" \
-H "x-api-key: $REVKEEN_API_KEY"Synthetic documentation data, validated against the response schema; not a live API result.
{ "data": { "invoice": { "id": "00000000-0000-4000-8000-000000000001", "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e", "status": "string", "amount_due_minor": 0, "currency": "string" }, "lines": [ { "id": "00000000-0000-4000-8000-000000000001", "description": "string", "kind": "usage", "amount_minor": 0, "currency": "string", "meter_id": "1e13adc1-9ac9-453b-b100-17d2f2da2eb8", "usage_quantity": "string", "usage_event_count": 0 } ], "summary": "string" }}