---
title: "Finalize a domain purchase after the embedded payment completes"
method: POST
path: "/registrar/fulfill"
tags: ["Registrar"]
---

# Finalize a domain purchase after the embedded payment completes

`POST /registrar/fulfill`

## Request

- Base URL: `https://api.customdomain.ai/v1`
- URL: `https://api.customdomain.ai/v1/registrar/fulfill`
- Auth: HTTP bearer

Verifies the session, registers the domain, captures the charge, and auto-connects the domain. Idempotent per session id (the Stripe webhook drives the same path server-side, so a closed tab never strands a paid session). `201` on first fulfillment, `200` on an idempotent replay. Exactly one caller fulfills a session: the first to claim its order registers the domain and captures the charge, and a caller that arrives while it is still working waits briefly, then gets that result or a `409` with code `fulfillment_in_progress`. A `409` never releases the authorization; retry the call, or read `GET /v1/sell/orders/{id}`, to see the outcome.

## Request body

- object
  - `session_id` string, required

## Response `200`

Already fulfilled (idempotent replay)

- SellOrder: The finalized order record returned by fulfillment. Its stable, documented projection is available via `GET /v1/sell/orders/{id}` (`SellOrderView`); additional internal fields may be present here.
  - `Domain` string
  - `Registrar` string
  - `RegOrderID` string

## Other responses

- `201`: Purchased
- `400`: Error envelope: {code, title, details}.
- `401`: Error envelope: {code, title, details}.
- `409`: Another call is still completing this purchase (code: fulfillment_in_progress). The payment stays authorized and `order` is the order as it stands (status `purchasing`). Also `conflict` when the order can no longer be fulfilled (for example `expired`); the card was not charged.
- `502`: Registrar registration failed after payment authorization; the card authorization was released (code: registration_failed).
- `503`: Error envelope: {code, title, details}.

---

[API](https://skmtc.dev/customdomain/apis/customdomain-control-plane-api.md) · [All operations](https://skmtc.dev/customdomain/apis/customdomain-control-plane-api/llms.txt) · [OpenAPI document](https://skmtc.dev/customdomain/apis/customdomain-control-plane-api/revisions/34d89cb7a7cd?raw)
