---
title: "Open the billing portal"
method: POST
path: "/billing/portal"
---

# Open the billing portal

`POST /billing/portal`

## Request

- Base URL: `https://app.yoping.me/api/v1`
- URL: `https://app.yoping.me/api/v1/billing/portal`
- Auth: API key in cookie `yp_session`

Creates a Paddle customer-portal session — card updates, cancellation, invoices — and returns its URL for the browser to redirect to. Paddle's portal does not support switching plans; an existing subscriber switches plan through POST /billing/change-plan, and an account with no subscription buys through POST /billing/checkout. Returns 400 `validation_failed` when billing is not configured or the account has no billing customer yet (nothing has ever been purchased).

## Response `200`

The Billing Portal session URL.

- object: Uniform success envelope: the payload is always under `data`.
  - `data` BillingRedirect, required: A page to redirect the browser to — the Paddle customer portal.
    - `url` string, uri, required

## Other responses

- `400`: Invalid input (code `validation_failed`): malformed JSON, a missing or out-of-range field, bad pagination parameters, or a rejected token.
- `401`: Not authenticated (code `unauthorized`): missing, invalid, or expired session; invalid login credentials; or a Bearer token, which this surface rejects.
- `403`: Forbidden. Code `forbidden` for a cross-origin (CSRF) request blocked by origin validation or for API-key management attempted without a browser session; `account_suspended` when a suspended account attempts a mutation; `account_deleted` when an account in its deletion grace window calls a non-exempt route.
- `429`: Too many requests (code `rate_limited`). A global per-IP budget of 300 requests/minute (burst 60) applies to every endpoint; login, signup, and test alerts have tighter dedicated limits.

---

[API](https://skmtc.dev/yoping/apis/yopingme-api.md) · [All operations](https://skmtc.dev/yoping/apis/yopingme-api/llms.txt) · [OpenAPI document](https://skmtc.dev/yoping/apis/yopingme-api/revisions/76d8deb40173?raw)
