---
title: "Purchase Subscribe"
method: POST
path: "/api/v1/subscribe/purchase"
tags: ["subscribe"]
---

# Purchase Subscribe

`POST /api/v1/subscribe/purchase`

Purchase/activate a subscription. Requires login. Supports preset or custom mode.

## Request body

- AppSchemasSubscribePurchaseRequest — Subscribe purchase request. Either preset_id or daily_limit must be provided.
  - `preset_id` integer, nullable — Preset plan ID (1-7). If set, uses fixed preset pricing.
  - `daily_limit` integer, nullable — Daily cost limit in USD, must be multiple of 5
  - `no_4h_window` boolean — Whether to remove 4h window
  - `months` integer, required — Subscription months
  - `currency` string — Payment currency (CNY or USD)
  - `api_key_name` string, nullable — Custom API key name

## Response `200`

Successful Response

- AppSchemasSubscribePurchaseResponse — Subscribe purchase response.
  - `success` boolean, required
  - `message` string, required
  - `api_key_id` integer, nullable
  - `api_key_value` string, nullable
  - `expires_at` string, nullable
  - `config_summary` object, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/qcode/apis/qcode-web.md) · [All operations](https://skmtc.dev/qcode/apis/qcode-web/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/qcode/qcode-web/revisions/2f2f5f49ffc7/schema)
