---
title: "Payg Status"
method: GET
path: "/api/v1/payg/status"
tags: ["payg"]
---

# Payg Status

`GET /api/v1/payg/status`

## Request

- Base URL: `https://qcode.cc` (the document declares no server; this is the origin it was published from)
- URL: `https://qcode.cc/api/v1/payg/status`
- Auth: none declared

登录：能不能买、余额、按量包 key 现状（CRS 读 1 秒超时）、各包预览。

同一用户 STATUS_CACHE_TTL_S 秒内的重复请求直接返回缓存，同时到来的请求共用一次计算（M4，见模块顶部）。

## Query parameters

- `lang` string

## Response `200`

Successful Response

- PaygStatusResponse
  - `success` boolean, required
  - `enabled_for_user` boolean, required
  - `can_buy` boolean, required
  - `code` string, nullable
  - `message` string
  - `first_purchase` boolean, required
  - `balances` PaygBalances, required
    - `cny` number, required
    - `usd` number, required
  - `default_currency` string, required
  - `key` PaygKeyStatus, required
    - `exists` boolean, required
    - `api_key_id` integer, nullable
    - `key_prefix` string, nullable
    - `closed` boolean, nullable
    - `unknown` boolean, nullable
    - `expired` boolean, nullable
    - `expires_at` string, nullable
    - `expires_at_iso` string, nullable
    - `total_limit` number, nullable
    - `cumulative_used` number, nullable
    - `remaining_usd` number, nullable
    - `forfeit_usd` number, nullable
    - `revivable` boolean, nullable
  - `previews` PaygPreview[], required
    - `pack_id` string, required
    - `kind` string, required
    - `limit_after` integer, required
    - `expires_after` string, required
    - `expires_after_iso` string, required
    - `remaining_after` number, required
  - `availability` object
  - `renew` PaygRenewInfo: payg_renew_usage_low：本期额度已用百分比、需要的百分比、还差多少美元（不含任何库存信息）。
    - `locked` boolean, required
    - `used_pct` integer, nullable
    - `need_pct` integer, nullable
    - `need_usd` number, nullable
  - `next_reset_in_s` integer, nullable
  - `reset_is_today` boolean, nullable

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-21** `2175943cc01f`: 4 info
  - added the optional property `availability` to the response with the `200` status
  - added the optional property `next_reset_in_s` to the response with the `200` status
  - added the optional property `renew` to the response with the `200` status
  - added the optional property `reset_is_today` to the response with the `200` status
- **2026-10-15** `badb73432a70`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/qcode/apis/qcode-web/changes/api/v1/payg/status/get.md)

---

[API](https://skmtc.dev/qcode/apis/qcode-web.md) - [All operations](https://skmtc.dev/qcode/apis/qcode-web/llms.txt) - [OpenAPI document](https://skmtc.dev/qcode/apis/qcode-web/revisions/9632b29aa008?raw)
