---
title: "Create Checkout"
method: POST
path: "/api/v1/billing/checkout"
tags: ["billing"]
---

# Create Checkout

`POST /api/v1/billing/checkout`

## Request

- Base URL: `https://api.cohearence.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.cohearence.app/api/v1/billing/checkout`
- Auth: HTTP bearer

Start a Polar checkout for the Pro plan and hand back its URL.

The session is bound to ``users.id`` as Polar's external customer id, which is what
lets the resulting ``customer.state_changed`` webhook find this account again.

Reconciles first. If a webhook was lost, our row says "free" while Polar says
"active" — and sending that user to checkout produces a dead end, because Polar
refuses with *"You already have an active subscription"* and the user is left staring
at a red error on a page they cannot complete. Pulling the real state first turns
that into a 409 the client can act on.

## Response `200`

Successful Response

- CheckoutResponse: Where to send the browser to complete a purchase.
  - `url` string, required

---

[API](https://skmtc.dev/cohearence/apis/health-agent-api.md) · [All operations](https://skmtc.dev/cohearence/apis/health-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cohearence/apis/health-agent-api/revisions/c7aee7d6ecf0?raw)
