iOS Mobile Buy SDK: Selected Apple Pay Email Overrides User Associated with Checkout

New Member
3 0 0

TLDR; Updating the checkout with the email the user sets in the Apple Pay modal seems to override the user associated with the checkout via the checkoutCustomerAssociateV2 mutation


Heres the following steps I'm taking:


1. Get User A's customer access token by using the customerAccessTokenCreate mutation

2. Create checkout using checkoutCreate mutation

3. Associate User A's customer access token to checkout using checkoutCustomerAssociateV2 mutation

4. Trigger Apple Pay Modal to show by creating a new PaySession instance, and then calling authorize() on that pay station instance.

5. *Apple Pay Modal Shows*

6. In the Apple Pay Modal, the user set's User B's email in the contact section of the Apple Pay Modal (instead of User A's). (see attached photo to see contact section).

7. *User Authorizes Apple Pay Payment*

8. This triggers the PaySessionDelegate method didAuthorizePayment to trigger. By following the documentation here it recommends updating the checkout's email with the email the user set in the Apple Pay modal by using the

checkoutEmailUpdateV2 mutation. (this is an important step to the problem)

9. *Checkout completes successfully via checkoutCompleteWithTokenizedPaymentV2 mutation*

10. Query User A's orders and that order does not show up under that user.


This sparks a few questions:

1. Is the checkoutCustomerAssociateV2 mutation only for associating a user for the web url checkout flow of the SDK?

2. Is it expected that setting a different email using the checkoutEmailUpdateV2 mutation will un-associate a user associated via the checkoutCustomerAssociateV2 mutation prior?

3. Am I allowed to just not use the email the user sets in the Apple Pay modal, and just use the logged-in user's email instead (so the user can't override who this checkout is associated with)?


Apple Pay Template Sketch freebie - Download free resource for ...



New Member
3 0 0

Any thoughts on this @vix ?