---
title: "Create Portal Session"
method: POST
path: "/api/v1/billing/portal"
tags: ["billing"]
---

# Create Portal Session

`POST /api/v1/billing/portal`

## Request

- Base URL: `https://api.badgeia.com`
- URL: `https://api.badgeia.com/api/v1/billing/portal`
- Auth: none declared

Create a Stripe Customer Portal session.

In dev mode, returns current plan info without changing anything.

This remains available when ``BILLING_ENABLED`` is false. That flag blocks
creation/cancellation; an authenticated existing customer still needs the
provider-hosted portal to resolve an invoice or update a failing card.

## Response `200`

Successful Response

- union
  - PortalResponse
    - `portal_url` string, required
  - DevUpgradeResponse
    - `dev_mode` boolean
    - `plan` string, required
    - `user` UserRead, required
      - `email` string, email, required
      - `name` string, nullable
      - `avatar_url` string, nullable
      - `id` string, uuid, required
      - `username` string, nullable
      - `auth_provider` string, required
      - `plan` string, required
      - `has_billing_account` boolean
      - `plan_interval` string, nullable
      - `email_verified` boolean
      - `trial_ends_at` string, date-time, nullable
      - `is_active` boolean, required
      - `created_at` string, date-time, required
      - `updated_at` string, date-time, required
      - `notify_run_complete` boolean, required
      - `notify_score_change` boolean, required
      - `notify_rank_change` boolean, required
      - `notify_weekly_digest` boolean, required
      - `notify_lifecycle_email` boolean
      - `notify_regression` boolean
      - `pmf_survey_last_shown` string, date-time, nullable
      - `marketplace_payout_email` string, nullable
      - `is_admin` boolean
      - `deletion_requested_at` string, date-time, nullable
      - `deletion_due_at` string, date-time, nullable
      - `arena_run_count` integer
      - `monthly_run_count` integer
      - `agent_count` integer
      - `team_count` integer

---

[API](https://skmtc.dev/badgeia/apis/badge.md) · [All operations](https://skmtc.dev/badgeia/apis/badge/llms.txt) · [OpenAPI document](https://skmtc.dev/badgeia/apis/badge/revisions/7e7f7fee8b77?raw)
