---
title: "Get a user's billing state"
method: GET
path: "/admin/billing/users/{id}/state"
tags: ["Billing"]
---

# Get a user's billing state

`GET /admin/billing/users/{id}/state`

## Request

- Base URL: `https://api.crawlora.net/api/v1`
- URL: `https://api.crawlora.net/api/v1/admin/billing/users/{id}/state`
- Auth: API key in header `x-api-key`

Returns a user's current billing state (admin only), identified by `id`: `plan`, period, included, used and remaining usage, `overage_credits`, daily usage on the UTC day, subscription price and any `pending_plan`. A `daily_credit_limit` of `0` means no daily cap. Returns 404 when the user's billing state has not been initialised.

## Path parameters

- `id` string, required

## Headers

- `x-api-key` string, required

## Response `200`

User billing state

- BillingBillingStateResponseDoc
  - `code` integer
  - `data` BillingBillingStateDoc
    - `allow_overage` boolean
    - `created_at` string
    - `credits_remaining` integer
    - `credits_used` integer
    - `currency` string
    - `daily_credit_limit` integer
    - `daily_credits_remaining` integer
    - `daily_credits_used` integer
    - `daily_key` string
    - `expected_subscription_amount_cents` integer
    - `expected_total_amount_cents` integer
    - `hard_limit` boolean
    - `included_credits` integer
    - `overage_credits` integer
    - `pending_plan` string
    - `pending_plan_effective_at` string
    - `period_end` string
    - `period_key` string
    - `period_start` string
    - `plan` string
    - `pricing_source` string
    - `subscription_price_cents` integer
    - `updated_at` string
    - `user_id` string
  - `msg` string

## Other responses

- `401`: Authentication required
- `403`: Admin plan required
- `404`: Billing state not found
- `500`: Internal server error

---

[API](https://skmtc.dev/crawlora/apis/crawlora-api.md) · [All operations](https://skmtc.dev/crawlora/apis/crawlora-api/llms.txt) · [OpenAPI document](https://skmtc.dev/crawlora/apis/crawlora-api/revisions/afac9b012a27?raw)
