Skip to content

Custom domains

A custom domain serves Flint-hosted checkout or the Flint-hosted customer account on a hostname you own, such as pay.example.com or account.example.com. Each one has a custom_domain_id beginning with cdom_, a type of checkout or customer_account, the DNS records to publish, and a status that moves from provisioning to active. The Custom domains guide covers DNS setup, status reasons, redirects, and the add-on in full.

Manage custom domains#

Listing and getting custom domains requires settings.read. Creating, checking, and archiving them requires settings.write. Each environment has its own custom domains, and an ID from another environment returns 404 RESOURCE_NOT_FOUND, the same as an unknown ID. Creating a domain needs the custom domain add-on, and a checkout domain needs a live key.

cURL
curl -X POST https://api.withflintpay.com/v1/custom-domains \
  -H "Authorization: Bearer YOUR_LIVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "type": "customer_account", "hostname": "account.example.com" }'

An environment has at most one custom domain of each type that isn't archived. Creating another returns 409 ALREADY_EXISTS with param type, and details[0].current_resource is the existing domain. A domain's hostname can't change: archive the domain and create a new one. A customer_account domain needs customer_account.mode flint_hosted; with merchant_hosted, creating one returns 409 ACTION_NOT_ALLOWED with details[0].reason customer_account_mode_conflict.

GET /v1/custom-domains returns domains newest first, ordered by created_at and then custom_domain_id, both descending. Set page_size from 1 to 100, with 20 returned by default, and pass next_page_token as the next request's page_token. Filter with type and status, each taking one or more values. Archived domains are left out unless status names archived. GET /v1/custom-domains/{custom_domain_id} returns any domain, including an archived one.

If the create response is lost and a retry returns 500 IDEMPOTENCY_RECOVERY_REQUIRED, keep the original Idempotency-Key. List domains with GET /v1/custom-domains?type=customer_account and GET /v1/custom-domains?type=customer_account&status=archived, using type=checkout for both requests if that was the original type. Follow pagination and inspect current and archived domains for the requested hostname; use a matching domain's custom_domain_id to retrieve its current state. Do not switch keys or wait for key retention to expire to create again. Contact support with the request_id if the outcome is still unclear.

POST /v1/custom-domains/{custom_domain_id}/validate checks the DNS records and certificate again now. Send no body or an empty JSON object. Each domain can be checked once every 60 seconds; a sooner request returns 429 RATE_LIMIT_EXCEEDED with Retry-After. Checking an archived domain returns 409 ACTION_NOT_ALLOWED with details[0].reason archived.

Archive a custom domain#

DELETE /v1/custom-domains/{custom_domain_id} archives the domain. New links use Flint's address right away, and requests to the hostname redirect to Flint's address until redirect_expires_at, at most 30 days after archiving. Once archived, dns_records lists the records you can delete. Archiving an archived domain returns it unchanged. An archived domain can't be restored; create a new domain to use the hostname again.

While a customer_account domain isn't archived, PATCH /v1/settings refuses to set customer_account.mode to merchant_hosted or to send "customer_account": null, with 409 RESOURCE_IN_USE. details[0].blocking_resources names the domain.

Status changes#

custom_domain.status_changed sends the custom domain, the same object GET /v1/custom-domains/{custom_domain_id} returns, each time its status changes, including when it's archived. status_reason is null while the domain is active and once it's archived. active_payment_attempt_count is set on checkout domains and null on customer account domains.

The Custom domain object#

Every field on a custom domain, as returned by retrieve and carried by the endpoints below.

Attributes

active_payment_attempt_countinteger or nullRequired

Payment attempts in progress on this checkout hostname; null for customer account domains.

created_atstringRequired

When this domain resource was created, in RFC3339 format.

custom_domain_idstringRequired

Flint custom domain ID.

dns_recordsarray of objectRequired

DNS records to add for setup or verification. For an archived hostname, records that can be deleted.

hostnamestringRequired

Configured hostname, normalized to lowercase without a trailing dot.

last_checked_atstring or nullRequired

When the domain was last checked, in RFC3339 format; null when no check time is available.

payment_method_domain_idstring or nullRequired

Payment method domain associated with this hostname, or null when none is reported.

redirect_expires_atstring or nullRequired

End of the redirect window for an archived hostname. After archive, dns_records lists records you can delete.

statusenumRequired

