Skip to content

Payment method domains

A payment method domain registers one hostname for Apple Pay and Google Pay. When checkout runs on a page you serve, as with embedded payments or a checkout you build, Stripe Elements shows wallet buttons only on hostnames registered in the key's environment. Each registration has a payment_method_domain_id beginning with pmdom_ and reports whether each wallet is ready on that hostname. Cards work without one.

A registration decides where the buttons can render, not which wallets you offer. The order's payment_collection.stripe.elements.payment_options lists the wallets your payment options turn on, whatever the hostname. Apple Pay and Google Pay setup walks through registering, checking, and testing each hostname.

When to register a hostname#

Where the wallet buttons showRegister it yourself?
Flint-hosted checkout and payment links on Flint's domainNo. They need no registration.
A checkout or customer account custom domainNo. Creating the custom domain registers its hostname, and its payment_method_domain_id names the registration once Flint reports one.
A merchant_hosted customer account's merchant_account_url in settingsNo. Saving the URL registers its hostname.
Any other page where you mount Stripe ElementsYes, with POST /v1/payment-method-domains.

Registrations Flint makes for you appear in GET /v1/payment-method-domains and work like the ones you create.

Each registration covers one exact hostname. example.com, www.example.com, and shop.example.com are three registrations, and a registration never covers a subdomain. Send domain_name as a bare hostname with no scheme, path, port, IP address, or wildcard. Flint trims surrounding whitespace and lowercases it. It must be ASCII, so write an internationalized hostname in Punycode. A hostname can't change after you register it.

Registrations belong to the key's environment. A sandbox registration doesn't carry over to live mode, so register each live hostname with a live key and confirm the live registration is ready before launch. A hostname is registered at most once per environment: registering it again returns 409 ALREADY_EXISTS, and details[0].current_resource names the existing registration.

Read wallet readiness#

A registration reports readiness in three fields:

FieldTells you
statusWhether the registration is on. You set it.
payment_option_statusesOne entry for apple_pay and one for google_pay, each with that wallet's status on this hostname.
validation_statusThe overall answer, combining the other two.

Start with validation_status:

validation_status on payment method domain
  • active
    status is active and both wallets are active. Wallet buttons can render on this hostname.
  • action_required
    The registration is inactive, or a wallet is inactive. Read payment_option_statuses to see which wallet, fix the hostname, then check it again.
  • unavailable
    Flint couldn't read at least one wallet's status, for example because the environment's payment account isn't ready. Finish payment onboarding for the environment, then check it again.

Each entry in payment_option_statuses reports one wallet:

status on payment method domain payment option status
  • active
    The wallet is ready on this hostname.
  • inactive
    The wallet can't show on this hostname, because the registration is off or the wallet's check didn't pass.
  • unavailable
    Flint couldn't read the wallet's status.

GET and list requests return the result of the most recent check. They don't contact Stripe and don't change version. If the environment's payment account isn't ready, or has changed since the most recent check, reads return status inactive and unavailable for validation_status and both wallets until you check the hostname again.

Register a hostname#

Registering checks the hostname right away, so the response already reports each wallet's status. Send an Idempotency-Key so a retry returns the original registration.

cURL
curl -X POST https://api.withflintpay.com/v1/payment-method-domains \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: pmd-shop-example-com" \
  -d '{ "domain_name": "shop.example.com" }'
