# Domain is misconfigured for Apple Pay when endpoint is verified by square

**URL:** <https://developer.squareup.com/forums/t/domain-is-misconfigured-for-apple-pay-when-endpoint-is-verified-by-square/10558>\
**Category:** Questions\
**Tags:** sandbox, web-payments-sdk\
**Created:** [September 4, 2023, 7:33am UTC](https://developer.squareup.com/forums/t/domain-is-misconfigured-for-apple-pay-when-endpoint-is-verified-by-square/10558 "2023-09-04T07:33:11Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![aleksandarm](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@aleksandarm](https://developer.squareup.com/forums/u/aleksandarm)\
**Post date:** [September 4, 2023, 7:33am UTC](https://developer.squareup.com/forums/t/domain-is-misconfigured-for-apple-pay-when-endpoint-is-verified-by-square/10558/1 "2023-09-04T07:33:11Z")

</div>

Hi Team,

I have been struggling lately with setting up apple pay with web-payments-sdk. I get an error when I click on the apple pay button. The apple pay window shows up but after few seconds it closes and I can see the error bellow through my network tab API post call to `https://pci-connect.squareupsandbox.com/v2/apple-pay/validate-merchant`

```json
{
    "errors": [
        {
            "category": "INVALID_REQUEST_ERROR",
            "code": "BAD_REQUEST",
            "detail": "Domain is misconfigured for Apple Pay."
        }
    ]
}

```

I followed this [tutorial](https://developer.squareup.com/docs/web-payments/apple-pay?preview=true), and I got the domain name verified, it’s showing `verified` through dashboard. The app is running on an HTTPS environment, it has a valid SSL certificate. The endpoint `.well-known/apple-developer-merchantid-domain-association` is returning the file that was generated when I entered the domain name in the UI for square apple pay (the file is automatically downloaded with the name of `apple-developer-merchantid-domain-association` with no extension and with 200 response).  
I also found [this topic](https://developer.squareup.com/forums/t/domain-is-misconfigured-for-apple-pay/5993/1) but I wasn’t able to get any clear directions from it.

Do you have any suggestions/ideas what I could be doing wrong or point me in some direction?

Thank you

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [September 5, 2023, 6:01pm UTC](https://developer.squareup.com/forums/t/domain-is-misconfigured-for-apple-pay-when-endpoint-is-verified-by-square/10558/2 "2023-09-05T18:01:25Z")

</div>

Is this for a mobile app or a web app. Also do you have the link to the hosted page? 🙂

---

<div class="post-metadata">

**Author:** ![developersinnoppl](https://avatars.discourse-cdn.com/v4/letter/d/e47c2d/32.png) [@developersinnoppl](https://developer.squareup.com/forums/u/developersinnoppl)\
**Post date:** [September 6, 2023, 1:24pm UTC](https://developer.squareup.com/forums/t/domain-is-misconfigured-for-apple-pay-when-endpoint-is-verified-by-square/10558/3 "2023-09-06T13:24:51Z")

</div>

I have followed the same steps in my web application with my sandbox account. I go the same issue.

`https://pci-connect.squareupsandbox.com/v2/apple-pay/validate-merchant`

```auto
{
    "errors": [
        {
            "category": "INVALID_REQUEST_ERROR",
            "code": "BAD_REQUEST",
            "detail": "Domain is misconfigured for Apple Pay."
        }
    ]
}
Please help me to fix this issue asap
```

---

<div class="post-metadata">

**Author:** ![aleksandarm](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@aleksandarm](https://developer.squareup.com/forums/u/aleksandarm)\
**Post date:** [September 7, 2023, 12:59pm UTC](https://developer.squareup.com/forums/t/domain-is-misconfigured-for-apple-pay-when-endpoint-is-verified-by-square/10558/4 "2023-09-07T12:59:05Z")

</div>

Hi Bryan,

I missed that information 😃. This is for web app.

Yeah here is the hosted page [Bolt Device Protection](https://uatselfservice.boltinsurance.com/uat/ui/acmerefer/enrollment?token=3FQDZ7T9HI39AGRR), to get to the page you will have to go thorough 3 wizard steps (they are pre-filled so just click next on those steps), and on the 4th step we display apple pay button.

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [September 7, 2023, 4:38pm UTC](https://developer.squareup.com/forums/t/domain-is-misconfigured-for-apple-pay-when-endpoint-is-verified-by-square/10558/5 "2023-09-07T16:38:59Z")

</div>

I just tested and Apple Pay worked for me. You should see the payment in your sandbox Developer Dashboard. What are you getting when testing? 🙂

---

<div class="post-metadata">

**Author:** ![aleksandarm](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@aleksandarm](https://developer.squareup.com/forums/u/aleksandarm)\
**Post date:** [September 8, 2023, 8:39am UTC](https://developer.squareup.com/forums/t/domain-is-misconfigured-for-apple-pay-when-endpoint-is-verified-by-square/10558/6 "2023-09-08T08:39:03Z")

</div>

I am not seeing anything related to apple pay or `.well-known/apple-developer-merchantid-domain-association`.  
Here is my workflow.  
 ![Screen Recording 2023-09-06 at 3.47.57 PM (1)](https://global.discourse-cdn.com/square/original/2X/e/e0fc3ea26705fe6e4ef59200fd8166f63745b5d8.gif)

Are there any restrictions to physical location since I am not in US.

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [September 8, 2023, 4:29pm UTC](https://developer.squareup.com/forums/t/domain-is-misconfigured-for-apple-pay-when-endpoint-is-verified-by-square/10558/7 "2023-09-08T16:29:39Z")

</div>

Yes, there are restrictions based on the region your in. Are you outside of one of the listed [supported regions](https://developer.squareup.com/docs/payment-card-support-by-country#digital-wallet-payments)? 🙂

---

<div class="post-metadata">

**Author:** ![aleksandarm](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@aleksandarm](https://developer.squareup.com/forums/u/aleksandarm)\
**Post date:** [September 18, 2023, 10:08am UTC](https://developer.squareup.com/forums/t/domain-is-misconfigured-for-apple-pay-when-endpoint-is-verified-by-square/10558/8 "2023-09-18T10:08:27Z")

</div>

Yeah I am outside of the listed supported regions.

I tried changing my apple ID shipping address and apple pay billing address.

 ![Screenshot at Sep 18 12-01-01](https://global.discourse-cdn.com/square/original/2X/f/fd73282c0e96af144cc75e6ec655e60aeeadbd2c.jpeg)  
 ![Screenshot at Sep 18 12-01-42](https://global.discourse-cdn.com/square/original/2X/9/9ca553a3339aa27987573a21211f5726e5ad1d4a.png)  
And even the section on language & region  
 ![image](https://global.discourse-cdn.com/square/original/2X/f/ffb550a4c218d19e56e175dc1ff69dee4324937b.jpeg)

Restarted my mac and then tried again to do the apple pay and it failed with the same message.

I also tried using VPN to connect myself to US and I still get the same error.

I am not sure if I need to physically be in some of the supported regions or there are some additional settings that I need to override.

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [September 18, 2023, 8:55pm UTC](https://developer.squareup.com/forums/t/domain-is-misconfigured-for-apple-pay-when-endpoint-is-verified-by-square/10558/9 "2023-09-18T20:55:41Z")

</div>

You’ll need to be in one of the supported regions to use Apple Pay. There isn’t any workarounds for this. 🙂

---

<div class="post-metadata">

**Author:** ![aleksandarm](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@aleksandarm](https://developer.squareup.com/forums/u/aleksandarm)\
**Post date:** [September 19, 2023, 8:49am UTC](https://developer.squareup.com/forums/t/domain-is-misconfigured-for-apple-pay-when-endpoint-is-verified-by-square/10558/10 "2023-09-19T08:49:29Z")

</div>

Mmm okey, I have few questions.

- How does square determine my location? I am not able to see how can’t I override that behaviour.
- What happens to my bank balance if I complete a payment with a real credit card?
  - Does the charge go through and my bank balance will be reduced by the amount that was charged?

- Does square support [apple sandbox cards](https://developer.apple.com/apple-pay/sandbox-testing/)

Thank you taking the time and for the quick responses!

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [September 19, 2023, 9:39pm UTC](https://developer.squareup.com/forums/t/domain-is-misconfigured-for-apple-pay-when-endpoint-is-verified-by-square/10558/11 "2023-09-19T21:39:57Z")

</div>

For security purpose we can’t share how we determine your location. If you charge a production card in production we will charge the card and the amount deducted from your bank. Unfortunately, we don’t support the Apple sandbox cards. 🙂
