> ## Documentation Index
> Fetch the complete documentation index at: https://docs.60db.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Subscribe to a Plan

> Start checkout for a plan on monthly or yearly billing, or switch the workspace to another plan or cycle

Starts a payment for the plan and billing cycle. Send the user to `checkout_url` to complete payment. The plan changes only after the payment succeeds.

Yearly plans cost 10 times the monthly price and reset their credits every month. See [Annual billing](https://docs.60db.ai/get-started/plans-credits-and-top-ups.md#annual-billing) for the switching rules.

> [!NOTE]
>
> Only the **workspace owner** can call this endpoint. It is protected by the `billing:manage` permission.

## Request

### Headers

**Authorization** `string` *required*

Bearer token (JWT or API key)

### Body

**plan\_slug** `string` *required*

Target plan: `starter`, `creator` or `pro`

**billing\_cycle** `string` (default: monthly)

`monthly` or `yearly`

```bash theme={null}
curl -X POST https://api.60db.ai/billing/subscribe \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"plan_slug": "creator", "billing_cycle": "yearly"}'
```

## Response

**data.checkout\_url** `string`

Dodo checkout page to redirect the user to

**data.action** `string`

`subscribe`, `upgrade` or `switch_to_yearly`

**data.billing\_cycle** `string`

`monthly` or `yearly`

**data.amount** `number`

Price in USD for the chosen cycle

**data.proration** `object`

Present on a yearly-to-higher-yearly upgrade. `credit_usd` is the discount, `months_left` the unused full months, and `discount_id` the one-time discount applied at checkout.

## Errors

| Status | `error_code` | Meaning |
| - | - | - |
| 400 | `INVALID_BILLING_CYCLE` | `billing_cycle` is not `monthly` or `yearly` |
| 400 | `CYCLE_NOT_AVAILABLE` | The plan has no price for this cycle (for example, Free) |
| 400 | `DOWNGRADE_KEEPS_CYCLE` | A downgrade must keep the current billing cycle |
| 403 | `YEARLY_TO_MONTHLY_NOT_ALLOWED` | A yearly plan cannot switch to monthly. Cancel it and choose monthly after it ends |
| 409 | `PAYMENT_PROCESSING` | A previous plan change payment is still processing |
| 503 | `PLAN_NOT_CONFIGURED` | Payment is not set up for this plan and cycle yet |

## Related

* [List plans](https://docs.60db.ai/api-reference/billing/plans.md)
* [Current plan](https://docs.60db.ai/api-reference/billing/current-plan.md)
* [Errors and status codes](https://docs.60db.ai/api-reference/introduction.md#http-status-codes)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.