---
title: "Start a checkout"
method: POST
path: "/v1/billing/checkout"
tags: ["Billing"]
---

# Start a checkout

`POST /v1/billing/checkout`

## Request

- Base URL: `https://dnsmint.com/api`
- URL: `https://dnsmint.com/api/v1/billing/checkout`
- Auth: HTTP bearer

Create a hosted checkout the account owner completes, so a caller that has hit its cap has somewhere to send them. Returns a URL and charges nothing. Requires the billing:write scope. Only for an account with no plan yet: changing a plan that already exists charges the card on file, so it answers 409 with the page where a person does that.

## Request body

- CheckoutRequest
  - `hostnames` integer: Hostnames the plan should include.
  - `domains` integer: Dedicated domains the plan should include.

## Response `200`

A checkout to open

- Checkout
  - `checkout_url` string, required: Where the account owner completes the purchase.
  - `amount_cents` integer, required: What the plan costs each month, in cents.
  - `selection` object, required: The plan being bought: domains per pool, and hostnames.

## Other responses

- `400`: The plan asked for is out of bounds
- `401`: Missing, invalid or expired key
- `403`: Key does not carry billing:write
- `409`: The account already has a plan, or the plan asked for is smaller than what it holds
- `429`: Too many checkouts started
- `503`: Billing is unavailable

---

[API](https://skmtc.dev/dnsmint/apis/dnsmint-api.md) · [All operations](https://skmtc.dev/dnsmint/apis/dnsmint-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dnsmint/apis/dnsmint-api/revisions/98fb1f87725a?raw)
