---
title: "Create a Stripe billing portal session"
method: POST
path: "/v1/billing/portal"
tags: ["billing"]
---

# Create a Stripe billing portal session

`POST /v1/billing/portal`

## Request

- Base URL: `https://modelglass-api.vercel.app`
- URL: `https://modelglass-api.vercel.app/v1/billing/portal`
- Auth: none required

Public — the magic `token` (from the emailed account link, see `/v1/auth/magic-link`) is the credential, not a Bearer key. Requires the Stripe Customer Portal to be configured in the Stripe Dashboard.

## Request body

- object
  - `token` string, required

## Response `200`

Billing portal session URL.

- object
  - `ok` true, required
  - `data` object, required
    - `url` string, uri
  - `meta` ResponseMeta, required
    - `artifact_version` integer, required
    - `built_at` string, date-time, required
    - `count` integer: Item count when `data` is a collection.

## Other responses

- `400`: Missing `token` (BAD_REQUEST).
- `404`: Token expired, already used, or unknown (NOT_FOUND).
- `500`: Stripe not configured, or a Stripe error (CONFIGURATION_ERROR / INTERNAL).

---

[API](https://skmtc.dev/modelglass/apis/modelglass-read-api.md) · [All operations](https://skmtc.dev/modelglass/apis/modelglass-read-api/llms.txt) · [OpenAPI document](https://skmtc.dev/modelglass/apis/modelglass-read-api/revisions/5948ffa60462?raw)
