> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.mitu.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mitu.ai/_mcp/server.

# Subscriptions

Subscriptions let your business charge for ongoing access to a product or service on a regular schedule. A plan defines what you sell, its price and how often it is charged, and a subscription connects one subscriber to that plan. Many subscribers can share the same plan, while each subscription keeps its own status, charges and billing history, so one subscriber falling behind never affects another.

Subscribers can be people or AI agents, and both are charged automatically each billing period. Plans are managed under **Plans** in the [Mitu dashboard](https://app.mitu.ai), or through the API.

## What subscriptions provide

1. **Recurring billing without manual work**\
   Each billing period, the subscriber is charged automatically and a record of the charge is kept against the subscription.
2. **A billing history per subscriber**\
   Every charge produces an invoice for its period, so any individual charge can be reviewed and reconciled.
3. **Clear signals when payment fails**\
   A failed charge moves the subscription to past due and notifies your systems, so your product can respond as your policy requires.

## Offering a subscription

#### Create a plan

Create a plan for each product and price you offer. In the dashboard, a plan is charged weekly, monthly or yearly. Through the API, a daily interval is also available.

```bash
curl --request POST \
  --url https://api.mitu.ai/v1/plans \
  --header "x-api-key: $MITU_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "name": "Professional",
    "description": "Unlimited projects, priority support and advanced reporting",
    "amount": 49.00,
    "currency": "USD",
    "billingInterval": "month",
    "features": ["Unlimited projects", "Priority support", "Advanced reporting"]
  }'
```

| Parameter         | Description                                                                 |
| ----------------- | --------------------------------------------------------------------------- |
| `name`            | The plan name shown to subscribers.                                         |
| `description`     | What the plan includes.                                                     |
| `amount`          | The amount charged each billing period.                                     |
| `currency`        | The currency of each charge.                                                |
| `billingInterval` | How often subscribers are charged, either `day`, `week`, `month` or `year`. |
| `features`        | The benefits of the plan, shown to subscribers.                             |

#### Let customers subscribe

The simplest way to offer a plan is a [payment link](/platform/payment-experiences/payment-links) of type `subscription`, which a person or an agent can complete to subscribe. You can offer a single plan, or several and let the subscriber choose. The dashboard creates the subscription link for each plan for you.

#### Or subscribe them directly

When your product already knows who is subscribing and to which plan, create the subscription through the API.

```bash
curl --request POST \
  --url https://api.mitu.ai/v1/subscriptions \
  --header "x-api-key: $MITU_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "subscriptionPlanId": "plan_7h2kq9xz",
    "paymentMethod": "mpp_crypto",
    "subscriberId": "cus_ds9hazr8jd3l",
    "subscriberType": "user"
  }'
```

Recurring charges use MPP, because the payment method must permit future charges without the subscriber approving each one. Choose `mpp_crypto` to charge in USDC or `mpp_spt` to charge by card. Set `subscriberType` to `user` for a person or `agent` for an AI agent, which is the default.

#### Follow each billing period

Each billing period produces a charge and an invoice for that period. Your systems are notified through [events](/platform/webhooks/events) when a subscription is created, each time a charge succeeds, when a charge fails and the subscription becomes past due, and when it is cancelled.

```http
GET /v1/subscriptions?status=past_due&subscription_plan_id=plan_7h2kq9xz
GET /v1/subscriptions/{id}
GET /v1/subscriptions/{id}/invoices
```

#### Cancel when billing should stop

Cancel a subscription to stop future charges. The subscription and its invoices are retained, so its billing history is never lost.

```http
POST /v1/subscriptions/{id}/cancel
```

## Managing plans

Plans can be listed and filtered by status, and archived or restored from the dashboard. A plan that is paused or archived is no longer offered to new subscribers, while existing subscriptions continue as before. An archived plan can be restored at any time.

| Plan state | Meaning                                                                           |
| ---------- | --------------------------------------------------------------------------------- |
| `active`   | Offered to new subscribers.                                                       |
| `paused`   | Temporarily not offered. Existing subscriptions continue.                         |
| `archived` | No longer offered. Existing subscriptions continue, and the plan can be restored. |

## Subscription and charge states

| Subscription state | Meaning                                     |
| ------------------ | ------------------------------------------- |
| `active`           | Billing normally.                           |
| `past_due`         | The most recent charge did not complete.    |
| `paused`           | Billing is temporarily paused.              |
| `cancelled`        | Cancelled, and no further charges are made. |
| `expired`          | The subscription has reached its end.       |

| Charge state | Meaning                                                                   |
| ------------ | ------------------------------------------------------------------------- |
| `pending`    | The charge has been raised and is being collected.                        |
| `paid`       | The charge was collected.                                                 |
| `failed`     | The charge could not be collected, and the subscription becomes past due. |
| `refunded`   | The charge was collected and later refunded.                              |
| `void`       | The charge was cancelled before it was collected.                         |

## Subscription practices

1. **Keep plans stable**\
   When the price or terms of a plan change materially, create a new plan rather than altering one in use, so each subscriber's history remains clear.
2. **Decide your past due policy in advance**\
   Mitu reports a failed charge, while your product decides what follows, such as notifying the subscriber, allowing a grace period or restricting access.
3. **Reconcile each period from its invoice**\
   Use the invoice produced for each charge to reconcile that period, and the subscription itself to understand the overall relationship.

Subscriptions give your business predictable, recurring revenue from people and agents alike, with every charge recorded, every failure reported and the policies that follow left entirely under your control.