Skip to content

Custom domains

A custom domain puts Flint-hosted pages on a hostname you own. Each one is a custom domain resource with a custom_domain_id that begins with cdom_, and its type says what opens on it:

typeExample hostnameWhat opens on it
checkoutpay.cedarandstone.comHosted checkout, payment links, and invoice payment pages
customer_accountaccount.cedarandstone.comFlint's customer account

You can have one custom domain of each type at a time in each environment. Flint issues and renews the certificate for each hostname. Until a hostname is active, Flint keeps using its own addresses, checkout.withflintpay.com and account.withflintpay.com, so new links never point at a hostname that isn't ready.

If you build your own checkout or customer account, you don't need a custom domain: those pages already run on your domain. See Build your own checkout and Build your own customer account.

Before you start#

Buy the custom domain add-on. It costs $15 a month for one checkout hostname and one customer account hostname, billed through merchant billing. Buy it in the dashboard on the Flint billing page. The API doesn't sell it: creating a custom domain without it returns ACTION_NOT_ALLOWED with reason configuration_required.

Use a key with settings.write. Reading custom domains needs settings.read; creating, checking, and archiving them needs settings.write. Checkout domains are live mode only. Creating one with a sandbox key returns 403 FORBIDDEN with details[0].reason live_mode_required, and sandbox checkouts always use Flint's checkout address. To confirm a live setup before you share links, use Open on in the dashboard once the hostname is active: for a checkout hostname it opens one of your active payment links there, and for a customer account hostname it opens the sign-in page.

Keep the customer account Flint-hosted. A customer_account domain serves Flint's account, so it needs customer_account.mode flint_hosted, the default. With merchant_hosted, creating one returns 409 ACTION_NOT_ALLOWED with details[0].reason customer_account_mode_conflict.

Pick two different subdomains. Use an exact subdomain of a domain you control, such as pay.cedarandstone.com. Flint rejects apex domains such as cedarandstone.com, wildcards, IP addresses, and withflintpay.com hostnames with 400 INVALID_REQUEST on hostname. Write internationalized hostnames in Punycode. Flint stores the hostname in lowercase.

Create a custom domain#

Send the type and the hostname:

cURL
curl -X POST https://api.withflintpay.com/v1/custom-domains \
  -H "Authorization: Bearer YOUR_LIVE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: pay-domain-1" \
  -d '{ "type": "checkout", "hostname": "pay.cedarandstone.com" }'

The response is 201 with the custom domain, including the DNS records to publish:

JSON
{
  "data": {
    "custom_domain_id": "cdom_01KWM6WAHG3N9Q8T2V5XRZ7C4D",
    "type": "checkout",
    "hostname": "pay.cedarandstone.com",
    "status": "provisioning",
    "status_reason": "ownership_record_missing",
    "dns_records": [
      { "type": "cname", "name": "pay.cedarandstone.com", "value": "checkout-custom.withflintpay.com" },
      { "type": "txt", "name": "_flint-verify.pay.cedarandstone.com", "value": "flint-verify=7f3a9c2e5b8d1f4a6c0e9b2d5a8f1c4e7b0d3a6f9c2e5b8d1f4a7c0e3b6d9f2a" }
    ],
    "last_checked_at": null,
    "redirect_expires_at": null,
    "payment_method_domain_id": null,
    "active_payment_attempt_count": 0,
    "created_at": "2026-10-05T17:00:00Z",
    "updated_at": "2026-10-05T17:00:00Z"
  },
  "request_id": "req_..."
}

Create the customer account hostname the same way, with "type": "customer_account". Save custom_domain_id: you check and archive the domain by its ID.

Creating a second domain of a type you already have returns 409 ALREADY_EXISTS with param type. details[0].resource_id is the existing domain's ID, and details[0].current_resource is the existing domain. To change the hostname, replace it.

Custom domains belong to the merchant, like customer_account settings. Locations and devices can't override them.

Find your custom domains#

GET /v1/custom-domains lists the domains in the key's environment, newest first, 20 to a page by default and up to 100 with page_size. Archived domains are left out unless the status filter names archived:

cURL
curl "https://api.withflintpay.com/v1/custom-domains?type=customer_account" \
  -H "Authorization: Bearer YOUR_LIVE_API_KEY"

type and status each take one or more values, repeated or comma-separated. GET /v1/custom-domains/{custom_domain_id} returns one domain, including an archived one.

Publish the DNS records#

