---
title: "Create a checkout link"
method: POST
path: "/v1/billing/checkout"
tags: ["billing"]
---

# Create a checkout link

`POST /v1/billing/checkout`

## Request

- Base URL: `https://api.niubai.vip` (the document declares no server; this is the origin it was published from)
- URL: `https://api.niubai.vip/v1/billing/checkout`
- Auth: HTTP bearer

A merchant-of-record checkout URL for a subscription plan or a credit pack, bound to the calling key's account. Open it in a browser; payment applies to the account through the webhook within a minute. The account page offers the same links without an API call.

## Request body

- CheckoutRequest
  - `plan` string, nullable: starter | growth | scale
  - `pack` string, nullable: pack_500 | pack_5k

## Response `200`

Successful Response

- CheckoutOut
  - `url` string, required: Open in a browser to pay.
  - `item` string, required
  - `kind` string, required: `plan` or `pack`.

## Other responses

- `400`: error.code is one of: invalid_request
- `401`: error.code is one of: unauthorized
- `429`: error.code is one of: rate_limited
- `502`: error.code is one of: upstream_error

---

[API](https://skmtc.dev/niubai/apis/pdf-edit-api-gateway.md) · [All operations](https://skmtc.dev/niubai/apis/pdf-edit-api-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/niubai/apis/pdf-edit-api-gateway/revisions/83ed2bb54eb5?raw)
