---
title: "Create billing portal session"
method: POST
path: "/billing_portal/sessions"
tags: ["Billing Portal"]
---

# Create billing portal session

`POST /billing_portal/sessions`

## Request

- Base URL: `https://api.crevio.co/v1`
- URL: `https://api.crevio.co/v1/billing_portal/sessions`
- Auth: API key in header `Authorization`

Creates a short-lived link to a customer's hosted billing page on billing.crevio.co, where they can update their payment method and billing address, download invoices and manage subscriptions. Redirect the customer to `url` right away: it must be opened before `expires_at`, then keeps working for an hour in the browser that opened it. Do not store it or put it in emails.

## Headers

- `Idempotency-Key` string

## Request body

- BillingPortalSessionRequest
  - `customer` string: ID of the customer (cus_...) the billing page is for. Required.
  - `return_url` string, nullable: Where the billing page Return link sends the customer. Defaults to your site.

## Response `201`

Billing portal session created

- BillingPortalSession
  - `object` string, required
  - `customer` string, required
  - `url` string, required
  - `return_url` string, nullable, required
  - `expires_at` string, required

## Other responses

- `400`: Bad request
- `401`: Authentication required
- `403`: Forbidden
- `404`: Resource not found
- `422`: Validation error
- `429`: Rate limit exceeded — 600 requests per minute per credential. Retry after the number of seconds in `Retry-After`.
- `500`: Internal server error

---

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