Mobile wallets

Magento 2 for Access Worldpay supports two mobile wallets:

Apple Pay

The Apple Pay mobile payment and digital wallet service enables shoppers to make payments in person, in iOS apps, and on the web. It is supported on the iPhone, Apple Watch, iPad and Mac.


To enable Apple Pay for your shoppers, you’ll need an Apple Developer account that is associated either with the Apple Developer Program or the Apple Developer Enterprise Program.

Your shoppers can only see Apple Pay as a payment option if they:

  • Use an Apple Pay-compatible device

  • Use Safari if they are paying on the web

  • Live in a country or region where Apple Pay is available

How it works

The diagram shows the transactional flow:

Transactional flow

  1. The shopper places the order.

  2. Magento requests the encrypted payload from Apple Pay.

  3. Apple Pay returns the encrypted payload after authentication.

  4. Magento sends a JSON request for authorization to Worldpay, containing the encrypted Apple Pay data.

  5. Worldpay sends the payment response to Magento.

  6. The Magento plugin informs the shopper of the outcome.

Implementation steps

  1. Create yourApple merchant ID(eg, then log in to your Worldpay merchant account.

  2. Switch to the mode you’ll be using (test or production), select Integration from the left-hand menu and Apple Pay in the top menu. You can see these details in the screenshot below:

MAI implementation

  1. Enter your Apple merchant ID and click the Generate button (if not generated already). Now you can see the certificate signing request (CSR) that you generated. Download that file so you can create your payment-processing certificate.

  2. EnableApple Payon the Apple developer website.

  3. Create apayment processing certificateon the Apple developer website, but note the following:

    * Make sure you enter the Apple merchant ID you created in step 1

    * Skip the step in which you create an Apple-generated CSR

    * Instead, select the Worldpay CSR you generated step 1

    * Download and save the payment processing certificate you generated (.cer file)

  4. When you have completed the steps on the Apple developer website, send the payment processing certificate you downloaded to Worldpay. Then wait until Worldpay confirms that the certificate is activated.

  5. NowRegister and validate your merchant domainwith Apple, making sure to use the Apple merchant ID you created in step 1.

  6. Create aMerchant identity certificate.

For each transaction you must request a session from Apple using your merchant identity certificate. Remember the following when you create your Apple merchant identity certificate:

  • When asked for your merchant ID, make sure you enter the Apple merchant ID you created in step 1

  • Follow the instructions from Apple to create a CSR yourself

You cannot use the CSR you generated from Worldpay to create a merchant ID certificate. Instead, generate a CSR of your own and use that to generate the merchant ID certificate. To do this:

  1. Download and save the generated merchant ID certificate (.cer file).

  2. When you have completed the instructions from Apple, add the merchant ID certificate to your keychain.

  3. When you create your own CSR, you might also get a private key. Add that file too in your keychain app.

  4. Export the merchant ID certificate from your keychain as a p12 file (see screenshot below).

    p12 file

  5. Make a note of the password you entered in the field shown below:

    Password popup

  6. Convert your p12 file to a PEM file - use the following command:

    openssl pkcs12 -in ApplePayMerchantIdentity_and_privatekey.p12 -out ApplePay.crt.pem -clcerts -nokeys

    openssl pkcs12 -in ApplePayMerchantIdentity_and_privatekey.p12 -out ApplePay.key.pem -nocerts

  7. When you generate these files you may be asked for your password. If so, use the password you used in step 5. Upload both files to your server: e.g, /var/www/html/apple-certs

  8. Use the following commands to verify the files:

    openssl x509 -noout -modulus -in ApplePay.crt.pem | openssl md5

    openssl rsa -noout -modulus -in ApplePay.key.pem | openssl md5

  9. The output of both commands should be the same. You can check this in the section below.

  10. If the output of both commands is not the same, please double-check that you have followed all the previous steps accurately. If both outputs are the same, then you have enabled Apple Pay successfully.

Note: PEM files store SSL certificates and their associated private keys.

How to configure Apple Pay

To configure Apple Pay, do the following:

  1. Go to Magento Admin/Stores/Configurations/Sales/Access Worldpay.

  2. The Apple Pay configuration is in the Wallets section. Complete and save these configurations, as shown below, and shoppers can then use Apple Pay at checkout.

Apple Pay configuration

The table below describes the fields, and the information you must input to complete the Apple Pay configuration.

Wallet enabled and titleIf set to Yes, the wallet section is available at checkout to enable payment by Apple Pay, Google Pay, etc. The shopper sees the title you enter as the heading for the Mobile Wallet section.
EnabledWhen set to Yes, Apple Pay is available at checkout.
Certification KeyThe path of the certification key (PEM) file in the server.
Certification PathThe path of the certification CRT (PEM) file in the server.
Certification PasswordYour certification password.
Merchant NameYour Apple merchant ID.
Domain NameThe domian name you registered with Apple.

Note: CSR keys are unique for test and production environments and for each Merchant ID.

Shopper journey

This is a typical successful shopper journey:

  1. At checkout, shoppers see the Apple Pay option in the format in the screenshot below:

    Place order page

  2. The shopper clicks the Place Order button and an Apple Pay popup appears.

    Apple Pay popip

  3. Once payment is authorized by Apple, shoppers see a payment verified message.

  4. Finally shoppers see the order success page.

Google Pay

Google Pay lets your shoppers pay with a single click, using payment methods saved in their Google account.

How it works

You can see the transactional flow in the diagram below:

Transactional flow

  1. The shopper places the order.

  2. Magento requests the payment token from Google Pay.

  3. Google Pay returns the payment token.

  4. Magento sends an XML Direct request for authorization to Worldpay, this request contains the payment token.

  5. Worldpay sends the payment response to Magento.

  6. The Magento plugin informs the shopper of the outcome.

You can enable Google Pay payments, as seen in the Main configuration section below, at Admin > Stores > Configuration > Sales > Access Worldpay > Mobile Wallets.

Main configuration

Do the following:

  1. Go to Stores > Configuration > Sales > Access Worldpay > Mobile Wallets: Google Pay. The Google Pay configuration screen appears.

    Google Pay configuration screen

    The highlighted fields show that you can select multiple items.

    Note: To use production mode, you must first submit a request to Google to have your account activated.

  2. You must also set the configurations shown in the screenshot above. These configurations are in the table.

Credit card configurationDescription
EnabledIf set to Yes, Google Pay is available at checkout.
Payment methodsSupported credit cards.
Authentication methodsPAN_ONLY: Personal account number.
CYRPTOGRAM_3DS:3D Secure authentication.
Gateway nameSet this to Worldpay.
Gateway MerchantIDYour Worldpay merchant ID.
Google MerchantIDYour Google merchant ID.
Google MerchantNameConfigure this in your Google merchant account.

General configuration

To change between test and production environments:

  1. Go to the General Configuration section, and change the Environment Mode.

    General configuration screen

Shopper journey

This is a typical successful shopper journey:

  1. When Google Pay is enabled, shoppers see it as an option in the checkout screen.

    Checkout screen

  2. The shopper clicks the Place Order button. If they have already signed into their Google account, the shopper sees their saved card details in their Google account. If they haven’t signed in, Google asks them to sign in.

  3. If the shopper doesn’t have a saved card in their Google account, they are asked to enter their card details.

    Card details

  4. If the payment is approved by Google and Worldpay, the shopper sees a success page.

Note: If 3Ds Flex is enabled, when the shopper clicks the Place Order button, they are redirected to a challenge page. If the transaction is successful they are redirected to success page.