Domain is misconfigured for Apple Pay

Hey everyone :wave:,
I’m trying to test Apple Pay using the web-payments-quickstart demo application. I’m following this guide, and everything works fine, but when I click on the :apple: Pay button, it returns me the error:

{
    "errors": [
        {
            "category": "INVALID_REQUEST_ERROR",
            "code": "BAD_REQUEST",
            "detail": "Domain 4e5b09ff259c.ngrok.io is misconfigured for Apple Pay."
        }
    ]
}

The domain is verified correctly, as you can see here:

Do you know what’s happening? I googled the error, but I didn’t find anything about this error :frowning:

:wave: I believe it’s because you’re using a ngrok tunnel. If you deploy to a HTTPS hosting environment it will work as expected. :slightly_smiling_face:

Unfortunately not. I have the same error deploying the application to heroku

{
    "errors": [
        {
            "category": "INVALID_REQUEST_ERROR",
            "code": "BAD_REQUEST",
            "detail": "Domain web-payments-quickstart.herokuapp.com is misconfigured for Apple Pay."
        }
    ]
}

I tried to go to your site and for some reason when trying to load it using Safari it’s not HTTPS and I’m getting a not secure message. But in Chrome it is secure. Is there something blocking the certificate with Safari?

I’m not receiving your error. Maybe it’s something related to HTTPS redirect? What about if you visit this URL directly https://web-payments-quickstart.herokuapp.com/examples/apple-pay?

It’s working for me. The page loads with the Apple Pay button and when I click on it it starts the Apple Pay checkout process.

Hi Team,

Iam trying to apple payment through square. Iam facing domain is misconfiguared. please check the screenshot. please suggest me the solutions.

When you check the Developer Dashboard is the Apple Pay certificate verified? :slightly_smiling_face:

yes it verified. please check the screenshot.

Great! The issue must be that the page you’re trying to load Apple Pay on must not be seeing the certificate that you upload to the domaine. :slightly_smiling_face:

We have added the certificate. please check the complete screenshot. According to screenshot it shows merchant ID. we have also tried to check on other domain. php.parastechnologies.in. it’s also verified. But we got same issue.

Query:- Where we have to place the certificate on domain server ? please suggest.

Can you please explain little bit in detail ? we are not getting which checkout link you are asking. we have added the apple-developer-merchantid-domain-association file in .well-known folder on our server. then we are running the square apple pay SDK for that. I think don’t have any other checkout link we are getting.

Do you have the link to the checkout page? :slightly_smiling_face: