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

# Customer portal

> Let customers manage their own billing, signed in from your app.

Customers manage their own billing in a hosted portal: purchases and printable invoices, subscriptions (cancel or resume), seats, license keys, downloads, credit usage, data export and erasure.

## Sign the customer in from your app

Add a "Manage billing" button that mints a session and redirects:

```ts theme={null}
const { customer_portal_url } = await sleetpay.customerSessions.create({ externalCustomerId: user.id });
redirect(customer_portal_url);
```

Pass exactly one of `customerId`, `externalCustomerId` or `customerEmail`. The session token lasts one hour and is bound to your organization. Needs `customer_sessions:write`.

## Sign in without your app

Customers can also open the portal and sign in with an emailed one-time code.

## Custom domains

Under **Settings > Domains** you can serve checkout and portal links from your own hostname. Ownership is proven with a DNS TXT record, and URLs returned by the API then use it.


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