Preparing for Strong Customer Authentication transactions in the European Economic Area

Starting December 31, 2020, legislation from the European Union introduces Strong Customer Authentication (SCA) requirements for users in the European Economic Area (EEA) that may impact how they complete online purchases. While the App Store and Apple Pay will support Strong Customer Authentication, you’ll need to verify your app’s implementation of StoreKit and Apple Pay to ensure purchases are handled correctly.

What’s changing

The second Payment Services Directive (PSD2) is a European Union regulation that requires Strong Customer Authentication (SCA) for certain online purchases in order to protect against fraud. When certain transactions are initiated via credit or debit card on a website, in an app, or on the App Store, they must be authenticated by the bank or payment service provider before they can be completed.

Handling transactions with StoreKit

For in-app purchases that require SCA, the user is prompted to authenticate their credit or debit card. They’re taken out of the purchase flow to the bank or payment service provider’s website or app for authentication, then redirected to the App Store where they’ll see a message letting them know that their purchase is complete. Handling this interrupted transaction is similar to Ask to Buy purchases that need approval from a family approver or when users need to agree to updated App Store terms and conditions before completing a purchase.

Make sure your app can properly handle interrupted transactions by initializing a transaction observer to respond to new transactions and synchronize pending transactions with Apple. This observer helps your app handle SCA transactions, which can update your payment queue to a state of “failed” or “deferred” as the user exits the app. When the user is redirected to the App Store after authentication, a new transaction with a state of “purchased” is immediately delivered to the observer and may include a new value for the transactionIdentifier property. You can test interrupted purchase scenarios in sandbox for a specific Sandbox Apple ID.


Handling transactions with Apple Pay

Apple Pay includes built-in authentication and doesn’t require additional authentication by banks. However, to avoid issues with payments made with Apple Pay on your apps and websites, make sure you’re using the correct country code on payment requests and showing the final amount on the payment sheet.

The countryCode value on the PKPaymentRequest (for apps) and ApplePayPaymentRequest (for websites) should be set to the correct two-letter country code for the country in which you’re processing the funds. Setting this correctly ensures a PSD2-compliant cryptogram when the merchant countryCode and the user’s card issuer both fall within the EEA.

Show the final amount, not a pending amount, on the payment sheet. This will help with Dynamic linking, where the transaction amount and a merchant identifier are included in the cryptogram to prove the origin and authenticity of the transaction.

View Apple Pay documentation