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:
type | Example hostname | What opens on it |
|---|---|---|
checkout | pay.cedarandstone.com | Hosted checkout, payment links, and invoice payment pages |
customer_account | account.cedarandstone.com | Flint'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 -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:
{
"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 "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.
| Type | Name | Value | Purpose |
|---|---|---|---|
CNAME | The hostname, such as pay.cedarandstone.com | The cname value in dns_records | Sends the hostname's traffic to Flint |
TXT | _flint-verify. plus the hostname | flint-verify= plus a token | Proves 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:
| Field | What it tells you |
|---|---|
custom_domain_id | The domain's ID, beginning with cdom_. |
type | checkout or customer_account. |
hostname | The hostname, in lowercase. |
status | Where the hostname is in setup. See the values below. |
status_reason | Why the hostname isn't active, or null while it's active and once it's archived. |
dns_records | The records to publish, each with type (cname or txt), name, and value. Once archived, the records you can delete. |
last_checked_at | When Flint last checked the hostname, or null before the first check. |
redirect_expires_at | When redirects from an archived hostname end. null until you archive it. |
payment_method_domain_id | The payment method domain Flint registered for the hostname, or null. |
active_payment_attempt_count | Checkout 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_at | When you created the domain and when it last changed, including status changes. |
status takes these values:
| Value | Meaning |
|---|---|
provisioning | Flint is waiting for the DNS records or issuing the certificate. Buyers use Flint's address. |
active | The hostname serves your pages, and new links use it. |
attention_required | Flint couldn't verify the hostname. Read status_reason. |
inactive | The hostname doesn't serve your pages, most often because the custom domain add-on isn't active. Read status_reason. |
archived | You archived the domain. Old links redirect to Flint's address until redirect_expires_at. |
status_reason explains what to fix:
| Value | Meaning | What to do |
|---|---|---|
dns_record_missing | Flint can't find a CNAME record at the hostname. | Add the cname record from dns_records. |
dns_record_mismatch | The CNAME points somewhere other than the value in dns_records. | Change the record's value to the one in dns_records. |
ownership_record_missing | Flint can't find the _flint-verify TXT record. | Add the txt record from dns_records. |
ownership_record_mismatch | The TXT record exists with a different value. | Change its value to the one in dns_records. |
caa_record_blocks_certificate | A 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_provider | The hostname answers through another CDN or proxy instead of Flint. | Turn off proxying for the CNAME record. |
certificate_pending | The DNS records are correct and Flint is issuing the certificate. | Nothing. The status moves to active when the certificate is ready. |
custom_domains_inactive | The custom domain add-on isn't active. | Buy or renew it on the Flint billing page. |
other | A 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 -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:
{
"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:
{
"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 -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:
{
"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_countbefore you archive a checkout domain to see how many there are. - Delete the records listed in
dns_recordsonce 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:
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_markon 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#
| Request | What to do instead |
|---|---|
| Emails sent from your own domain | Turn off a family of Flint's emails and send your own from the webhook events. See Customer email delivery. |
Apex domains such as cedarandstone.com | Use 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 account | Create one custom domain of each type. To serve checkout on more of your domains, build your own checkout. |
| Changing a domain's hostname in place | Archive the domain and create a new one. See Replace a hostname. |
| Checkout custom domains in a sandbox | Build 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:
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:
Getting or archiving a domain whose ID doesn't exist in the key's environment also returns 404 RESOURCE_NOT_FOUND.
Next steps#
- Custom domains API reference: every field and endpoint.
- Customer accounts: branding, sign-in, and what the account hostname serves.
- Apple Pay and Google Pay setup: payment method domains and wallet readiness.
- Apple Pay domain checker: see what a hostname you serve yourself returns to Apple's verifier.
- Webhook event payloads: every event Flint sends.
- Merchant billing: how Flint charges for the add-on.
