---
title: "Manage account billing"
description: "Creates a Stripe-hosted Customer Portal Session for payment method, invoice, and subscription management and returns its URL."
canonical: "https://www.cool.computer/docs/api-reference/billing/manage-account-billing"
---
# Manage account billing

> Creates a Stripe-hosted Customer Portal Session for payment method, invoice, and subscription management and returns its URL.

```http
POST https://api.cool.computer/api/billing/portal
```

Creates a Stripe-hosted Customer Portal Session for payment method, invoice, and subscription management and returns its URL.

## Authorization

- A Cool Computers API key, user access token, or claimed agent access token in the Authorization header. Follow https://www.cool.computer/auth.md for agent registration and https://www.cool.computer/authentication.md for direct user credentials.

## Responses

- `201`: A Stripe-hosted customer portal URL.
  - `application/json` (object)
    - `url` (string, uri, pattern `^https://`, required)
- `401`: Unauthorized.
- `409`: The account has no Stripe customer yet.
- `429`: Too Many Requests. If the problem code is api_request_rate_exceeded, wait for Retry-After seconds; other problem codes describe a separate limit.
- `500`: Internal Server Error.
- `default`: A machine-readable API error with a stable code and recovery instruction.

An error is an `application/problem+json` document with a stable `code`; [API errors](/docs/api-reference/errors) says how to handle one.

## Example

```sh
curl -X POST "https://api.cool.computer/api/billing/portal" \
  -H "authorization: Bearer $TOKEN"
```
