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.updated and custom_domain.archived send the custom domain, the same object GET /v1/custom-domains/{custom_domain_id} returns. custom_domain.updated fires each time its status changes to anything other than archived, and custom_domain.archived when you archive it. Archiving it again sends nothing. 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#

A merchant hostname for hosted checkout or customer account pages.

Returned by GET /v1/custom-domains/{custom_domain_id} and carried by the endpoints below.

Attributes

active_payment_attempt_countinteger or nullRequired

Payment attempts in progress on this checkout hostname. `null` when `type` is `customer_account`.

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. `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. `null` when the hostname isn't archived.

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. `null` when no reason is reported, including for active and archived domains.

  • 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.

JSON
{
  "active_payment_attempt_count": 0,
  "created_at": "2026-08-02T16:00:00Z",
  "custom_domain_id": "cdom_01ARZ3NDEKTSV4RRFFQ69G5FAV",
  "dns_records": [
    {
      "name": "pay.example.com",
      "type": "cname",
      "value": "checkout-custom.withflintpay.com"
    },
    {
      "name": "_flint-verify.pay.example.com",
      "type": "txt",
      "value": "flint-verify=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
    }
  ],
  "hostname": "pay.example.com",
  "last_checked_at": "2026-08-02T16:00:00Z",
  "payment_method_domain_id": null,
  "redirect_expires_at": null,
  "status": "active",
  "status_reason": null,
  "type": "checkout",
  "updated_at": "2026-08-02T16:00:00Z"
}

List custom domains#

GET/v1/custom-domains

Requires scope settings.read or settings.write

Rate limit: read

Returns domains ordered by created_at descending, then custom_domain_id descending. Default order: created_at descending, then custom_domain_id descending.

Query parameters

page_sizeinteger

Maximum number of results to return, from 1 to 100. Defaults to 20.

page_tokenstring

Opaque next_page_token from the previous response. Omit on the first request. You may change `page_size` between pages. Reuse it with the same endpoint, filters, sort, and request context. Do not parse or construct tokens. An invalid, expired, or mismatched token returns a validation error.

typearray of enum

Return domains of these types. 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. Omitted, the list leaves out archived rows; name archived to include them. 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

The custom domain resource.

dataarray of objectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

next_page_tokenstring

Opaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.

request_idstringRequired

Identifier of this API request, used to correlate logs and support requests.

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

The custom domain resource.

JSON
{
  "data": [
    {
      "active_payment_attempt_count": 0,
      "created_at": "2026-08-02T16:00:00Z",
      "custom_domain_id": "cdom_01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "dns_records": [
        {
          "name": "pay.example.com",
          "type": "cname",
          "value": "checkout-custom.withflintpay.com"
        },
        {
          "name": "_flint-verify.pay.example.com",
          "type": "txt",
          "value": "flint-verify=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
        }
      ],
      "hostname": "pay.example.com",
      "last_checked_at": "2026-08-02T16:00:00Z",
      "payment_method_domain_id": null,
      "redirect_expires_at": null,
      "status": "active",
      "status_reason": null,
      "type": "checkout",
      "updated_at": "2026-08-02T16:00:00Z"
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

Create a custom domain#

POST/v1/custom-domainsIdempotent

Requires scope settings.write

Rate limit: external_provider_action

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

The custom domain resource.

dataobjectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

request_idstringRequired

Identifier of this API request, used to correlate logs and support requests.

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": "pay.example.com",
    "type": "checkout"
  }'

Get a custom domain#

GET/v1/custom-domains/{custom_domain_id}

Requires scope settings.read or settings.write

Rate limit: read

Returns a custom domain, including archived domains.

Path parameters

custom_domain_idstringRequired

Flint custom domain ID.

Response · 200

The custom domain resource.

Same response as Create a custom domain.

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

The custom domain resource.

JSON
{
  "data": {
    "active_payment_attempt_count": 0,
    "created_at": "2026-08-02T16:00:00Z",
    "custom_domain_id": "cdom_01ARZ3NDEKTSV4RRFFQ69G5FAV",
    "dns_records": [
      {
        "name": "pay.example.com",
        "type": "cname",
        "value": "checkout-custom.withflintpay.com"
      },
      {
        "name": "_flint-verify.pay.example.com",
        "type": "txt",
        "value": "flint-verify=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
      }
    ],
    "hostname": "pay.example.com",
    "last_checked_at": "2026-08-02T16:00:00Z",
    "payment_method_domain_id": null,
    "redirect_expires_at": null,
    "status": "active",
    "status_reason": null,
    "type": "checkout",
    "updated_at": "2026-08-02T16:00:00Z"
  },
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

Archive a custom domain#

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

Requires scope settings.write

Rate limit: external_provider_action

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

The custom domain resource.

Same response as Create a custom domain.

curl -X DELETE https://api.withflintpay.com/v1/custom-domains/cdom_01KEZF7C00483JTTKHZVFQHKS8 \
  -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

Rate limit: external_provider_action

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; a request over that limit fails with `RATE_LIMIT_EXCEEDED`, so wait before validating again.

Path parameters

custom_domain_idstringRequired

Flint custom domain ID.

Response · 200

The custom domain resource.

Same response as Create a custom domain.

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

Was this helpful?