Register domains for payment methods
Register and verify domains to use payment methods (including Link, Apple Pay, and Google Pay) in Elements or Checkout's embeddable payment form.
For certain payment methods, you must register every web domain that shows the payment method if your integration uses Elements or Checkout’s embeddable payment form. This includes registering top-level domains and subdomains. For example, if you have the domain yourdomain.com and subdomains like shop.yourdomain.com and www.yourdomain.com, this guide explains how to register them.
After you register a domain, that domain is ready for use with other payment methods that you might enable in the future.
The following payment methods require registration:
- Google Pay
- Link
- PayPal
- Amazon Pay
- Apple Pay (additional verification step required)
Apple Pay and merchant validation
The Apple Pay documentation describes their process of “merchant validation," which Stripe handles for you behind the scenes. You don’t need to create an Apple Merchant ID or CSR. Instead, follow the steps in this guide.
Testing
You also need to register domains for testing. When testing locally, you can use a tool such as ngrok to get an HTTPS domain. You can either register in test mode, or register in live mode and the domain will also be registered in test mode automatically. Remember to register your domains in live mode before going live.
You can create and manage domains in the Dashboard on the Payment method domains page for use in production and testing.
Using Connect
Connect platforms that create direct charges must use the API to manage domains for their connected accounts, not the Stripe Dashboard.
Register your domain
To register a domain:
- On the Payment method domains page, click Add a new domain.
- Enter your domain name.
- Click Save and continue.
- If you’re setting up Apple Pay, verify ownership of your domain with Apple by following the steps described later on this page.
- (Optional) Repeat steps 1-4 for additional domains that you need to register.
After completing these steps, your domain shows up on the Payment method domains page.
Using an iframe
- Using an iframe with Elements: When using an iframe, its origin must match the top-level origin (except for Safari 17+ when specifying
allow="payment"
attribute). Two pages have the same origin if the protocol, host (full domain name), and port (if specified) are the same for both pages. - Top-level domain and iframe domain: If the top-level domain differs from the iframe domain, the top-level domain and the iframe’s source domain must both be registered payment method domains on the associated account.
Verify ownership of your domain with Apple Pay
During registration, Stripe automatically attempts to verify ownership of your domain with Apple. If the domain isn’t already verified, register your domain and then follow these steps to verify your registered domain with Apple Pay.
Common mistake
Apple attempts to request your domain association file, so it needs to be publicly available to Apple’s servers.
- Download the domain association file.
- Host the file at
/.
. For example, if you registerwell-known/apple-developer-merchantid-domain-association https://yourdomain.
, make that file available atcom https://yourdomain.
.com/. well-known/apple-developer-merchantid-domain-association - Click Verify.
Manage your domain
You can see a list of all of your domains in the Dashboard.
To disable a domain, click the row action and then click Disable. If a domain is disabled, the payment methods no longer appear in Elements or Checkout’s embeddable payment form on that domain.
To enable a disabled domain, click the row action and then click Enable.
Register your domain while using Connect
Connect platforms must register all domains where Elements or Checkout’s embeddable payment form displays the payment methods listed above. The domain where the charge is being run needs to be registered for the user running the charge.
If the platform creates direct charges, use your platform’s secret key to authenticate the request and set the Stripe-Account header to your connected account’s Stripe ID.
If the platform creates destination charges or separate charges and transfers, use your platform’s secret key to authenticate the request and omit the Stripe-Account header.
Learn more about Making API calls for connected accounts.