This topic describes how to test your Apple Pay integration, and also how to diagnose issues related to the display of the Apple Pay button. This topic applies for FramePay, Rebilly Instruments, and Hosted Payment Forms.
For information on how to set up Apple Pay, see Set up Apple Pay.
The Apple Pay button only displays under certain circumstances, and when all of the following requirements are met:
- The domain you are trying to test on:
- Is registered with Apple. For more information, see Set up Apple Pay.
- Is served over HTTPS.
- The environment you are testing is set up to handle Apple Pay purchases. For example, the Ready To Pay API should return Apple Pay in the list of available purchase methods.
Use this process to test your Apple Pay integration with a real Apple ID. This process is used before going live and verifies that your integration is ready for customers to make Apple Pay purchases.
- Complete the steps described in Set up Apple Pay. When signed in with a live Apple ID, your domain must be registered to show the Apple Pay button.
- Sign in to your Apple Pay supported device with a live Apple ID.
- Open your page in Safari.
- Press the Apple Pay button and complete the purchase.
Use this process to test your Apple Pay integration with an Apple sandbox tester account. Merchants and developers use this process to test their implementation of Apple Pay with test credit and debit cards. For example, when testing during development.
Your Apple ID needs to be part of the Apple Developer Program to be able to create Apple sandbox tester accounts.
To test Apple Pay, you need an Apple sandbox tester account which you use to make the payment. You log into your test device with this new Apple sandbox tester account, and make test purchases.
To create a sandbox tester account:
- Ensure you have a real Apple ID, and that it is part of the Apple Developer Program.
- In the App Store Connect, log in with your Apple ID and visit the Users and access page.
- In the sidebar, under Sandbox, press Testers.
- Press + and register a new account.
- You must use a new unique email address for the account. You can not use any email account that has been previously associated with Apple. Using your email with a
+
will not work. You need access to the email in order to verify your account. - For region, choose one of the Apple Pay supported regions.
- You must use a new unique email address for the account. You can not use any email account that has been previously associated with Apple. Using your email with a
To log in to iCloud on your Apple test device, with your new Apple sandbox tester account:
- Ensure your test device's region is set to one of the Apple Pay supported regions.
- Sign in with your new sandbox tester account on your Apple Pay supported device.
- These exact steps depend on which device you are using, but in general follow the normal process to sign in with your apple ID, but use your new Apple sandbox tester account credentials.
- Follow the 2FA prompts and activate 2FA for your account.
If you mistakenly use a sandbox tester account to sign in to a production environment, like iTunes, the sandbox account becomes invalid and can not be used again. If this happens, create a new sandbox tester account with a new email address.
To add a test card to the account's wallet:
- Choosing a test card number from Apple's Sandbox testing page.
- Note: if the card fails to add to your wallet, try another test card.
- Open Wallet on your test device.
- Follow the prompts to add a new card with manual entry
For more details see the Sandbox testing page of the Apple Pay developer docs.
- Make sure you meet all the prerequisites listed above.
- Sign in to your test device with your Apple sandbox tester account.
- Visit your test environment on your test device, in Safari.
- Press the Apple Pay button and complete the purchase.
Please check the Apple Pay on the web interactive demo.
If the Apple Pay button does not appear on that page:
- Check that you are signed in on your test device with an Apple ID.
- Check that region of your Apple ID, and the region that your device is set to, are both Apple Pay supported regions.
- Check that you are testing with an Apple Pay supported device.
If the Apple Pay button appears on that page, but not in your integration:
- Check that the domain you are trying to test on:
- Is registered with Apple. For more information, see Set up Apple Pay.
- Is served over HTTPS.
- Check that your test environment is set up to allow Apple Pay purchases. For example, the Ready To Pay API should return Apple Pay in the list of available purchase methods.
Ensure the region you used to create the account in the developer console, and the region that your device is set to, are both Apple Pay supported regions.
Remember that test accounts that have signed into real services such as iTunes will become invalidated, and you need to create a new account.
If you receive an error like:
Could Not Sign In To iCloud Your Apple ID "xxx@xxx.com" could not be used to sign in to iCloud. (34608)
Make sure you have updated your device to the latest version of iOS/macOS.
Remove your test card and choose another card number from Apple's Sandbox Testing page.
If the console shows the message "Apple session was canceled", your Sandbox Tester account may have become invalid by being signed into a live Apple system. Complete the Create an Apple sandbox tester account process.
This occurs when you are showing the Apple Pay button on a non-registered domain.
For more information, see Set up Apple Pay.