Each hostname needs two records at your DNS provider. Copy the values from dns_records rather than from an example: the CNAME value can differ between hostname types and Flint environments, and the TXT value is specific to your account and hostname.

TypeNameValuePurpose
CNAMEThe hostname, such as pay.cedarandstone.comThe cname value in dns_recordsSends the hostname's traffic to Flint
TXT_flint-verify. plus the hostnameflint-verify= plus a tokenProves your Flint account controls the hostname

Some DNS providers add your domain to every name automatically. There, enter pay and _flint-verify.pay instead of the full names.

Publish the CNAME as DNS-only. If your DNS provider is also a CDN, such as Cloudflare with proxying on, turn proxying off for this record.

Why Flint asks for a TXT record#

A CNAME shows where a hostname points, not who it belongs to. If a hostname you stopped using still pointed at Flint, another Flint account could claim it and serve its own pages there. Flint checks the TXT record before it starts serving a hostname, and checks it again when a hostname was last used by a different account, so nobody can claim your hostname without publishing a record in your DNS.

The TXT value stays the same for the same hostname, hostname type, and Flint environment on your account, including after you archive it and create it again. If your hostname was active before Flint required the TXT record, it keeps working; add the record anyway, because replacing or reconnecting the hostname needs it.

Read the status#

Every custom domain has these fields:

FieldWhat it tells you
custom_domain_idThe domain's ID, beginning with cdom_.
typecheckout or customer_account.
hostnameThe hostname, in lowercase.
statusWhere the hostname is in setup. See the values below.
status_reasonWhy the hostname isn't active, or null while it's active and once it's archived.
dns_recordsThe records to publish, each with type (cname or txt), name, and value. Once archived, the records you can delete.
last_checked_atWhen Flint last checked the hostname, or null before the first check.
redirect_expires_atWhen redirects from an archived hostname end. null until you archive it.
payment_method_domain_idThe payment method domain Flint registered for the hostname, or null.
active_payment_attempt_countCheckout domains only: payments in progress whose checkout started on the hostname. Check it before you archive the domain. null for a customer account domain.
created_at, updated_atWhen you created the domain and when it last changed, including status changes.

status takes these values:

ValueMeaning
provisioningFlint is waiting for the DNS records or issuing the certificate. Buyers use Flint's address.
activeThe hostname serves your pages, and new links use it.
attention_requiredFlint couldn't verify the hostname. Read status_reason.
inactiveThe hostname doesn't serve your pages, most often because the custom domain add-on isn't active. Read status_reason.
archivedYou archived the domain. Old links redirect to Flint's address until redirect_expires_at.

status_reason explains what to fix:

ValueMeaningWhat to do
dns_record_missingFlint can't find a CNAME record at the hostname.Add the cname record from dns_records.
dns_record_mismatchThe CNAME points somewhere other than the value in dns_records.Change the record's value to the one in dns_records.
ownership_record_missingFlint can't find the _flint-verify TXT record.Add the txt record from dns_records.
ownership_record_mismatchThe TXT record exists with a different value.Change its value to the one in dns_records.
caa_record_blocks_certificateA CAA record on your domain doesn't allow the certificate authority that issues Flint's certificates.See A CAA record blocks the certificate.
proxied_by_another_providerThe hostname answers through another CDN or proxy instead of Flint.Turn off proxying for the CNAME record.
certificate_pendingThe DNS records are correct and Flint is issuing the certificate.Nothing. The status moves to active when the certificate is ready.
custom_domains_inactiveThe custom domain add-on isn't active.Buy or renew it on the Flint billing page.
otherA problem Flint has no specific reason for.Confirm the records match dns_records, check again, then ask Flint Help.

New values can appear in status and status_reason. Treat a status_reason you don't recognize as other.

Check again#

Flint rechecks hostnames that aren't active on its own. After you fix a DNS record, you can ask for a check right away:

cURL
curl -X POST https://api.withflintpay.com/v1/custom-domains/cdom_01KWM6WAHG3N9Q8T2V5XRZ7C4D/validate \
  -H "Authorization: Bearer YOUR_LIVE_API_KEY"

Send no body or an empty JSON object. The response is the custom domain after the check:

