---
title: "Create Portal"
method: POST
path: "/api/billing/portal"
---

# Create Portal

`POST /api/billing/portal`

## Request

- Base URL: `https://api.drillflow.de` (the document declares no server; this is the origin it was published from)
- URL: `https://api.drillflow.de/api/billing/portal`
- Auth: none declared

Stripe's own billing portal: cancel, switch interval, change card, get
invoices. Building any of that here would be rebuilding it worse.

`flow` opens a specific part of it (C9): `cancel` lands on the
cancellation of the live subscription, `payment` on changing the card.

## Request body

- PortalRequest: Which part of Stripe's portal to open (C9). None = its front page; `cancel` and `payment` go straight to that flow, so the button on the account page does what it says instead of landing on a menu.
  - `flow` 'cancel' | 'payment', nullable

## Response `200`

Successful Response

- BillingSession: A hosted Stripe page the browser is sent to — checkout or portal.
  - `url` string, required

## Other responses

- `422`: Validation Error

---

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