Apple Pay Onboarding
Pre-requisites:
You require an Apple developer account to start taking payments via Apple Pay. Sign up on Apple Developer Program to create an Apple Pay Account. You can skip this step if you already have an account.
Step 1: Apple Pay Account Creation
Sign In to your Apple Developer Account. Navigate to Register Identifier Screen.
Select Merchant Ids Checkbox. Click on Continue. We recommend separate merchant Id for your test environment and live/production environment.
In Register a Merchant Id section, there are 2 input boxes for Description and Identifier
Description: You can specify the purpose of the keys in descriprion. For example: Merchant Ids created for Juspay Sandbox/ Prod
Identifier: Apple recommend using a reverse-domain name style string (i.e., com.domainname.appname). We also recommend adding juspay mid and environment in the identifier. For example: if merchant id is testmid, identifier will be com.testmid.juspay.sandbox
Please find a reference video for the above flow here
Step 2: Validate Merchant Domain
Pre-requisites:
You must have a valid SSL certificate (beginning with https) for your domain.
Log in to your Apple Developer account. Navigate to the Identifiers List
and select Merchant IDs in the top right dropdown. Select the merchant Id created in the previous Step
Scroll down to Merchant Domains Section and click on Add Domain button
Enter <merchant_domain> as domain and click on Save button
Click Download button and a .txt file will be downloaded in your system
Share this file with internal tech team and get the file hosted on <domain_name>/.well-known/apple-developer-merchantid-domain-association.txt
Once the .txt file is hosted on the mentioned path, click on Verify button
Make sure that the status is Verified.
Step 3: Getting Apple Merchant Id Certificate and Private Key :
Open terminal and create a .csr and .key file using the following command:
openssl req -out uploadMe.csr -new -newkey rsa:2048 -nodes -keyout certificate_sandbox.key
Enter required details in the prompt. When asked to enter a challenge password, kindly leave it blank and click Enter. A .csr and .key file will be stored in the current directory.
Navigate to Identifiers List
and select Merchant IDs in the top right dropdown. Select the merchant Id created in the Step 1
Scroll down to the Apple Pay Merchant Identity Certificate section, click on Create Certificate button
Upload the .csr file you just created from your terminal. If same command is used to generate the file, it will be saved as uploadMe.csr. Click on Continue button
Click on Download button to download .cer file. It will be saved as merchant_id.cer
We need to convert this .cer file to a .pem file. Kindly use the following command in your terminal:
openssl x509 -inform der -in merchant_id.cer -out certificate_sandbox.pem
Please find a reference video for the above flow here
Step 4: Get Apple Payment Processing Certificate:
Navigate to Identifiers List
and select Merchant IDs in the top right dropdown. Select the merchant Id created in the Step 1
Scroll down to the Apple Pay Payment processing Certificate section, click on Create Certificate button
Upload the .csr file received from the PG through which apple pay transactions are to be processed
Ensure that the question "Will payments associated with this Merchant ID be processed exclusively in China?" is ticked with the default option (No). Click on Continue Button
Download .cer file. Share this .cer file with the gateway via email or via uploading on dashboard
All the required files to be entered on Juspay Portal are now generated:
Applepay Merchant Identifier/ Id : Step 1.5
Applepay Certificate: certificate_sandbox.pem - Step 3.7. Kindly follow dashboard instruction if this needs to be base 64 encoded or to be uploaded directly as this will differ from gateway to gateway.
Apple Pay Private Key: certificate_sandbox.key - Step 3.1. Kindly follow dashboard instruction if this needs to be base 64 encoded or to be uploaded directly as this will differ from gateway to gateway.
Apple Pay Display Name: A string of 64 or fewer UTF-8 characters containing the canonical name for your store, suitable for display. This needs to remain a consistent value for the store and shouldn’t contain dynamic values such as incrementing order numbers.
Apple Pay Initiative: A predefined value that identifies the e-commerce application making the request. In our case, this value will always be web

