# Record a completed plan checkout now (owners and admins)

> Record a completed plan checkout now (owners and admins): CustomDomain™ API reference in the billing group. Covers parameters, request body and responses.

Source: https://docs.customdomain.ai/docs/api-reference/billing/confirmBillingCheckout

## `POST https://api.customdomain.ai/v1/billing/checkout:confirm`

Called when Stripe returns the browser from a completed Checkout, so the subscription is recorded at once instead of when Stripe's `checkout.session.completed` event arrives. The session is read from Stripe, never trusted from the caller: it must belong to the caller's workspace (another workspace's session is a `404`) and be complete and paid (a trial's "no payment required" counts); otherwise `confirmed` is false and nothing changes. A paid second checkout for a workspace whose subscription still bills is held for review: `confirmed` is false, nothing changes, and the billing view shows the subscription that still bills. Idempotent with the webhook. Requires `billing:manage`.

### Authentication

`apiKey`

### Request body (JSON)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `session_id` | string | yes |  |

### Responses

| Status | Description |
| --- | --- |
| `200` | Whether the checkout was recorded, and the billing status after |
| `400` | Error envelope: {code, title, details}. |
| `401` | Error envelope: {code, title, details}. |
| `403` | Error envelope: {code, title, details}. |
| `404` | Error envelope: {code, title, details}. |
| `503` | Error envelope: {code, title, details}. |

### `200` response body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `confirmed` | boolean | no |  |
| `session_status` | string | no |  |
| `payment_status` | string | no |  |
| `billing` | object | no |  |

The full specification is served at `GET https://api.customdomain.ai/v1/openapi.json`.
