Follow the steps on this page to set up and configure Apple Pay.
We recommend that you create separate merchant IDs for your test environment and for your live/production environment.
You must have a valid SSL certificate on your domain (meaning it begins with
Open a terminal and create a
.key file using this command:
1openssl req -out uploadMe.csr -new -newkey rsa:2048 -nodes -keyout certificate_sandbox.key
In the prompt, enter your details, and when asked for a password, leave it blank and select Enter. You will get a
.key file. Keep the
.key file at hand.
Sign in to your Apple Developer account, go to the Merchant IDs list section and select the merchant ID you created in step 1.
Under the Apple Pay Merchant Identity Certificate section (make sure you're not in the Apple Pay Payment Processing Certificate section), select Create Certificate.
.csr file you just created from your terminal. It should be called
uploadMe.csr if you copy-pasted the command.
Select Continue and then Download to get your
.cer file. It will probably be named
.cer file into a
.pem file so you can use it in your code. Enter the following command in your terminal:
1openssl x509 -inform der -in merchant_id.cer -out certificate_sandbox.pem
We recommend that you repeat the above steps so you have a merchant ID, domain (it can be the same domain) and certificates for your test environment and your production environment. You should use descriptive names for each environment to avoid mismatches.
If you use an ecommerce platform where we support Apple Pay, like Magento or WooCommerce, the files and certificates you got in the configuration process above are enough to complete your integration. Just follow the instructions provided by your particular platform.
Once you've completed the integration steps, you will be able to display the Apple Pay button and validate an Apple Pay Session (required for the web version).