Current setup and availability state of the hostname. Archived domains retain their resource identity.

  • provisioning
  • active
  • attention_required
  • inactive
  • archived
status_reasonenum or nullRequired

Machine-readable detail for the current status, or null when no reason is reported.

  • dns_record_missing
  • dns_record_mismatch
  • ownership_record_missing
  • ownership_record_mismatch
  • caa_record_blocks_certificate
  • proxied_by_another_provider
  • certificate_pending
  • custom_domains_inactive
  • other
  • null
typeenumRequired

Whether the hostname serves checkout pages or the customer account Flint hosts.

  • checkout
  • customer_account
updated_atstringRequired

When this domain resource was last updated, in RFC3339 format.

List custom domains#

GET/v1/custom-domains

Requires scope settings.read or settings.write

Returns domains ordered by created_at descending, then custom_domain_id descending.

Query parameters

page_sizeinteger

Page size, default 20, max 100.

page_tokenstring

Cursor returned by the previous list response.

typearray of enum

Return domains of these types. Accepts repeated keys, comma-separated values, or mixtures. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.

  • checkout
  • customer_account
statusarray of enum

Filter by status. Repeat the parameter or send comma-separated values to match any of several. Omitted, the list leaves out archived rows; name archived to include them. Accepts repeated keys, comma-separated values, or mixtures. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.

  • provisioning
  • active
  • attention_required
  • inactive
  • archived

Response · 200

dataarray of objectRequired
metaobject

Metadata returned with a response: the `api_version`, `trace_id`, whether an idempotent request was replayed, and any warnings.

next_page_tokenstring
request_idstring
curl https://api.withflintpay.com/v1/custom-domains \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"

Create a custom domain#

POST/v1/custom-domainsIdempotent

Requires scope settings.write

Configures a checkout or customer account hostname in this environment. Remove an existing hostname of the same type before creating its replacement. If the create response is lost and a retry returns 500 IDEMPOTENCY_RECOVERY_REQUIRED, keep the original Idempotency-Key. List domains with GET /v1/custom-domains?type=customer_account and GET /v1/custom-domains?type=customer_account&status=archived, using type=checkout for both requests if that was the original type. Follow pagination and inspect current and archived domains for the requested hostname; use a matching domain's custom_domain_id to retrieve its current state. Do not switch keys or wait for key retention to expire to create again. Contact support with the request_id if the outcome is still unclear.

Request body

hostnamestringRequired

Hostname to configure, such as checkout.example.com or account.example.com.

typeenumRequired

Whether the hostname serves checkout pages or the customer account Flint hosts.

  • checkout
  • customer_account

Response · 201

dataobjectRequired

A merchant hostname for hosted checkout or customer account pages.

metaobject

Metadata returned with a response: the `api_version`, `trace_id`, whether an idempotent request was replayed, and any warnings.

request_idstring
curl -X POST https://api.withflintpay.com/v1/custom-domains \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "hostname": "",
    "type": "checkout"
  }'

Get a custom domain#

GET/v1/custom-domains/{custom_domain_id}

Requires scope settings.read or settings.write

Returns a custom domain, including archived domains.

Path parameters

custom_domain_idstringRequired

Flint custom domain ID.

Response · 200

Same response as Create a custom domain.

curl https://api.withflintpay.com/v1/custom-domains/{custom_domain_id} \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"

Archive a custom domain#

DELETE/v1/custom-domains/{custom_domain_id}Idempotent

Requires scope settings.write

Archives the hostname and starts its redirect retention window. Repeating the request returns the archived domain unchanged.

Path parameters

custom_domain_idstringRequired

Flint custom domain ID.

Response · 200

Same response as Create a custom domain.

curl -X DELETE https://api.withflintpay.com/v1/custom-domains/{custom_domain_id} \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"

Validate a custom domain#

POST/v1/custom-domains/{custom_domain_id}/validateIdempotent

Requires scope settings.write

Starts provider and DNS checks for this domain. Send no body or an empty JSON object. Checks are limited to once every 60 seconds per domain; rate limited responses include Retry-After.

Path parameters

custom_domain_idstringRequired

Flint custom domain ID.

Response · 200

Same response as Create a custom domain.

curl -X POST https://api.withflintpay.com/v1/custom-domains/{custom_domain_id}/validate \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"

Was this helpful?