Integrating Apple Pay JS API
Please Note: As an ISV / Paysafe Partner, you will need to complete all of the below "merchant" steps on behalf of the Parent Merchant Legal Entity (PMLE) that your merchants will be operating under.
Create a Merchant Identity Certificate
A Merchant Identity Certificate is associated with your Apple Pay Merchant ID and is used to authenticate your sessions with the Apple Pay servers.
To obtain the Merchant Identity Certificate, follow the below steps:
Navigate to the directory where all the previous certificates are stored.
Open Git Bash or any other common-line environment which supports OpenSSL from the above directory.
Execute the following OpenSSL command to create a private key:
openssl genrsa -out private-key.key 2048
Execute the following command to generate a certificate signing request from the private key.
openssl req -new -key private-key.key -out csr.txt
Log in to Apple Developer Portal and Create a Merchant Identity Certificate. Refer to Create a merchant identity certificate for the setup steps.
Note: When prompted, the merchant should upload the certificate signing request file (csr.txt) created using the private key. This CSR file is different from the one generated from the Merchant Backoffice portal for creating the Payment Processing Certificate.
When prompted, download the Apple Pay Merchant Identity Certificate (merchant_id.cer).
Save the merchant_id.cer in the same directory where the private key and the certificate signing request file (csr.txt) is saved.
Convert the Merchant Identity Certificate (merchant_id.cer) downloaded from Apple Developer Portal to a text certificate (merchant_id.pem) using the following command:
openssl x509 -inform der -in merchant_id.cer -out merchant_id.pem
Completing the above setup enables you to use Apple Pay JS API and create an Apple Pay session with the Merchant Identity Certificate.
While your Apple Pay Merchant ID never expires, the Payment Processing Certificate, Merchant Identity Certificate, and domain verification do expire. See Maintaining Your Environment for more information.
Get Your Paysafe API Keys
Once you register for a Test merchant account on the Paysafe Developer Center, you will have access to the following API keys:
- API key for Card and Customer Vault API
- API key for Single-Use Token
You can get both of these API keys in our Merchant Back Office, under Settings > API Key.