JSON
{
  "data": {
    "custom_domain_id": "cdom_01KWM6WAHG3N9Q8T2V5XRZ7C4D",
    "type": "checkout",
    "hostname": "pay.cedarandstone.com",
    "status": "provisioning",
    "status_reason": "certificate_pending",
    "dns_records": [
      { "type": "cname", "name": "pay.cedarandstone.com", "value": "checkout-custom.withflintpay.com" },
      { "type": "txt", "name": "_flint-verify.pay.cedarandstone.com", "value": "flint-verify=7f3a9c2e5b8d1f4a6c0e9b2d5a8f1c4e7b0d3a6f9c2e5b8d1f4a7c0e3b6d9f2a" }
    ],
    "last_checked_at": "2026-10-05T17:04:00Z",
    "redirect_expires_at": null,
    "payment_method_domain_id": null,
    "active_payment_attempt_count": 0,
    "created_at": "2026-10-05T17:00:00Z",
    "updated_at": "2026-10-05T17:00:00Z"
  },
  "request_id": "req_..."
}

You can check each domain once every 60 seconds. A sooner request returns 429 RATE_LIMIT_EXCEEDED with a Retry-After header. Checking an archived domain returns 409 ACTION_NOT_ALLOWED with details[0].reason archived. Checkout domains need a live key here too. The dashboard's Check again button calls the same route.

Get notified when a status changes#

Subscribe to custom_domain.updated and custom_domain.archived instead of polling GET /v1/custom-domains.

data.object is the custom domain, the same object GET /v1/custom-domains/{custom_domain_id} returns:

JSON
{
  "event_type": "custom_domain.updated",
  "data": {
    "object": {
      "custom_domain_id": "cdom_01KWM6WAHG3N9Q8T2V5XRZ7C4D",
      "type": "checkout",
      "hostname": "pay.cedarandstone.com",
      "status": "active",
      "status_reason": null,
      "dns_records": [
        { "type": "cname", "name": "pay.cedarandstone.com", "value": "checkout-custom.withflintpay.com" },
        { "type": "txt", "name": "_flint-verify.pay.cedarandstone.com", "value": "flint-verify=7f3a9c2e5b8d1f4a6c0e9b2d5a8f1c4e7b0d3a6f9c2e5b8d1f4a7c0e3b6d9f2a" }
      ],
      "last_checked_at": "2026-10-05T17:09:00Z",
      "redirect_expires_at": null,
      "payment_method_domain_id": "pmdom_1kmn0aExample",
      "active_payment_attempt_count": 0,
      "created_at": "2026-10-05T17:00:00Z",
      "updated_at": "2026-10-05T17:09:00Z"
    }
  }
}

Flint sends custom_domain.updated whenever status changes to anything other than archived, and custom_domain.archived when you archive the domain. A check that changes only last_checked_at sends nothing. Match events to your records by custom_domain_id: after you replace a hostname, events for the old domain keep its ID. When a hostname stops working, or works again, Flint also emails your account owners and shows a notice in the dashboard to team members who can administer the account.

Apple Pay and Google Pay#

Flint registers each hostname as a payment method domain for you, so Apple Pay and Google Pay buttons work on it. payment_method_domain_id identifies the registration; read it with GET /v1/payment-method-domains/{payment_method_domain_id}. If you already registered the hostname yourself, Flint reuses that registration. The registration has its own version. If you run its wallet check again with PATCH /v1/payment-method-domains/{payment_method_domain_id}, send that version as expected_version, as Check each hostname shows.

Redirects during payment#

Affirm, 3D Secure, and other payment steps that leave checkout bring the buyer back to the hostname where the checkout started. A checkout that started on Flint's address returns there. If a hostname stops working while a buyer is paying, that buyer returns to Flint's checkout address and finishes the same checkout there.

Remove a hostname#

Archive the custom domain:

cURL
curl -X DELETE https://api.withflintpay.com/v1/custom-domains/cdom_01KWM6WAHG3N9Q8T2V5XRZ7C4D \
  -H "Authorization: Bearer YOUR_LIVE_API_KEY"

The response is the archived domain. status is archived, status_reason is null, and redirect_expires_at says when its redirects end:

JSON
{
  "data": {
    "custom_domain_id": "cdom_01KWM6WAHG3N9Q8T2V5XRZ7C4D",
    "type": "checkout",
    "hostname": "pay.cedarandstone.com",
    "status": "archived",
    "status_reason": null,
    "dns_records": [
      { "type": "cname", "name": "pay.cedarandstone.com", "value": "checkout-custom.withflintpay.com" },
      { "type": "txt", "name": "_flint-verify.pay.cedarandstone.com", "value": "flint-verify=7f3a9c2e5b8d1f4a6c0e9b2d5a8f1c4e7b0d3a6f9c2e5b8d1f4a7c0e3b6d9f2a" }
    ],
    "last_checked_at": "2026-10-05T17:09:00Z",
    "redirect_expires_at": "2026-11-04T18:00:00Z",
    "payment_method_domain_id": "pmdom_1kmn0aExample",
    "active_payment_attempt_count": 0,
    "created_at": "2026-10-05T17:00:00Z",
    "updated_at": "2026-10-05T18:00:00Z"
  },
  "request_id": "req_..."
}

