Domain 6b6e62c2cf88.ngrok.app is misconfigured for Apple Pay

Hello Square Support,

I’m experiencing difficulties setting up Apple Pay through the web payments SDK. When I click the Apple Pay button, an error occurs, and the network tab shows the following:

{ “errors”: [

{

“category”: “INVALID_REQUEST_ERROR”,

“code”: “BAD_REQUEST”,

“detail”:“Domain 6b6e62c2cf88.ngrok.app is misconfigured for Apple Pay.”

}

] }

Here are the key details:

  • The domain association file is correctly placed in the .well-known directory with the right content.
  • Our domain is verified on the Apple Developer account.
  • We’ve set up the Apple Pay Merchant ID, ensuring consistency with the domain association file.
  • Our SSL certificate and HTTPS setup are valid.
  • We are testing in the Square Sandbox environment and a live environment.Despite these efforts, the issue persists across different browsers and devices. We kindly request your assistance in resolving this matter. Thank you for your attention. Best regards,Money Kumar

I believe this has to do with ngrok.app and the tunnel. If you deploy it to a production server are you able to process an Apple Pay payment? :slightly_smiling_face:

Hi Bryan

I just checked this same on production server and still getting the same issue.

Can you please check this screenshot and provide more guidance?

Thanks and Regards
Money Kumar

Is the domain verified when you go to your Developer Dashboard and does the certificate download when you navigate to the /.well-known/apple-developer-merchantid-domain-association URL. :slightly_smiling_face:

Yes Bryan, domain is verified. I also added my domain to Apple Pay and verified it.

Are you located in one of our supported regions for Apple Pay? :slightly_smiling_face:

Yes Bryan. Please check this screenshot.

Those are the computer settings. Are you in the US? Also where is the page hosted so I can try and replicate. :slightly_smiling_face:

Hello Bryan

I connected to US via VPN but still getting the same error. Please check the screenshot.

Where’s the site hosted? :slightly_smiling_face:

Hi Bryan

Site is hosted in US region.

And Bryan, Can we have a live chat? Actually it is taking many days in this conversation.

What’s the link to get to the form so I can try and replicate this? :slightly_smiling_face:

https://yaptestmoney321.staging.yapsody.com

The Code Quality Session → Click ‘More Info’
Click → Get Tickets
Select Any Quantity from dropdown
Click → Save To Cart
Enter email address → [email protected]
Copy same to next Re-enter field
Scroll to Botton and Choose ‘Credit Card’
Click “Pay with Credit Card”
You will be redirect to yapsecure.yapsody.com

This is our staging environment.

I just successfully checked out using Apple Pay on the site. Here’s the payment_id: F0RYGyPUTlc4tPP8XYjIDjEHd8dZY. Everything worked as expected. :slightly_smiling_face:

Hi Bryan,

You were right, the issue was because of unsupported region. Thanks, we got it working fine.

I have one more concern. I want to configure Square Apple Pay on my service based website and I have many merchants registered on my site. So is it possible that all merchants can get their domain verified from different accounts with only one verification file placement under .well-known folder?

Are these sellers that are OAuth’d to your application? I’m not sure I understand how one domain will be used for all sellers? :slightly_smiling_face:

Yes

Let me clear,

We have a ticketing platform where different presenters/sellers (casinos, artists etc) can sell tickets for their events. All presenters configure their own separate payment accounts. But the payment page for ticket buyers is same for all. So the domain for payment page is same but payment accounts for sellers are separate.

For instance, suppose seller A is selling tickets A12, B12 and seller B is selling tickets A13, B13 and if customer will buy A12 then seller A will receive its amount and if customer will buy A13 then customer B will receive its amount in their respective payment accounts.

So first, we don’t want each seller will verify this domain again and again. For this we are going to configure Register Domain API (POST /v2/apple-pay/domains - Square API Reference).

Second, we want to ensure if it is possible that all merchants can get their domain verified from different accounts with only one verification file placement under .well-known folder?

Actually, we want a direction to handle this situation.

Okay, thanks for further clarifying. This will be fine since you’ve verified the domain and the sellers will be using your verified domain. :slightly_smiling_face:

But my concern is, will they need to verify domain from their account? If yes, each of them will have separate verification file to upload under .well-known folder. So how it will work?

No, since your app it is the one that’s processing the payments and they’ll all be using your domain no further verification is necessary. If in the future you expand your app to give each seller there own domain to process payments with you’ll use the Apple Pay API RegisterDomain to verity the sellers domain. :slightly_smiling_face: