Build

Billing

Access billing summary and credit balance data in the Lev External API v2.

Updated May 2026
GET/api/external/v2/billing/summarySubscription and credits
GET/api/external/v2/billing/credits/balanceCredits only

Overview

The billing surface is read-only. Both endpoints require the billing:read scope and return data for the authenticated caller's active account.

GET /billing/summary returns subscription metadata and the credit balance in one response. Use it when you need the account's billing status.

GET /billing/credits/balance returns only the credit balance block. Use it when the subscription fields are not needed.

Credit enablement and zero balances are different

enabled=false with balance=null means the account is not provisioned for credit-based billing. enabled=true with balance=0 means the account is provisioned and has zero credits available.

Billing Summary

GET/api/external/v2/billing/summary

Get subscription metadata and credit balance for the active account

curl -X GET "https://api.levcapital.com/api/external/v2/billing/summary" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response (200):

{
  "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "timestamp": "2026-05-06T15:30:45Z",
  "data": {
    "subscription": {
      "type": "standard",
      "status": "active",
      "billing_cycle": "monthly",
      "end_date": "2026-12-31"
    },
    "credits": {
      "enabled": true,
      "balance": 1250,
      "unit": "credits"
    }
  }
}

For accounts that are not provisioned for credit-based billing, credits.enabled is false and credits.balance is null.

401unauthorized
Authentication requiredMissing or invalid Authorization header
403forbidden
Missing required scope: billing:readThe API key or user session does not include billing access

Credit Balance

GET/api/external/v2/billing/credits/balance

Get the credit balance for the active account

curl -X GET "https://api.levcapital.com/api/external/v2/billing/credits/balance" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response (200):

{
  "request_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "timestamp": "2026-05-06T15:30:45Z",
  "data": {
    "enabled": true,
    "balance": 1250,
    "unit": "credits"
  }
}
401unauthorized
Authentication requiredMissing or invalid Authorization header
403forbidden
Missing required scope: billing:readThe API key or user session does not include billing access

Billing Objects

Subscription object

FieldTypeDescription
typestring|nullSubscription type for the active account
statusstring|nullCurrent subscription status
billing_cyclestring|nullBilling cadence, such as monthly or annual
end_datestring|nullSubscription end date as an ISO 8601 date

Credits object

FieldTypeDescription
enabledbooleanWhether the active account is provisioned for credit-based billing
balanceinteger|nullCurrent credit balance, or null when credits are not enabled
unitstringBalance unit. Current value is credits
More in this section