# createBillingCheckout

> 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/checkout`

Buy a tier or render-minutes

Open a Stripe Checkout page to subscribe to a paid tier or to buy render-minutes; the tier or credits apply once Stripe confirms the payment. Send `tier` or `renderMinutes`, not both. Needs a map.audio sign-in on MAP Audio's own pages, as https://map.audio/music uses; an API key or another app cannot buy. Answers with a URL for a person to open in a browser.

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.

## Body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `tier` | "creator" \| "pro" \| "app" | no | A paid tier to subscribe to. |
| `renderMinutes` | integer | no | Whole render-minutes of pay-as-you-go credit to buy. From 334 to 100000. |
| `consent` | object | no | The buyer's analytics and advertising choice on map.audio, which the purchase's analytics and ad reports follow. Without it, both count as denied. |
| `consent.analytics` | "granted" \| "denied" | yes |  |
| `consent.advertising` | "granted" \| "denied" | yes |  |

## Example

```sh
curl -sS "https://api.map.audio/v1/billing/checkout" \
  -H "Authorization: Bearer $MAP_API_KEY" \
  -H "Map-Version: 2026-11-01" \
  -H "Content-Type: application/json" \
  -d '{"tier":"pro","consent":{"analytics":"granted","advertising":"denied"}}'
```

### Request: Subscribe to Pro

```json
{
  "tier": "pro",
  "consent": {
    "analytics": "granted",
    "advertising": "denied"
  }
}
```

### Request: Buy 500 render-minutes

```json
{
  "renderMinutes": 500
}
```

### 200: Checkout

```json
{
  "object": "billing_link",
  "url": "https://checkout.stripe.com/c/pay/cs_live_a1B2c3D4e5F6g7H8i9J0kLmNoPqRsTuVwXyZ"
}
```

### 409: Already subscribed

```json
{
  "error": {
    "type": "conflict",
    "code": "subscription_exists",
    "message": "This account already subscribes to a plan; change or cancel it from the billing portal (POST /v1/billing/portal).",
    "param": null,
    "retryable": false,
    "jobId": null,
    "docUrl": "https://map.audio/developers/music-api/errors#subscription_exists",
    "requestId": "9a3f7c2e5b1d8f40-LHR"
  }
}
```

## Responses

- `200`: A Stripe Checkout page.
- `409`: Already subscribed
- `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)
- [`terms_required`](https://map.audio/developers/music-api/errors#terms_required)
- [`subscription_exists`](https://map.audio/developers/music-api/errors#subscription_exists)
- [`billing_rate_limited`](https://map.audio/developers/music-api/errors#billing_rate_limited)
- [`billing_unavailable`](https://map.audio/developers/music-api/errors#billing_unavailable)
- [`invalid_request`](https://map.audio/developers/music-api/errors#invalid_request)
- [`unsupported_media_type`](https://map.audio/developers/music-api/errors#unsupported_media_type)
- [`payload_too_large`](https://map.audio/developers/music-api/errors#payload_too_large)
- [`idempotency_key_unsupported`](https://map.audio/developers/music-api/errors#idempotency_key_unsupported)
