Search Overlay

About Apple Pay

Paysafe.js v2 allows merchants to take payments from their websites using mobile-based payment methods, such as Apple Pay that rely on card payments made through the Paysafe Payments API. It is a JavaScript SDK which is based on the Payment Request API standard design. You can use this Javascript SDK to offer Apple pay in your merchant website.

Advantages

  • Complies with PCI SAQ-A.
  • Simple integration.
  • Fully white labelled, with no indication to your customers that Paysafe is handling the payment. 
  • No redirection from the merchant website is required.

Device Compatibility

Prerequisites

Before you begin

Before you begin, you need to obtain your standard server-to-server API key (private key) and a payment-handle generating API key (public key) from the Business portal.

  1. Contact your business relationship manager or reach out to integrations@paysafe.com for your credentials to the Business Portal.

  2. The payment-handle generating API key is used in your JavaScript code on the client to generate payment-handles from customer credit cards and bank accounts. Unlike the server-to-server API key, this key has no ability to take payment or carry out any other operation, and can therefore be safely exposed in your client side code.

To obtain the Public API key from the Business Portal:

  1. Go to Integrate>API Keys.
  2. For Public Key, click the Copy icon to copy the API key. 
    1. Your API key will have the following format:
      • Key Username – MerchantXYZ
      • Key Password – B-tst1-0-51ed39e4-312d02345d3f123120881dff9bb4020a89e8ac44cdfdcecd702151182fdc952272661d290ab2e5849e31
  3. For Private key, click Authentic Now and enter your Business portal password to view the private apikey.
    1. Your API key will have the following format:
      • Key Username – MerchantXYZ
      • Key Password – B-tst1-0-51ed39e4-312d02345d3f123120881dff9bb4020a89e8ac44cdfdce
    2. The API key is case-sensitive. For server-to-server calls, apikey is sent using HTTP Basic Authentication. To use HTTP Basic Authentication, you must send the API key credentials using the Authorization header with every request. You must construct the Authorization header as follows: 

    3. Combine the Key Username and Key Password into a string separated by a colon, e.g., “Key Username:Key Password”. 

    4. The resulting string literal is then encoded using Base64.

    5. The authorization method and space (i.e., “Basic”) are then put before the encoded string. For example, using the Key Username and Password examples above, the header is formed as follows:
      • Authorization: Basic TWVyY2hhbnRYWVo6Qi10c3QxLTAtNTFlZDM5ZTQtMz

        For additional details, see authentication.

ApplePay Certificate Setup

As a merchant, to accept payments from Apple Pay, you need to add two certificates called the processing certificate and identity certificate in the Business Portal. If the certificates are not added, you won’t be able to accept payments from customer’s Apple Pay accounts.In the Business Portal, at Integrate > Apple Pay Certificates, you can add and manage your Apple Pay certificates. After you navigate to the Apple Pay Certificates page, you can see two sections:

The first step in the configuration is to add a Payment Processing Certificate from Apple’s website. If you are a merchant who accepts payments from web applications, you need to add the Apple Pay Merchant Identity Certificate.To accept Apple Pay payments from both web and iOS, you need to configure the Merchant Payment Processing Certificate. This certificate is required to decrypt the token that is passed in Apple Pay transactions. Only when the token is decrypted the payment becomes successful.

Add a Merchant Identity Certificate

  1. Click Add a Certificate. The Add New Certificate screen appears.
  2. Click Generate CSR. A CSR file downloads to your local machine.
  3. Click Visit Apple Developer Portal. The Apple Developer portal opens in a new tab.
  4. Login to the Apple Developer portal. After you login, the Certificates, Identifiers, & Profiles page appears. As a merchant, you need to create a login in the developer portal and associate merchant ID’s associated under your profile to process Apple Pay payments.

  5. Click + (plus icon) to create a new certificate.
  6. Select Apple Pay Merchant Identity Certificate option and click Continue. The Select a Merchant ID step appears.
  7. Select a merchant ID that you’ve created in the Apple’s Developer portal and click Continue. The Upload a Certificate Signing Request step appears.
  8. Click Choose File, select the CSR file you downloaded in Step 2 and click Continue. The Download your Certificate step appears.
  9. Click Download to download the certificate.
  10. Navigate back to the Business Portal > Add New Certificate screen.
  11. Click Upload at the 3rd step. The Authenticate dialog appears.
  12. Enter your portal password in the dialog box and click Authenticate. The Select dialog appears.
  13. Select the certificate downloaded from the Apple Developer Portal. After you select a certificate, the portal shows if the upload was successful and shows the expiry date of the certificate. Also, you can see the certificates in the Integrate > Apple Pay Certificates page.

Add a Merchant Payment Processing Certificate

  1. Click Add a Certificate. The Add New Certificate screen appears.
  2. Click Generate CSR. A CSRSelect Apple Pay Payment Processing Certificate option and click Continue. The Select a Merchant ID step appears. file downloads to your local machine.
  3. Click Visit Apple Developer Portal. The Apple Developer portal opens in a new tab.
  4. Login to the Apple Developer portal. After you login, the Certificates, Identifiers, & Profiles page appears. As a merchant, you need to create a login in the developer portal and associate merchant ID’s associated under your profile to process Apple Pay payments.
  5. Click + (plus icon) to create a new certificate.
  6. Select Apple Pay Payment Processing Certificate option and click Continue. The Select a Merchant ID step appears.
  7. Select a merchant ID that you’ve created in the Apple’s Developer portal and click Continue. The Upload a Certificate Signing Request step appears.
  8. Click Choose File, select the CSR file you downloaded in Step 2 and click Continue. The Download your Certificate step appears.
  9. Click Download to download the certificate.
  10. Navigate back to the Business Portal > Add New Certificate screen.
  11. Click Upload at the 3rd step. The Authenticate dialog appears.
  12. Enter your portal password in the dialog box and click Authenticate. The Select dialog appears.
  13. Select the certificate downloaded from the Apple Developer Portal. After you select a certificate, the portal shows if the upload was successful and shows the certificate's expiry date. Also, you can see the certificates on the Integrate > Apple Pay Certificates page.
  1. If the certificate expires, it is impossible to accept Apple Pay payments. You can view the certificate expiry at Integrate > Apple Pay Certificate page.
  2. Merchants using the old setup of paysafe JS can refer to the old Netbanx Portal Guide to get the Apple Pay Certificates.

Apple Pay Domain Validation

To process payments through Apple Pay, you need to verify your domain/subdomain in the Apple developer portal

To learn about the validation process, see Domain Validation

Domain verification is only required for production instances.