> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stellartools.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Customer Portal

> Create portal sessions for customers

A customer portal session gives a customer a short-lived authenticated URL to manage their own subscriptions — cancel, view billing history, and update payment methods.

## The portal session object

**url** `string`

The URL to redirect the customer to. Valid until `expires_at`.

**token** `string`

The session token embedded in the URL.

**expires\_at** `string`

ISO 8601 timestamp. The session expires shortly after creation.

***

## Create a portal session

`POST /customers/{customer_id}/portal`

Create a session and redirect the customer to the returned `url`. The URL is single-use and short-lived — generate it on demand, never store it.

```bash theme={null}
curl -X POST https://api.stellartools.dev/customers/cus_01jx.../portal \
  -H "x-api-key: YOUR_API_KEY"
```

No request body required.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.