Apple Pay on the web
iOS / Safari Website Merchant Server Apple Server PSP/Acquirer Network Issuer
opt [payment method event]
opt [shipping contact event]
opt [payment method changed event]
opt [shipping contact changed event]
opt [shipping method changed event]
[1] canMakePayments() / canMakePaymentsWithActiveCard()
[2] true / false
[3] User taps Apple Pay button
[4] create ApplePayPaymentRequest and new ApplePaySession()
[5] session.begin()
[6] Payment Sheet is presented
[7] onvalidatemerchant event
[8] request a new merchant session
[9] request a new merchant session
[10] return merchant session blob
[11] return merchant session blob
[12] completeMerchantValidation()
[13] onpaymentmethodselected event
[14] completePaymentMethodSelection()
[15] onshippingcontactselected event
[16] completeShippingContactSelection()
[17] Payment Sheet is activated
[18] User changes payment method
[19] onpaymentmethodselected event
[20] completePaymentMethodSelection()
[21] User changes shipping contact / address
[22] onshippingcontactselected event
[23] completeShippingContactSelection()
[24] User changes shipping method
[25] onshippingmethodselected event
[26] completeShippingMethodSelection()
[27] User authenticates with Touch ID / Face ID
[28] Apple Pay payment data
is generated on device
[29] payment data sent to Apple Server
[30] Apple encrypt
payment data using public key
(associated with Payment
Processing Certificate)
[31] encrypted payment data returned to iOS
[32] onpaymentauthorized event
[33] send user data and ecnrypted payment data to server
[34] send user data and ecnrypted payment data to psp
[35] PSP decrypts Apple Pay payment data
[36] decrypted payment data sent to PNO
[37] PNO detokenises Apple Pay token
[38] card data sent for authorisation
[39] authorisation response
[40] authorisation response
[41] authorisation response
[42] authorisation response
[43] completePayment()
[44] Payment outcome displayed
and payment sheet dismissed
show / hide Apple Pay button
Event only triggered if shipping contact
fields are requested in the
ApplePayPaymentRequest.
Only a partial address is provided at this stage.
Full address is only provided after the user authenticates.
Event only triggered if shipping contact
fields are requested in the
ApplePayPaymentRequest.
Only a partial address is provided at this stage.
Full address is only provided after the user authenticates.
Event only triggered if shipping methods
are included in the
ApplePayPaymentRequest.