---
title: "Start paying for a plan with the chosen method and an optional promo code"
method: POST
path: "/api/v1/workspaces/{workspaceId}/billing/checkout"
tags: ["Billing"]
---

# Start paying for a plan with the chosen method and an optional promo code

`POST /api/v1/workspaces/{workspaceId}/billing/checkout`

## Request

- Base URL: `https://otprun.com`
- URL: `https://otprun.com/api/v1/workspaces/{workspaceId}/billing/checkout`
- Auth: HTTP bearer

## Path parameters

- `workspaceId` integer, required

## Request body

- CheckoutInputBody
  - `interval` 'month' | 'year', required
  - `method` 'paddle' | 'crypto' | 'kaspi': Defaults to paddle
  - `plan` 'starter' | 'growth' | 'scale', required
  - `promo_code` string

## Response `200`

OK

- CheckoutBody
  - `paddle` PaddleCheckoutBody, required
    - `client_token` string, required
    - `custom_data` object, required
    - `discount_id` string, required
    - `environment` string, required
    - `price_id` string, required
  - `payment` PaymentBody, required
    - `amount` integer, required: Amount to pay, in minor units
    - `created_at` string, date-time, required
    - `currency` 'USD' | 'KZT', required
    - `discount_amount` integer, required
    - `expires_at` string, date-time, required
    - `id` string, required
    - `interval` 'month' | 'year', required
    - `list_amount` integer, required: Price before the discount, in minor units
    - `method` 'paddle' | 'crypto' | 'kaspi', required
    - `paid_at` string, date-time, nullable, required
    - `pay_url` string, required: Page of the payment provider; empty for the card form, which opens on this page
    - `plan` 'starter' | 'growth' | 'scale', required
    - `promo_code` string, required
    - `status` 'pending' | 'paid' | 'expired' | 'canceled', required

## Other responses

- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

[API](https://skmtc.dev/otprun/apis/otp-run-api.md) · [All operations](https://skmtc.dev/otprun/apis/otp-run-api/llms.txt) · [OpenAPI document](https://skmtc.dev/otprun/apis/otp-run-api/revisions/43d40d5f4050?raw)
