---
title: "Subscribe to a plan via API"
method: POST
path: "/billing/subscribe"
tags: ["Billing"]
---

# Subscribe to a plan via API

`POST /billing/subscribe`

## Request

- Base URL: `https://api.tinysend.com/v1`
- URL: `https://api.tinysend.com/v1/billing/subscribe`
- Auth: HTTP bearer

Create a Stripe subscription programmatically. For agents with virtual cards or any API client that has a Stripe payment method. Pass a payment_method_id obtained from Stripe.js or the Stripe API.

## Request body

- object
  - `plan` 'light' | 'plus' | 'max', required: Plan to subscribe to
  - `payment_method_id` string, required: Stripe payment method ID (pm_...)

## Response `201`

Subscription created

- object
  - `subscription_id` string, required
  - `plan` string, required
  - `status` string, required
  - `current_period_end` string, required

## Other responses

- `409`: Already subscribed
- `422`: Validation error

---

[API](https://skmtc.dev/tinysend/apis/tinysend-api.md) · [All operations](https://skmtc.dev/tinysend/apis/tinysend-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tinysend/apis/tinysend-api/revisions/2dc68ac83332?raw)
