---
title: "Create purchase code"
method: POST
path: "/purchase"
tags: ["purchase"]
---

# Create purchase code

`POST /purchase`

## Request body

- object
  - `plan` integer, required — #### Plans The plan determines the type of subscription a user purchases. This affects permissions and billing for example. Valid plans are: * **1** Friends & Family * **2** Basic * **3** Developer - `equals admin permissions` **0** means the user doesn't have an active subscription anymore.
  - `stock` integer, required — How many subscriptions may be purchased using this link
  - `instance_limit` integer, required

## Response `201`

Purchase link created successfully

- object
  - `link` string, uri, required

## Other responses

- `400` — Bad request
- `401` — Request unauthorized
- `500` — Internal server error
- `5XX` — Unexpected/-handled error

---

[API](https://skmtc.dev/discord/apis/copped-aio-database-api.md) · [All operations](https://skmtc.dev/discord/apis/copped-aio-database-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/discord/copped-aio-database-api/revisions/b60a9661e94b/schema)
