# Apple Pay (Web Payments SDK) — SDK aborts sheet at merchant validation; domain verified, credentials fresh, cards working

**URL:** <https://developer.squareup.com/forums/t/apple-pay-web-payments-sdk-sdk-aborts-sheet-at-merchant-validation-domain-verified-credentials-fresh-cards-working/27304>\
**Category:** Questions\
**Created:** [August 23, 2026, 3:04pm UTC](https://developer.squareup.com/forums/t/apple-pay-web-payments-sdk-sdk-aborts-sheet-at-merchant-validation-domain-verified-credentials-fresh-cards-working/27304 "2026-08-23T15:04:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![robsmaze](https://avatars.discourse-cdn.com/v4/letter/r/a8b319/32.png) [@robsmaze](https://developer.squareup.com/forums/u/robsmaze)\
**Post date:** [August 23, 2026, 3:04pm UTC](https://developer.squareup.com/forums/t/apple-pay-web-payments-sdk-sdk-aborts-sheet-at-merchant-validation-domain-verified-credentials-fresh-cards-working/27304/1 "2026-08-23T15:04:15Z")

</div>

Apple Pay on our site opens the payment sheet and self-dismisses in about a second, before Face ID. `tokenize()` throws `UnexpectedError: An unexpected error occurred while using Apple Pay.`

We instrumented `ApplePaySession` and captured the handshake: **the session constructs (v3), `begin()` runs, `onvalidatemerchant` fires with the `apple-pay-gateway.apple.com/paymentservices/startSession` validationURL, and the SDK then calls `session.abort()` without ever calling `completeMerchantValidation`.** The SDK’s merchant-session request to Square’s backend is failing.

Everything on our side is verified:

- Application: `Verified Correct`
- Location: `Verified Correct`
- Domain `www. *****.com` registered under this application, status** Verified** (2026-08-22); the association file serves HTTP 200 (9,098 bytes)
- Minimal paymentRequest (US / USD / positive fixed total; no contact requests); `tokenize()` called synchronously in the click handler
- Production access token **renewed 2026-08-23** after the console’s Locations page reported “Access token is missing” — the abort is unchanged after renewal
- **Card payments through the same application and location work** : live production charges completed before and after the token renewal (most recent 2026-08-23, 14:33 UTC)
- Reproduced on iOS 26 (Safari and Chrome), fresh sessions, across 2026-08-22 and 2026-08-23

it appears Apple Pay on the web is not fully provisioned for this seller account despite the Verified domain.

---

<div class="post-metadata">

**Author:** ![zacstlouis](https://avatars.discourse-cdn.com/v4/letter/z/b5a626/32.png) [@zacstlouis](https://developer.squareup.com/forums/u/zacstlouis)\
**Post date:** [August 24, 2026, 5:46pm UTC](https://developer.squareup.com/forums/t/apple-pay-web-payments-sdk-sdk-aborts-sheet-at-merchant-validation-domain-verified-credentials-fresh-cards-working/27304/4 "2026-08-24T17:46:04Z")

</div>

I’d like to see if I can reproduce this and track some of the internal API logs. Could you post your AppID and a timestamp (date time + timezone) I can use to trace it?

It would also help if you had some sample code showing how you are setting up the web payments SDK and any error messages reported to the browser’s devtools

---

<div class="post-metadata">

**Author:** ![robsmaze](https://avatars.discourse-cdn.com/v4/letter/r/a8b319/32.png) [@robsmaze](https://developer.squareup.com/forums/u/robsmaze)\
**Post date:** [September 2, 2026, 4:59pm UTC](https://developer.squareup.com/forums/t/apple-pay-web-payments-sdk-sdk-aborts-sheet-at-merchant-validation-domain-verified-credentials-fresh-cards-working/27304/5 "2026-09-02T16:59:52Z")

</div>

Zac,  
checking in to see if there were any updates to this issue.

---

<div class="post-metadata">

**Author:** ![robsmaze](https://avatars.discourse-cdn.com/v4/letter/r/a8b319/32.png) [@robsmaze](https://developer.squareup.com/forums/u/robsmaze)\
**Post date:** [September 2, 2026, 7:11pm UTC](https://developer.squareup.com/forums/t/apple-pay-web-payments-sdk-sdk-aborts-sheet-at-merchant-validation-domain-verified-credentials-fresh-cards-working/27304/6 "2026-09-02T19:11:00Z")

</div>

Solved, and it was on our end — posting the details in case it helps the next person.

Root cause: our page was initializing the SDK with a location ID that doesn’t belong to our Square account. NEXT\_PUBLIC\_SQUARE\_LOCATION\_ID in our production environment still held the location from our sandbox setup, left over from when the page was built against sandbox. The app ID and the server-side access token were both correct and belonged to the right merchant — only the client-side location was foreign.

Why it was so hard to see:

Card payments worked perfectly, including live charges. Card tokenization is client-side and doesn’t validate the location, and our server charges with its own (correct) SQUARE\_LOCATION\_ID, so every non-wallet payment succeeded end to end.  
Apple Pay is the only flow that must prove merchant + location + domain together, at merchant validation. With a location outside the account, that check can’t pass, so the SDK called session.abort() without completeMerchantValidation — the exact journal I posted above.  
Everything we kept re-verifying (domain Verified, association file serving 200, freshly rotated access token, seller-level Apple Pay toggle, sample-identical paymentRequest) was genuinely fine and had nothing to do with it.  
Corrected the variable, redeployed, and Apple Pay completed a live payment on the first try.

One suggestion, offered kindly: UnexpectedError is doing a lot of work here. If the SDK could surface something like “location not found for this application” when merchant validation fails on an invalid location, this would have been a two-minute fix rather than a ten-day hunt across your forum and Apple’s docs. A note in the Apple Pay guide — “the locationId passed to payments() must belong to the same merchant as the application; a mismatch fails at merchant validation while card payments continue to work” — would probably save others the same trip.

Thanks for engaging with it, and for pointing me at the internal-log angle — chasing what your backend saw is what got me looking at what we were sending it.

---

<div class="post-metadata">

**Author:** ![zacstlouis](https://avatars.discourse-cdn.com/v4/letter/z/b5a626/32.png) [@zacstlouis](https://developer.squareup.com/forums/u/zacstlouis)\
**Post date:** [September 3, 2026, 2:41pm UTC](https://developer.squareup.com/forums/t/apple-pay-web-payments-sdk-sdk-aborts-sheet-at-merchant-validation-domain-verified-credentials-fresh-cards-working/27304/7 "2026-09-03T14:41:10Z")

</div>

> [@robsmaze](#):
>
> Card payments worked perfectly, including live charges. Card tokenization is client-side and doesn’t validate the location, and our server charges with its own (correct) SQUARE\_LOCATION\_ID, so every non-wallet payment succeeded end to end.  
> Apple Pay is the only flow that must prove merchant + location + domain together, at merchant validation. With a location outside the account, that check can’t pass, so the SDK called session.abort() without completeMerchantValidation — the exact journal I posted above.  
> Everything we kept re-verifying (domain Verified, association file serving 200, freshly rotated access token, seller-level Apple Pay toggle, sample-identical paymentRequest) was genuinely fine and had nothing to do with it.  
> Corrected the variable, redeployed, and Apple Pay completed a live payment on the first try.
> 
> One suggestion, offered kindly: UnexpectedError is doing a lot of work here. If the SDK could surface something like “location not found for this application” when merchant validation fails on an invalid location, this would have been a two-minute fix rather than a ten-day hunt across your forum and Apple’s docs. A note in the Apple Pay guide — “the locationId passed to payments() must belong to the same merchant as the application; a mismatch fails at merchant validation while card payments continue to work” — would probably save others the same trip.

Sorry for the late reply, but I am glad you were able to troubleshoot it on your own. I’ll see if I can get a little note added to the docs, getting the sdk updated will be harder though.

---

<div class="post-metadata">

**Author:** ![zacstlouis](https://avatars.discourse-cdn.com/v4/letter/z/b5a626/32.png) [@zacstlouis](https://developer.squareup.com/forums/u/zacstlouis)\
**Post date:** [September 14, 2026, 10:26pm UTC](https://developer.squareup.com/forums/t/apple-pay-web-payments-sdk-sdk-aborts-sheet-at-merchant-validation-domain-verified-credentials-fresh-cards-working/27304/9 "2026-09-14T22:26:02Z")

</div>

I worked with the dev team and we updated the documentation to be more explicit about the location required when initializing the web payments sdk. We are hoping to also add better error handling so these errors surface more intuitively, but I don’t have an eta on that. Thank you for posting!

> **[Add the Web Payments SDK to the Web Client](https://developer.squareup.com/docs/web-payments/quickstart/add-sdk-to-web-client#4-attach-the-card-payment-method-to-the-pay-elements)**
>
> Applies to: Web Payments SDK | Payments API | Learn how to add the Web Payments SDK to the web client.
