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

# Create Stripe customer portal session

`POST /v1/billing/portal`

## Request

- Base URL: `https://api.agentry.sh`
- URL: `https://api.agentry.sh/v1/billing/portal`
- Auth: HTTP bearer

Durable account-scoped Stripe portal saga. Requires a stable Idempotency-Key and encrypts the bearer-like portal URL for exact replay. Portal creation remains available as the non-charging remediation path while account deletion has fenced new checkout/customer creation.

## Headers

- `Idempotency-Key` string, required

## Request body

- object
  - `return_url` string

## Response `200`

OK

- object
  - `command_id` string, required
  - `url` string, required
  - `session_id` string, required
  - `customer_id` string, required
  - `idempotent_replay` boolean, required
  - `next_action` string

## Other responses

- `202`: The same or another account billing mutation owns the bounded lease; honor Retry-After and preserve this request's Idempotency-Key
- `428`: Stable Idempotency-Key required
- `default`: Error

---

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