---
title: "Create domain checkout link"
method: POST
path: "/api/apps/{app_id}/custom-domains/purchase-url"
---

# Create domain checkout link

`POST /api/apps/{app_id}/custom-domains/purchase-url`

<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Creates a one-time checkout link for buying a domain through Base44.

Not every workspace can buy domains through the API. For one that can't, the call is rejected and the domain has to be bought in the Base44 editor.

Pass `domain` to open checkout on that domain, and check it first with [Check domain availability](/api-reference/check-domain-availability). Leave it out to open checkout on a domain search.

The person who opens the link pays at checkout, and nothing is bought until they finish. The domain is then attached to the app once it's registered, and appears in [List custom domains](/api-reference/list-custom-domains).

Each call returns a new link and buys nothing, so retrying is safe, including after a timeout. The call fails while the checkout provider is unavailable.

Creating links is limited to 6 requests a minute and 20 an hour per caller. Some workspaces have a different limit.

## Path parameters

- `app_id` string, required — ID of the app you're finding a domain for.

## Request body

- DomainPurchaseUrlRequest
  - `domain` string, nullable — Domain to open checkout on, such as `example.com`. Leave it out to open checkout on a domain search.
  - `offer_business_email` boolean — Whether checkout also offers a business email address on the domain after the purchase (`true`) or not (`false`).

## Response `200`

Successful Response

- DomainPurchaseUrl — A checkout link for buying a domain.
  - `url` string, required — Checkout link to open in the browser of the person who'll pay. Treat it as opaque. It works once, so create a new one for each checkout.

## Other responses

- `400` — `domain` isn't a valid domain name, or you have reached the limit of 350 custom domains.
- `401` — Missing or invalid credentials.
- `402` — This workspace's plan doesn't include custom domains.
- `403` — You don't have access to this app, or you used a workspace API key. These endpoints take a personal API key.
- `404` — App not found.
- `409` — This workspace can't buy domains through the API, so the purchase has to happen in the Base44 editor.
- `422` — Validation Error
- `429` — Rate limit reached. Retry later.

## Changes

- **2026-09-24** `eb89d67965ff` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/base44/apis/base44-app-management-api/changes/api/apps/:app_id/custom-domains/purchase-url/post.md)

---

[API](https://skmtc.dev/base44/apis/base44-app-management-api.md) · [All operations](https://skmtc.dev/base44/apis/base44-app-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/base44/apis/base44-app-management-api/revisions/5e69adeb8667?raw)
