When using Apple Pay with WooCommerce Payments, this set up process is completed automatically. WooCommerce Payments eliminates certification steps by working directly with Apple to generate certificates.The following payment gateway integrations can support Apple Pay currently:
- Stripe for WooCommerce
- Square for WooCommerce
- PayPal Powered by Braintree
Gateway feature comparisonWhile there are many similarities to how Apple Pay is handled between the 3rd party supported gateways, there are some differences:
|Available on Cart Page||yes||yes||yes||yes||yes||yes|
|Available on Checkout page||yes||yes||yes||yes||yes||yes|
|Available “Buy Now” for simple products||yes||yes||yes||yes||yes||yes|
|Enable Apple Pay Locations Individually||yes||yes||yes||yes||no||no|
|Requires manual certificate generation||yes||yes||yes||no||no||no|
|Requires PEM file on server||yes||yes||yes||no||no||no|
|Supported locations / currencies||USA||USA||USA, CA||USA||All Apple Pay locations||All Apple Pay locations|
|Supports WooCommerce Subscriptions||no||no||no||no||yes||yes|
- Your entire site must be served over HTTPS with a valid SSL certificate.
- Your server must support the TLS 1.2 protocol.
- (Not required with Stripe) You must create an Apple Developer Account ($99 per year)
- Authorize.Net and CyberSource only:
- The individual who generates certificates must use MacOS to generate them, as Keychain access is required.
- Your merchant account provider must support tokenization (includes Chase Paymentech, Global Payments, First Data). If you’re not sure if you meet this requirement, please check with your Authorize.Net or CyberSource representative.
Please note that Apple Pay is only available for one-time transactions at this time, so it is not possible to support WooCommerce Subscriptions or any sort of recurring or delayed billing for most of the payment gateways mentioned here. The exceptions to this are Stripe and WooCommerce Payments – they do accept Apple Pay when using WooCommerce Subscriptions.
Note: Verification is handled automatically with Apple Pay in WooCommerce Payments.Your environment must validate your domain with Apple, set up a payment processing certificate to transfer data, and use a merchant identity certificate to authenticate your merchant sessions with Apple Pay servers. Apple has a list of steps here for items specific to their developer center UI, and we’ll catalog the basic steps to generating and placing certificates on the merchant server.
- Create a new (or use an existing) Merchant ID via the Apple developer center under “Certificates, IDs, and Profile” > Merchant IDs.
- Edit the merchant ID to add a new domain.
- Download the verification file and SSH into to your server while leaving this open.
- Verify your domain by placing your verification file below your root at
/.well-known/payment-processing-certand verify with Apple.
- Sign up for Apple Pay in your payment gateway account using your new Apple Developer Merchant ID.
- Generate a new Certificate Signing Request (CSR) via your account and download it.
.pemfile you can upload to your server. This file must be stored above your webroot in a non-public, readable location. If you use shared hosting, you may not have access to this area
- Back in your Apple Developer account, create a new Payment Processing Certificate by uploading your processor’s CSR.
- Create a new Merchant Identity Certificate and follow the steps to use Keychain Access to create a new CSR, which you will then upload.
- When finished, a
merchant_id.cerfile will download.
- Double-click the new certification file to add to your Keychain Access app
- Right-click on its entry (named “Merchant Identity…”) and click “Export….”. This will generate a .p12 file.
- Using OpenSSL, convert that to a .pem file using a terminal command similar to
openssl pkcs12 -in apple-pay-cert.p12 -out apple-pay-cert.pem -nodes -clcerts
- Upload that PEM file to your server, above the web root, in a non-public location that’s readable by PHP. Some hosts already have a dedicated directory for this — for example, Pagely servers have a
/users/directory above the webroot that can be used for this purpose.
- Set the full server path for that PEM file in the plugin settings.
This section is only required for Authorize.Net, CyberSource, and Moneris.Once your domain has been verified and your PEM file is placed appropriately on the server, you can now enable Apple Pay via a one line filter, then configure the plugin to enable Apple Pay. To enable Apple Pay, use one of the following snippets: Authorize.Net
add_filter( 'wc_payment_gateway_authorize_net_cim_activate_apple_pay', '__return_true' );CyberSource
add_filter( 'wc_payment_gateway_cybersource_activate_apple_pay', '__return_true' );Moneris
add_filter( 'wc_payment_gateway_moneris_activate_apple_pay', '__return_true' );Once this filter is active on the site, Apple Pay settings are enabled. The settings are located under WooCommerce > Payments > Apple Pay.
- Enable / Disable – Enable this to make Apple Pay available to customers using eligible devices
- Allow Apple Pay on – Select the locations for which Apple Pay should be available:
- Single products – Shows the Apple Pay button as a “Buy Now” option on single product pages above the “Add to cart” button. Only shown for simple products currently.
- Cart – Shows the Apple Pay button on cart pages before the “Proceed to Checkout” button as an express checkout option.
- Checkout – Shows Apple Pay button below the “Order Review” section and above the other available payment options.
- Button Style – Determines which Apple Pay button is shown to customers.
- Apple Merchant ID – Enter the Merchant ID you’ve generated in your Apple Developer Account
- Certificate Path – Enter the full path to the PEM file on your server (remember, this should be above your webroot for security)
- Test Mode – Enable this to put the Apple Pay gateway in test mode for processing test orders.
The Gateway’s RoleThe Apple Pay Touch ID process is only meant to verify that the customer’s card is valid, then encrypt its data. From there, Apple Pay does not actually do anything to process the payment, it’s just securing the payment data for sending. From that point, the payment gateway takes over the transaction, formatting the data to send it to the processor for approval, decline, etc., sending it in place of standard card details. Because the transaction is handled by the processor at that point after the payment details have been passed securely, this means that other gateway features, such as captures and refunds from WooCommerce, will work as they usually do. Apple does allow creating Sandbox iCloud users with fake cards, but unless you have an extra iPhone laying around then that’s not really feasible without signing out of your personal iCloud on your eligible devices. In our testing, so long as you use the test mode in settings (transactions are posted to a test environment), you can use your real account and Apple Pay payment methods without processing real transactions.
Eligible DevicesIn order to use Apple Pay, the purchaser must use an eligible device and browser. iPhone 6 or newer, iPad Pro, iPad Air 2, iPad mini 3 or newer, and MacBooks from 2012 or newer using MacOS 10.12 with an Apple Pay device — these devices can use Apple Pay. Apple Pay on the web can only be used with Safari, so customers using Chrome, Firefox, or other browsers cannot check out with Apple Pay. Please review Apple’s list of eligible devices to ensure you or your customer is using a supported device, version, and browser. Q: Can I process refunds or captures as usual with Apple Pay? A: Yes! If credit card transactions for your payment gateway allow refunds, voids, or captures, then Apple Pay transactions are eligible for these features as well, they’re not treated any differently. Q: Why can’t I use Apple Pay with the “Buy Now” button for variable products? A: Apple Pay requests have to be generated when the page is loaded. As such, we can’t later “pull in” the variations that have been selected to ensure the order is accurate. Since we can’t get this data into the Apple Pay form in any way, Apple Pay “Buy Now” buttons cannot be enabled for variable products. If you have other data on the product page that needs to be collected, such as measurements or add-ons, then you should not enable “Buy Now” buttons either. Q: Can I allow Apple Pay for Subscriptions or Pre-Orders? A: At present, the 3rd party payment gateways that support Apple Pay do not support tokenizing or saving payment profiles to your merchant account from converting Apple Pay tokens. As a result, there’s no way to securely save the customer payment details to your account for use in future transactions. Since payment data cannot be saved with Apple Pay, the Apple Pay button will only be available for one-time purchases, it cannot be used for recurring payments or a payment that’s saved and billed later. If a cart contains Subscriptions or Pre-Orders, Apple Pay is disabled. To use Apple Pay with WooCommerce Subscriptions and Pre-Orders, you can use Apple Pay with WooCommerce Payments instead if available to you. This can have several causes — here are the most common troubleshooting steps when Apple Pay buttons are never loaded:
- Ensure you’re using an eligible device with the Safari browser. Please note that you cannot use Apple Pay in Google Chrome, Firefox, or with a non-Apple device — the button is automatically hidden.
- Ensure Apple Pay is enabled under the settings, and that you’ve saved settings.
- Ensure your PEM file is in a readable location. Check your settings screen for notices to ensure the plugin can read this file.
- Ensure your entire site is served over HTTPS.
- Run back through the verification and certification steps to ensure you’ve completed each properly, as your certificate may not be properly generated or converted to a PEM file.
- Please ensure your entire site is served over HTTPS; buttons will not appear at a location if that location is not served over HTTPS.
- If you’re looking for “Buy Now” buttons, note that these only show up for simple products (not simple subscriptions or any other product type).
- Please enable logging under your payment gateway’s credit card settings.
- Attempt an Apple Pay transaction and review the logs.
- If you see certification errors, please work with your host to upgrade your server so it meets the Apple Pay requirements (ie upgrade cURL and ensure TLS 1.2 compatibility).
- If you see other errors or only generic payment errors, please get in touch with support and provide logs for review.
- If you need assistance getting Apple Pay set up for your site and payment processing account, we recommend filling out the development request form to hire a developer to assist you with this process.
- If you have Apple Pay set up already and experience other issues, please submit a help request with your logs and we’d be happy to troubleshoot further.
Setting up Apple Pay for merchants is not covered by our support policy, so the server certification process must be completed by the merchant independently (or the merchant’s developer) before Apple Pay can be enabled within a plugin.We’ve partnered with Codeable to ensure Codeable professionals are knowledgeable in this process and able to assist merchants in completing site verification and certification for Apple Pay. If you’d like assistance in getting your site verified and certified to accept Apple Pay, please complete this form to get in touch with the developers at Codeable for a quote on assisting you in setting up Apple Pay. After accepting a bid from a developer, they’ll need access to your Apple Developer account ($99 per year), so you could also sign up for an account prior to accepting a bid, as your Apple account set up may take a few days. Here’s some sample text if you’d like to use it: Project name:
Set up Apple Pay for my WooCommerce storeProject details
I would like a developer to assist me in verifying my domain with Apple, generating a processing certificate, and placing this certificate on the appropriate location on my server so that I can process payments with Apple Pay via my WooCommerce payment gateway.