Response
{
  "data": {
    "payment_method_domain_id": "pmdom_01KWM6WAHG3N9Q8T2V5XRZ7C4D",
    "version": 1,
    "domain_name": "shop.example.com",
    "status": "active",
    "validation_status": "active",
    "payment_option_statuses": [
      { "payment_option": "apple_pay", "status": "active" },
      { "payment_option": "google_pay", "status": "active" }
    ],
    "created_at": "2026-10-28T12:00:00Z",
    "updated_at": "2026-10-28T12:00:00Z"
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4E"
}

To find the registration for one hostname, list with domain_name. It matches the whole registered hostname after the same trimming and lowercasing, so example.com doesn't find shop.example.com, and a hostname you haven't registered returns an empty data array. The list is ordered by payment_method_domain_id, ascending.

Check again or turn wallets off#

A registration can't be deleted. PATCH /v1/payment-method-domains/{payment_method_domain_id} sets its status, and both values contact Stripe:

statusEffect
activeTurns the registration on, registers the hostname on the environment's current payment account if it needs it, and checks the wallets again when one isn't active. Send it after you fix a hostname.
inactiveTurns wallet buttons off on the hostname. The registration stays listed, and setting active later turns it back on.

Every change Flint records, including a check you run with PATCH, increases version. Send the version you read as expected_version so the change applies only if the registration hasn't changed since. A stale value returns 409 VERSION_CONFLICT with the current value in details[0].current_version and doesn't contact Stripe.

cURL
curl -X PATCH https://api.withflintpay.com/v1/payment-method-domains/pmdom_01KWM6WAHG3N9Q8T2V5XRZ7C4D \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: pmd-shop-example-com-recheck-1" \
  -d '{ "expected_version": 1, "status": "active" }'

If a change returns 503 SERVICE_UNAVAILABLE, retry the identical request with the same Idempotency-Key. Flint resumes the earlier change before accepting a different change. An overlapping request returns 409 OPERATION_IN_PROGRESS; wait for Retry-After and retry it with its original key.

If a wallet is still inactive after a live check, the Apple Pay domain checker shows what Apple's verifier gets from the hostname and what to fix.

Access#

Reads need payments.payment_method_domains.read or payments.payment_method_domains.write, and changes need payments.payment_method_domains.write. Keep the write scope on an administrative key, separate from the key your checkout backend uses for orders. Partner app tokens can't call these routes; use a key from the merchant's own account.

Common errors#

  • HTTP 400
    domain_name isn't one exact hostname. Send a hostname such as shop.example.com, with no scheme, path, port, IP address, or wildcard
  • HTTP 409
    The hostname is already registered in this environment. Use the registration in details[0].current_resource
  • HTTP 409
    Reason onboarding_required. Finish payment onboarding for this environment, then register or check the hostname again
  • HTTP 409
    OPERATION_IN_PROGRESSRetry the same request
    Another registration change is running. Wait for Retry-After, then resend the same request with the same Idempotency-Key
  • HTTP 503
    SERVICE_UNAVAILABLERetry the same request
    The registration change could not finish. Retry the same request with the same Idempotency-Key; Flint resumes the original change
  • HTTP 500
    Flint can't safely recover an earlier change to this registration. Read the registration, then follow the read for each route before you submit another change
  • HTTP 409
    VERSION_CONFLICTRefresh, then retry
    The registration changed after you read it. Read it again, and send the change with the new version and a new Idempotency-Key if it's still needed
Apple Pay and Google Pay setupRegister, check, and test each hostname before you go live.Embedded paymentsThe Stripe Elements checkout the wallet buttons belong to.Custom domainsServe Flint-hosted checkout or the customer account on your hostname, registered for wallets automatically.

The Payment method domain object#

A domain registered for browser payment methods.

Returned by GET /v1/payment-method-domains/{payment_method_domain_id} and carried by the endpoints below.

Attributes

created_atstringRequired

RFC3339 timestamp.

domain_namestringRequired

The registered hostname, trimmed and lowercased. ASCII only, at least two labels, each up to 63 characters, 253 characters in total; no scheme, path, port, IP address, or wildcard.

payment_method_domain_idstringRequired

Flint payment method domain ID, starting with pmdom_.

payment_option_statusesarray of objectRequired

Availability and validation status of each payment option on this domain.

statusenumRequired

Whether wallet buttons are on for the hostname. Change it with `PATCH`.

  • active
  • inactive
updated_atstringRequired

RFC3339 timestamp.

validation_statusenumRequired

Whether the hostname passed the checks wallets need, summarizing `payment_option_statuses`.

  • active
  • action_required
  • unavailable
versionintegerRequired

Persisted version of this resource's owned state. Expanded resources and external observations can change independently.

JSON
{
  "created_at": "2026-08-02T16:00:00Z",
  "domain_name": "pay.example.com",
  "payment_method_domain_id": "pmdom_01KEZF7C001WQCSRGH9GWR6628",
  "payment_option_statuses": [
    {
      "payment_option": "apple_pay",
      "status": "active"
    },
    {
      "payment_option": "google_pay",
      "status": "active"
    }
  ],
  "status": "active",
  "updated_at": "2026-08-02T16:00:00Z",
  "validation_status": "active",
  "version": 1
}

List payment method domains#

GET/v1/payment-method-domains

Requires scope payments.payment_method_domains.read or payments.payment_method_domains.write

Rate limit: read

Returns payment method domains ordered by payment_method_domain_id ascending in the selected Flint environment. Page tokens are opaque, bind to the list parameters, and return a validation error when invalid or mismatched. Default order: payment_method_domain_id ascending; this key uniquely orders the results.

Query parameters

statusarray of enum

Filter by status. 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.

  • active
  • inactive
domain_namestring

Exact hostname filter after trimming whitespace and converting to lowercase. Accepts an ASCII fully-qualified hostname without a URL, port, wildcard, or IP address. Matches the entire stored domain name.

page_sizeinteger

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

page_tokenstring

Opaque, signed next_page_token from the previous response, bound to the list and caller. 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 altered, invalid, expired, or mismatched token returns a validation error.

Response · 200

A page of payment method domains.

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/payment-method-domains \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"

A page of payment method domains.

JSON
{
  "data": [
    {
      "created_at": "2026-08-02T16:00:00Z",
      "domain_name": "pay.example.com",
      "payment_method_domain_id": "pmdom_01KEZF7C001WQCSRGH9GWR6628",
      "payment_option_statuses": [
        {
          "payment_option": "apple_pay",
          "status": "active"
        },
        {
          "payment_option": "google_pay",
          "status": "active"
        }
      ],
      "status": "active",
      "updated_at": "2026-08-02T16:00:00Z",
      "validation_status": "active",
      "version": 1
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

Register payment method domain#

POST/v1/payment-method-domainsIdempotent

Requires scope payments.payment_method_domains.write

Rate limit: external_provider_action

Registers one exact domain or subdomain for Apple Pay and Google Pay in the selected Flint environment, then validates its wallet readiness.

Request body

domain_namestringRequired

Exact fully-qualified hostname to register. Limited to 253 characters (Unicode code points) before trimming whitespace and lowercasing. The resulting hostname uses ASCII characters only. Do not include a scheme, path, port, IP address, or wildcard.

Response · 201

The payment method domain registration.

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/payment-method-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 '{
    "domain_name": "pay.example.com"
  }'

Get payment method domain#

GET/v1/payment-method-domains/{payment_method_domain_id}

Requires scope payments.payment_method_domains.read or payments.payment_method_domains.write

Rate limit: read

Returns one environment-scoped payment method domain and its Apple Pay and Google Pay readiness.

Path parameters

payment_method_domain_idstringRequired

Flint payment method domain ID. Must be a valid ID with prefix pmdom_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Response · 200

The requested payment method domain.

Same response as Register payment method domain.

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

The requested payment method domain.

JSON
{
  "data": {
    "created_at": "2026-08-02T16:00:00Z",
    "domain_name": "pay.example.com",
    "payment_method_domain_id": "pmdom_01KEZF7C001WQCSRGH9GWR6628",
    "payment_option_statuses": [
      {
        "payment_option": "apple_pay",
        "status": "active"
      },
      {
        "payment_option": "google_pay",
        "status": "active"
      }
    ],
    "status": "active",
    "updated_at": "2026-08-02T16:00:00Z",
    "validation_status": "active",
    "version": 1
  },
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

Update payment method domain#

PATCH/v1/payment-method-domains/{payment_method_domain_id}Idempotent

Requires scope payments.payment_method_domains.write

Rate limit: external_provider_action

Turns the domain on or off. Reads never check again with the provider; they return the last result. Sending status active registers the hostname on your current payment account, turns it on, and checks again any wallet that isn't active, so send it to check a domain again. Sending status inactive turns wallet buttons off for the hostname.

Path parameters

payment_method_domain_idstringRequired

Flint payment method domain ID. Must be a valid ID with prefix pmdom_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Request body

expected_versioninteger

Version last read from the resource returned in `data` (the primary resource for a result object). The write fails with `VERSION_CONFLICT` if it has changed. Requiredness depends on the operation and fields being changed.

statusenumRequired

Whether wallet buttons are on for the hostname. active registers it on your current payment account and checks it again; inactive turns wallet buttons off.

  • active
  • inactive

Response · 200

The payment method domain registration.

Same response as Register payment method domain.

curl -X PATCH https://api.withflintpay.com/v1/payment-method-domains/pmdom_01KEZF7C001WQCSRGH9GWR6628 \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "expected_version": 1,
    "status": "inactive"
  }'

Was this helpful?