Apple Pay eligibility
Because Apple Pay is loosely coupled with the WLW system, it is important to check to see if a user is still eligible to make a payment with Apple Pay.
For example, a user could have de-activated his Apple Pay account with iOS, but did not remove his Apple Pay from his mobile wallet. By checking to see if a user can make payments with Apple Pay at the right times, you can avoid a synchronization issue.
There are two specific times you should always check to see if the user can make payments with Apple Pay:
- Before Account Provisioning
- Before presenting the user the option to Pay with Apple Pay during a transaction
Before creating a payment request, call Apple’s iOS
canMakePaymentsUsingNetworks: method (
PKPaymentAuthorizationViewController class) to determine whether the user will be able to make payments on a network that you support. Use the
canMakePayments method to check whether the device’s hardware and parental controls permit Apple Pay usage.
You can, optionally, display a payment setup button, prompting the user to set up her card. As soon as the user taps this button, initiate the process of setting up a new card (for example, by calling the
Note: Do not ask the user to perform any other tasks before presenting the payment request. For example, if the user needs to enter a discount code, you must ask for the code before she presses the Apple Pay button.