Apple Pay

Introduction

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 label", with no indication to your customers that Paysafe is handling the payment.
  • No redirection from the merchant web site required.

Device Compatibility

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.

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

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. .
  3. For Public Key, click the Copy icon to copy the API key.
    • Your API key will have the following format:
      • Key Username – MerchantXYZ
      • Key Password – B-tst1-0-51ed39e4-312d02345d3f123120881dff9bb4020a89e8ac44cdfdcecd702151182fdc952272661d290ab2e5849e31bb03deede7e
  4. For Private key, click Authentic Now and enter your Business portal password to view the private apikey.
    • Your API key will have the following format:
      • Key Username – MerchantXYZ
      • Key Password – B-tst1-0-51ed39e4-312d02345d3f123120881dff9bb4020a89e8ac44cdfdcecd702151182fdc952272661d290ab2e5849e31bb03deede7e

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:

  • Combine the Key Username and Key Password into a string separated by a colon, e.g., “Key Username:Key Password”.
  • The resulting string literal is then encoded using Base64.
  • 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 TWVyY2hhbnRYWVo6Qi10c3QxLTAtNTFlZDM5ZTQtMzEyZDAyMzQ1ZDNmMTIzMTIwODgxZGZmOWJiNDAyMGE4OWU4YWM0NGNkZmRjZWNkNzAyMTUxMTgyZmRjOTU yMjcyNjYxZDI5MGFiMmU1ODQ5ZTMxYmIwM2RlZWRlN2U=

For additional details, please refer here.

Changelog

Version Description
1.0.0 Paysafe.js for Apple pay is launched.
Did you find this page useful?