apple-payApple Pay

Guide to using Apple Pay payment method on Hyperswitch

Apple Pay allows customers to securely pay from their saved cards in their Apple Pay account in macOS (Safari) or iOS using Touch ID and Face ID and thereby eliminating the need for them to manually type in their card and shipping details. Apple Pay is currently supported by participating banks and card issuers in 75+ countriesarrow-up-right.

Follow the below guide for setting up Apple Pay on Hyperswitch based on your use-case:

Web Domain

Steps to configure :

  • Download the domain verification file using the button available

  • Host this file on your server at merchant_domain/.well-known/apple-developer-merchantid-domain-association

  • Enter the domain name where you have hosted the domain verification file

  • Click on verify and enable to complete your setup

circle-exclamation
chevron-rightYou can use the following text in the emailhashtag
  • Attach our PCI DSS AoC certificate and copy our Support team ([email protected]).

  • Stripe Account id: <Enter your account id: you can find it herearrow-up-right>

  • A detailed business description: <One sentence about your business>. The business operates across xx countries and has customers across the world.

  • Feature Request: We are using Hyperswitch, a Level 1 PCI DSS 3.2.1 compliant Payments Orchestrator, to manage payments on our website. In addition to Stripe, since we are using other processors as well to process payments across multiple geographies, we wanted to use Hyperswitch’s Payment Processing certificate to decrypt Apple pay tokens and send the decrypted Apple pay tokens to Stripe. So, please enable processing decrypted Apple pay token feature on our Stripe account. We’ve attached Hyperswitch’s PCI DSS AoC for reference.

Prerequisites

Before beginning to integrate Apple Pay with Hyperswitch, below prerequisites need to be fulfilled. Please feel free to reach out to Hyperswitch support if you are stuck at any stage when integrating and testing Apple Pay.

  1. Apple Pay requires an Apple Developer Account. You can Sign Uparrow-up-right for one here.

  2. You must have a valid SSL certificate on your domain (meaning it begins with https)

Apple Pay requires additional steps, and requires macOS 10.12.1+ or iOS 10.1+. Follow the steps given below to setting up Apple Pay -

Creating an Apple MerchantID

You can create an Apple MerchantID referencing the video or following the steps mentioned below

Validating Merchant Domain

You can validate the merchant domain by following the steps mentioned below -

  • Log in to your Apple Developer accountarrow-up-right, go to Identifiers and select the Merchant ID you created previously

  • Under the Merchant Domains section, click on Add Domain

  • Enter your merchant_domain as domain and click on Save

  • Click on Download and a .txt file will be downloaded

  • Host this file on merchant_domain/.well-known/apple-developer-merchantid-domain-association.txt

  • Once you host the .txt file in the path mentioned above, click on Verify

  • Make sure the status is verified as shown in the following image

Creating Apple MerchantID Certificate and Private Key

You can create an Apple MerchantID certificate and private key by following the steps mentioned below -

Note: It is recommended that you keep all the generated files in the same workspace for the sake of simplicity

  • Open a terminal and create .csr and .key file using the following command -

  • Enter your details asked in the prompt. You will get a .csr and .key file

  • Log in to your Apple Developer accountarrow-up-right, go to Identifiers and select the Merchant ID you created previously

  • Under the Apple Pay Merchant Identity Certificate section (make sure you are not in the Apple Pay Payment Processing Certificate section), click on Create Certificate

  • Upload the .csr file you just created by running the command (it would be called uploadMe.csr if you copy-pasted the command) and click on Continue

  • You will get a .cer file on clicking on Download (it will probably be named merchant_id.cer)

  • You will need to convert this .cer file into a .pem file using the following command -

iOS Application

Steps To Configure :

You can configure Apple Pay on Hyperswitch by following the steps mentioned below -

  • In the Connectors tab, select your processor

  • While selecting Payment Methods, click on Apple Pay in the Wallet section

  • Select the iOS Certificate option

  • In Apple Merchant Identifier, add your identifier which you added while creating Apple MerchantID

  • In Merchant Certificate, base64 encode the entire content of your .pem file (it will be certificate_sandbox.pem, if you used the exact command mentioned above), and enter the encoded data in the form field. Use the below command to base64 encode it.

  • In Merchant Private Key, base64 encode the entire content of your .key file (it will be certificate_sandbox.key, if you used the exact command mentioned above), and enter the encoded data in the Merchant PrivateKey form field. Use the below command to base64 encode it.

  • Display Name should be your merchant name that you want to present to the customers when the make ApplePay payment on your platform.

  • In Domain, enter web in the form field.

  • In Domain Name, add the verified domain name you configured in Merchant Domains in Apple Developer Account.

Creating Apple Pay Payment Processing Certificate

  • You will need to get a .csr file from your processor's dashboard, (like Adyen, Cybersource)

  • Log in to your Apple Developer accountarrow-up-right, go to Identifiers and select the Merchant ID you created previously

  • Under the Apple Pay Payment Processing Certificate section, click on Create Certificate

  • After answering whether the Merchant ID will be processed exclusively in China mainland, click on Continue

  • Upload the .csr you received from your processor and click Continue

  • Click on the prompted Download button and you will get a .cer file, Upload this .cer file you received while creating Apple MerchantID Certificate on the processor's dashboard.

circle-exclamation

Integrate with Xcode

Add the Apple Pay capability to your app. In Xcode, open your project settings, click the Signing & Capabilities tab, and add the Apple Pay capability. You might be prompted to log in to your developer account at this point. Select the merchant ID you created earlier, and your app is ready to accept Apple Pay.

Enable the Apple Pay capability in Xcode

Last updated

Was this helpful?