> This is a page from the ElevenLabs documentation. For an index of the documentation, fetch https://elevenlabs.io/docs/llms.txt.

# Subscriptions and billing

Each customer workspace can have one subscription to a tier you sell. Your reseller card pays every workspace's invoices. A workspace's current subscription is in the `subscription` field of `workspaces.list`, together with `has_payment_issue`.

## Assign a plan

Subscribe a workspace that has no plan yet. `billing_period` is `monthly_period` (the default) or `annual_period`.

```python
from elevenlabs import ElevenLabs

elevenlabs = ElevenLabs()

elevenlabs.reception.subscriptions.assign(
    "8f1c2a7e4b9d4e6fa3c5b2d1e0f9a8b7",
    tier_id="smbtier_4401k8r2c6hxe9tq3vz7m5wd1nb0",
    billing_period="annual_period",
    idempotency_key="assign-8f1c2a7e-2026-11-03",
)
```

```typescript
import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";

const elevenlabs = new ElevenLabsClient();

await elevenlabs.reception.subscriptions.assign("8f1c2a7e4b9d4e6fa3c5b2d1e0f9a8b7", {
  tierId: "smbtier_4401k8r2c6hxe9tq3vz7m5wd1nb0",
  billingPeriod: "annual_period",
  idempotencyKey: "assign-8f1c2a7e-2026-11-03",
});
```

```bash
curl -X POST "https://api.elevenlabs.io/v1/reception/reseller/workspaces/8f1c2a7e4b9d4e6fa3c5b2d1e0f9a8b7/subscription" \
  -H "xi-api-key: $ELEVENLABS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "tier_id": "smbtier_4401k8r2c6hxe9tq3vz7m5wd1nb0", "billing_period": "annual_period", "idempotency_key": "assign-8f1c2a7e-2026-11-03" }'
```

Send an `idempotency_key` you generate on every assignment or change. If a request times out, retrying it with the same key cannot subscribe or charge the workspace twice.

Assigning or changing a plan is refused while `has_payment_issue` is `true`. Show the unpaid invoice to your customer, or pay it through its `pay_url`, before you retry.

## Change a plan

`subscriptions.change` takes the same body as `assign`.

* An upgrade applies immediately.
* A downgrade or a move to a tier at the same level takes effect at the end of the billing period. Until then, the subscription shows the new tier in `pending_downgrade_tier` and the date in `pending_downgrade_at_unix`.

To keep the workspace on its current tier, drop the scheduled downgrade with `subscriptions.cancel_pending_downgrade`.

```python
elevenlabs.reception.subscriptions.change(
    "8f1c2a7e4b9d4e6fa3c5b2d1e0f9a8b7",
    tier_id="smbtier_4401k8r2d3pfw8ys6bq2n9ja7kc5",
)

elevenlabs.reception.subscriptions.cancel_pending_downgrade("8f1c2a7e4b9d4e6fa3c5b2d1e0f9a8b7")
```

```typescript
await elevenlabs.reception.subscriptions.change("8f1c2a7e4b9d4e6fa3c5b2d1e0f9a8b7", {
  tierId: "smbtier_4401k8r2d3pfw8ys6bq2n9ja7kc5",
});

await elevenlabs.reception.subscriptions.cancelPendingDowngrade("8f1c2a7e4b9d4e6fa3c5b2d1e0f9a8b7");
```

```bash
curl -X PATCH "https://api.elevenlabs.io/v1/reception/reseller/workspaces/8f1c2a7e4b9d4e6fa3c5b2d1e0f9a8b7/subscription" \
  -H "xi-api-key: $ELEVENLABS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "tier_id": "smbtier_4401k8r2d3pfw8ys6bq2n9ja7kc5" }'

curl -X POST "https://api.elevenlabs.io/v1/reception/reseller/workspaces/8f1c2a7e4b9d4e6fa3c5b2d1e0f9a8b7/subscription/cancel-downgrade" \
  -H "xi-api-key: $ELEVENLABS_API_KEY"
```

