# createBillingPortal

> Part of the MAP Audio Music API docs. Index of every page: https://map.audio/developers/music-api/llms.txt. OpenAPI document: https://map.audio/developers/music-api/openapi.json.

`POST https://api.map.audio/v1/billing/portal`

Open the billing portal

Open the Stripe billing portal, where a subscriber changes plan or card, cancels and reads invoices. Needs a map.audio sign-in on MAP Audio's own pages. It does not wait on the terms, so a subscription can always be cancelled.

Auth: `Authorization: Bearer` with an API key or a map.audio access token. Not an MCP tool: Spends money on a Stripe page a person completes in a browser; only MAP Audio's own pages may open one.

## Example

```sh
curl -sS -X POST "https://api.map.audio/v1/billing/portal" \
  -H "Authorization: Bearer $MAP_API_KEY" \
  -H "Map-Version: 2026-11-01"
```

### 200: Portal

```json
{
  "object": "billing_link",
  "url": "https://billing.stripe.com/p/session/live_YWNjdF8xUHFSc1R1VndYeVo"
}
```

### 409: No billing account yet

```json
{
  "error": {
    "type": "conflict",
    "code": "billing_not_available",
    "message": "Nothing has been bought on this account yet, so it has no billing portal; buy with POST /v1/billing/checkout.",
    "param": null,
    "retryable": false,
    "jobId": null,
    "docUrl": "https://map.audio/developers/music-api/errors#billing_not_available",
    "requestId": "9a3f7c2e5b1d8f40-LHR"
  }
}
```

## Responses

- `200`: The billing portal.
- `409`: No billing account yet
- `default`: Any other error: `error.code` names it, `error.param` the field at fault, and `error.docUrl` its entry in the error catalogue.

## Errors

- [`oauth_required`](https://map.audio/developers/music-api/errors#oauth_required)
- [`billing_not_available`](https://map.audio/developers/music-api/errors#billing_not_available)
- [`billing_rate_limited`](https://map.audio/developers/music-api/errors#billing_rate_limited)
- [`billing_unavailable`](https://map.audio/developers/music-api/errors#billing_unavailable)
- [`idempotency_key_unsupported`](https://map.audio/developers/music-api/errors#idempotency_key_unsupported)
