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
{
"errors": [
{
"category": "INVALID_REQUEST_ERROR",
"code": "BAD_REQUEST",
"detail": "Domain is misconfigured for Apple Pay."
}
]
}
I followed this tutorial, 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 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
Is this for a mobile app or a web app. Also do you have the link to the hosted page?
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
{
"errors": [
{
"category": "INVALID_REQUEST_ERROR",
"code": "BAD_REQUEST",
"detail": "Domain is misconfigured for Apple Pay."
}
]
}
Please help me to fix this issue asap
Hi Bryan,
I missed that information . This is for web app.
Yeah here is the hosted page Bolt Device Protection, 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.
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?
I am not seeing anything related to apple pay or .well-known/apple-developer-merchantid-domain-association
.
Here is my workflow.
Are there any restrictions to physical location since I am not in US.
Yes, there are restrictions based on the region your in. Are you outside of one of the listed supported regions?
Yeah I am outside of the listed supported regions.
I tried changing my apple ID shipping address and apple pay billing address.
And even the section on language & region
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.
You’ll need to be in one of the supported regions to use Apple Pay. There isn’t any workarounds for this.
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
Thank you taking the time and for the quick responses!
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.