---
title: "Create Stripe Customer Portal session"
method: POST
path: "/billing/customer-portal-session"
---

# Create Stripe Customer Portal session

`POST /billing/customer-portal-session`

## Request

- Base URL: `https://api.gravityads.dev` (the document declares no server; this is the origin it was published from)
- URL: `https://api.gravityads.dev/billing/customer-portal-session`
- Auth: HTTP bearer

## Request body

- object
  - `return_url` string, uri, required
  - `customer_id` string
  - `configuration_id` string

## Response `200`

Customer portal session

- object
  - `status` 'stripe_customer_portal_session_created' | 'customer_portal_session_failed', required
  - `tenant_id` string
  - `session_id` string
  - `url` string
  - `subscription` object
  - `hosted_auth_context` object
  - `error_code` string
  - `message` string
  - `retry` boolean
  - `billing_setup_required` boolean
  - `customer_portal_ready` false
  - `customer_portal_blocked` boolean
  - `stripe_customer_present` boolean
  - `safe_to_manage_billing` false
  - `next_actions` object[]
    - `id` string, required
    - `status` string, required
    - `owner` string
    - `path` string
    - `requires` string[]
    - `url_present` boolean
    - `session_id` string
  - `raw_provider_ids_returned` false
  - `raw_secrets_returned` false, required

## Other responses

- `400`: Customer portal setup or request issue
- `503`: Stripe customer portal unavailable

---

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