---
title: "Create a Stripe Customer Portal session and return the redirect URL. Requires the user to already have a `stripe_customer_id` (i.e. has initiated at least one checkout). 404 otherwise."
method: POST
path: "/api/billing/portal"
tags: ["billing"]
---

# Create a Stripe Customer Portal session and return the redirect URL. Requires the user to already have a \`stripe_customer_id\` (i.e. has initiated at least one checkout). 404 otherwise.

`POST /api/billing/portal`

## Request

- The document declares no server URL.
- Auth: none declared

## Response `200`

Portal session created

- PortalSessionResponse
  - `url` string, required: Stripe-hosted Customer Portal URL; redirect the browser here.

## Other responses

- `401`: Not authenticated
- `404`: User has no Stripe customer yet
- `500`: Stripe API error

## Changes

- **2026-05-05** `68e179aba81a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/scholia-study/apis/scholia-api/changes/api/billing/portal/post.md)

---

[API](https://skmtc.dev/scholia-study/apis/scholia-api.md) - [All operations](https://skmtc.dev/scholia-study/apis/scholia-api/llms.txt) - [OpenAPI document](https://skmtc.dev/scholia-study/apis/scholia-api/revisions/684b3751bfd3?raw)