Archiving sends custom_domain.archived. Archiving an archived domain changes nothing, returns it again, and sends no event, so a retry is safe. The archived domain stays readable by its ID and in lists filtered to archived.

After you archive a domain:

  • New links use Flint's address right away.
  • For 30 days, until redirect_expires_at, any request to the hostname redirects to Flint's address. A checkout hostname keeps the same path and query, and a customer account hostname opens the same page of your account on Flint's account address. Shared checkout and payment links, printed QR codes, invoice links, and account links keep working this way. If you delete the CNAME record first, the redirects end when the record does.
  • The hostname serves no pages, only redirects.
  • Buyers in the middle of a payment on the hostname finish on Flint's checkout address and are not charged twice. Read active_payment_attempt_count before you archive a checkout domain to see how many there are.
  • Delete the records listed in dns_records once you no longer need the redirects. After the window ends, links on the hostname stop working.

An archived domain can't be restored. To connect the same hostname again, create a new custom domain with it. The new domain has its own custom_domain_id and starts at provisioning. If the hostname's records are still published, it doesn't need new DNS records.

Replace a hostname#

Archive the current domain, then create one with the new hostname. Archiving takes the old hostname off: its links redirect to Flint's address for 30 days, it serves no pages, and buyers in the middle of a payment finish on Flint's checkout address. The new domain starts at provisioning with its own dns_records, and new links use Flint's address until it's active. Delete the old hostname's records once you no longer need its redirects.

Before you change the customer account mode#

While you have a customer_account domain that isn't archived, switching customer_account.mode to merchant_hosted or sending "customer_account": null to PATCH /v1/settings returns 409 RESOURCE_IN_USE. param is customer_account.mode or customer_account, and details[0].blocking_resources names the domain by custom_domain_id. Archive the domain first, then change the settings.

If the add-on ends#

Your custom hostnames depend on the custom domain add-on:

  • You cancel it. Your hostnames keep working until the end of the month you paid for, then stop.
  • A renewal charge fails. Your hostnames keep working while Flint retries, for 24 hours after the paid month ends. If the charge still fails, they stop.

A stopped hostname reports status inactive with status_reason custom_domains_inactive. New links use Flint's addresses, and shared links on the hostname stop working until you buy the add-on again. Buy it again within 30 days and Flint restores every custom domain you haven't archived, without new DNS records. An archived domain doesn't come back: create a new one.

DNS problems#

Check what resolvers see before you check again in Flint:

Shell
dig +short CNAME pay.cedarandstone.com
dig +short TXT _flint-verify.pay.cedarandstone.com

The first command should print the cname value from dns_records and the second the txt value.

A CAA record blocks the certificate#

A CAA record lists the certificate authorities allowed to issue certificates for a domain and its subdomains. If your domain has CAA records that don't allow the authority that issues Flint's certificates, the certificate can't be issued or renewed and status_reason is caa_record_blocks_certificate. Remove the CAA records that apply to the hostname, or ask Flint Help which authority to allow and add a record for it.

The CNAME is proxied#

If the CNAME is proxied through your own Cloudflare account (the orange cloud) or another CDN, requests reach that CDN instead of Flint and status_reason is proxied_by_another_provider. Set the record to DNS-only.

The change hasn't reached resolvers yet#

Resolvers keep an old answer until its TTL runs out, so a new or changed record can take time to appear everywhere. If dig still prints the old value, wait for the TTL and check again. When dig prints the right values, use Check again.

What a custom domain doesn't change#

  • Email sender. Flint's emails to buyers still come from Flint's sending address. Links inside them use your hostnames once they're active.
  • The Flint mark. The Powered by Flint credit stays on hosted pages unless your agreement with Flint removes it. show_flint_mark on the single-session GET and the public payment link read reports whether those hosted pages show it; a custom domain doesn't change the value.
  • Shipment tracking. Tracking links in shipping notices open the shipment's tracking URL.
  • Sign-in. Buyers sign in again on their first visit to your customer account hostname. Browser sessions don't move between Flint's address and yours.
  • Sandboxes. Sandbox checkouts use Flint's checkout address.