When a downgrade takes effect, receptionists and phone numbers beyond the new plan's limits are deactivated, and team members beyond its team size are suspended.

## End a plan

`subscriptions.unassign` ends the subscription at the end of the current billing period. Until then, `cancel_at_unix` shows when it ends, and `subscriptions.restore` undoes the cancellation so the plan renews normally.

```python
elevenlabs.reception.subscriptions.unassign("8f1c2a7e4b9d4e6fa3c5b2d1e0f9a8b7")

elevenlabs.reception.subscriptions.restore("8f1c2a7e4b9d4e6fa3c5b2d1e0f9a8b7")
```

```typescript
await elevenlabs.reception.subscriptions.unassign("8f1c2a7e4b9d4e6fa3c5b2d1e0f9a8b7");

await elevenlabs.reception.subscriptions.restore("8f1c2a7e4b9d4e6fa3c5b2d1e0f9a8b7");
```

```bash
curl -X DELETE "https://api.elevenlabs.io/v1/reception/reseller/workspaces/8f1c2a7e4b9d4e6fa3c5b2d1e0f9a8b7/subscription" \
  -H "xi-api-key: $ELEVENLABS_API_KEY"

curl -X POST "https://api.elevenlabs.io/v1/reception/reseller/workspaces/8f1c2a7e4b9d4e6fa3c5b2d1e0f9a8b7/subscription/restore" \
  -H "xi-api-key: $ELEVENLABS_API_KEY"
```

## Invoices

Each charge to your card pays one workspace's invoice. `billing.list_invoices` returns them newest first, one page at a time. An invoice's `status` is one of:

| Status | Meaning                                                             |
| ------ | ------------------------------------------------------------------- |
| `paid` | The card was charged.                                               |
| `open` | The card is still being retried. `pay_url` links to a payment page. |
| `void` | Retries ran out and the workspace's plan was ended.                 |

`billing.get_invoice` adds the invoice's `lines`. A line with a negative `amount_cents` is a proration credit, and the lines always add up to the charge.

```python
page = elevenlabs.reception.billing.list_invoices(page_size=25)
for invoice in page.invoices:
    print(invoice.workspace_name, invoice.status, invoice.amount_cents / 100, invoice.currency)

detail = elevenlabs.reception.billing.get_invoice(page.invoices[0].invoice_id)
for line in detail.lines:
    print(line.kind, line.description, line.amount_cents)
```

```typescript
const page = await elevenlabs.reception.billing.listInvoices({ pageSize: 25 });
for (const invoice of page.invoices) {
  console.log(invoice.workspaceName, invoice.status, invoice.amountCents / 100, invoice.currency);
}

const detail = await elevenlabs.reception.billing.getInvoice(page.invoices[0].invoiceId);
for (const line of detail.lines) {
  console.log(line.kind, line.description, line.amountCents);
}
```

```bash
curl "https://api.elevenlabs.io/v1/reception/reseller/billing/invoices?page_size=25" \
  -H "xi-api-key: $ELEVENLABS_API_KEY"
```

## Upcoming payments

`billing.list_upcoming_payments` estimates each workspace's next renewal, soonest first. `plan_usd` is the plan the renewal charges up front, which is the downgraded tier's price when a downgrade is scheduled. `overage_so_far_usd` is this period's usage beyond the included minutes so far. It is charged at the renewal and keeps growing until then.

```python
upcoming = elevenlabs.reception.billing.list_upcoming_payments()
for payment in upcoming.payments:
    print(
        payment.workspace_name,
        payment.subscription.billing_period_end_unix,
        payment.plan_usd + payment.overage_so_far_usd,
    )
```

```typescript
const upcoming = await elevenlabs.reception.billing.listUpcomingPayments();
for (const payment of upcoming.payments) {
  console.log(
    payment.workspaceName,
    payment.subscription.billingPeriodEndUnix,
    payment.planUsd + payment.overageSoFarUsd
  );
}
```

```bash
curl "https://api.elevenlabs.io/v1/reception/reseller/billing/upcoming" \
  -H "xi-api-key: $ELEVENLABS_API_KEY"
```