Not available#

RequestWhat to do instead
Emails sent from your own domainTurn off a family of Flint's emails and send your own from the webhook events. See Customer email delivery.
Apex domains such as cedarandstone.comUse a subdomain such as pay.cedarandstone.com, and keep your storefront on the apex.
Wildcards, or more than one hostname for checkout or for the customer accountCreate one custom domain of each type. To serve checkout on more of your domains, build your own checkout.
Changing a domain's hostname in placeArchive the domain and create a new one. See Replace a hostname.
Checkout custom domains in a sandboxBuild and test against Flint's checkout address in a sandbox, then confirm the live hostname with Open on in the dashboard.

Errors#

Creating a custom domain can return:

  • HTTP 400
    type or hostname is missing or invalid, and param names the field. Send type as checkout or customer_account, and hostname as one exact subdomain, such as pay.example.com, with no apex domain, wildcard, IP address, or withflintpay.com hostname
  • HTTP 409
    With param type, you already have a custom domain of this type. When your key has settings.read, details[0].current_resource is that domain. Archive it first to replace the hostname
  • HTTP 409
    With details[0].reason customer_account_mode_conflict, customer_account.mode is merchant_hosted. Set it to flint_hosted before you create a customer account domain
  • HTTP 409
    With details[0].reason configuration_required, buy or renew the custom domain add-on on the Flint billing page, then create the domain again
  • HTTP 409
    With param hostname, the hostname is in use elsewhere: by another Flint account, as your other custom domain, or in another of your environments. Use a different hostname, or archive the domain that uses it and then create it here. If another account used it, publish the TXT record after that account removes it
  • HTTP 409
    With details[0].reason status_not_reached, customer account domains only. Flint registers the hostname as a payment method domain and creates the custom domain only when that registration's validation_status is active: the registration is on, and Apple Pay and Google Pay are both active. Find the registration with GET /v1/payment-method-domains and read validation_status and payment_option_statuses. unavailable means Flint couldn't read a wallet's status; confirm payment onboarding is finished in this environment. action_required means the registration or a wallet isn't active, and payment_option_statuses shows which wallet; see Check each hostname. Then create the domain again, which runs the check again. If it still fails, ask Flint Help with the request_id
  • HTTP 409
    Reason onboarding_required. Payment onboarding isn't finished in this environment, so Flint can't register the customer account hostname as a payment method domain. Finish onboarding, then create the domain again
  • HTTP 409
    OPERATION_IN_PROGRESSRetry the same request
    Another registration change is running. Wait for Retry-After, then retry the same request with the same Idempotency-Key
  • HTTP 409
    CONCURRENT_MODIFICATIONRetry the same request
    Another write prevented the payment method domain update. Send the same request again with the same Idempotency-Key
  • HTTP 503
    SERVICE_UNAVAILABLERetry the same request
    Flint couldn't update the customer account hostname's payment method domain, so the custom domain isn't created. Send the same request again with the same Idempotency-Key. If it keeps failing, ask Flint Help with the request_id
  • HTTP 500
    The create response was lost and Flint cannot safely recover its result. 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. An earlier payment method domain registration can also require recovery; contact support with the original key and request_id before submitting another write
  • HTTP 403
    With details[0].reason live_mode_required, you tried to create a checkout domain with a sandbox key. param is type. Send the request with a live API key

For hostname validation, add-on, availability, and wallet-readiness errors when creating a domain, param is hostname. An ALREADY_EXISTS error on type can include your existing domain in details[0].current_resource when your key has settings.read. An unavailable hostname does not expose another account's resource.

If you use an Idempotency-Key, keep it when you retry MERCHANT_NOT_READY with reason onboarding_required, CONCURRENT_MODIFICATION, or SERVICE_UNAVAILABLE. A retry with the same key returns ACTION_NOT_ALLOWED with reason status_not_reached again, so once the registration's validation_status is active, send a new key when you create the domain again.

Checking again can return:

  • HTTP 409
    With details[0].reason archived, the domain is archived. Check the domain that replaced it, or create a new one
  • HTTP 429
    RATE_LIMIT_EXCEEDEDRetry the same request
    Wait for the Retry-After seconds, then check again
  • HTTP 404
    No custom domain with this ID exists in the key's environment

Getting or archiving a domain whose ID doesn't exist in the key's environment also returns 404 RESOURCE_NOT_FOUND.

Next steps#

Was this helpful?