Apple Pay Setup

🚧

Attention: Circle is no longer supporting new customers for Apple Pay payments via our Payments API. For any questions, please reach out to [email protected].

To acquire an Apple payment token from Apple you will need to create an Apple Developer Account, register as a merchant, and acquire access credentials. Please work with an assigned Circle representative to work through this process.

Before you start

Before you get started with Apple Pay, you need the following:

  • An Apple Developer account. Sign up for one here.
  • A domain with a valid SSL certificate (meaning your domain should start with https).
  • Access to a Secure Shell (SSH) terminal.
  • Access to your server's files, so you can upload files to your server.

1. Create Apple Pay Merchant ID

  1. In your Apple Developer account, go to the Add Merchant IDs section, select Merchant IDs and select Continue.
  2. Add a useful description, like merchant id for test environment.
  3. Type your desired merchant ID name in the identifier section. We recommend that you use a descriptive name to indicate both the domain and the environment you will use it in, like merchant.com.mywebsite.sandbox.

📘

Checkout widget

For Checkout Widget send the merchant_id.txt which contains your Apple Pay merchant id to Circle securely.

2. Acquire processing certificate

Once a Merchant ID is created, inform Circle and we will share a certificate signing request .csr file that you will upload to your Apple Developer account, acquire a processing certificate .cer decryption key, and share with Circle securely.

  1. Log in to your Apple Developer account, go to the Merchant IDs list section, and select the merchant ID you created in step 1.
  2. In the Apple Pay Payment Processing Certificate section (make sure you're not in the Apple Pay Merchant Identity Certificate section), select Create Certificate.
  3. Respond No to the question about processing in China and select Continue.
  4. Upload the .csr file and select Continue.
  5. Select Download to get your .cer file.
  6. Send the .cer file to Circle securely.

3. Validate your domain

  1. Log in to your Apple Developer account, go to the Merchant IDs list section and select the merchant ID you created in step 1.
  2. Under the Merchant Domains section, select Add Domain.
  3. Enter your domain and select Save.
  4. Select Download and you'll get a .txt file.
  5. Upload this file to your server so it's accessible at the following location (replacing yourdomain.com with the URL of your domain): . To do this, create a folder called .well-known in the root directory of your website and put the .txt file in that folder.
    https://yourdomain.com/.well-known/apple-developer-merchantid-domain-association.txt
    
  6. Once you've uploaded the file, select Verify.

4. Create Apple Pay merchant identity certificates

  1. Open a terminal and create a .csr and .key file using this command:
    openssl req -out uploadMe.csr -new -newkey rsa:2048 -nodes -keyout certificate_sandbox.key
  2. In the prompt, enter your details, and when asked for a password, leave it blank and select Enter. You will get a .csr and .key file. Keep the .key file at hand.
  3. Sign in to your Apple Developer account, go to the Merchant IDs list section and select the merchant ID you created in step 1.
  4. Under the Apple Pay Merchant Identity Certificate section (make sure you're not in the Apple Pay Payment Processing Certificate section), select Create Certificate.
  5. Upload the .csr file you just created from your terminal. It should be called uploadMe.csr if you copy-pasted the command.
  6. Select Continue and then Download to get your .cer file. It will probably be named merchant_id.cer.
  7. Convert this .cer file into a .pem file so you can use it in your code. Enter the following command in your terminal:
    openssl x509 -inform der -in merchant_id.cer -out certificate_sandbox.pem

📘

Checkout Widget

For Checkout widget send the .key file and .pem file to Circle securely instead of keeping it yourself.

5. Integrate with Apple Pay

Now that you have acquired Apple Pay Merchant Identity key .key and certificate .pem you can move on to using Apple’s SDKs, please see Apple Pay web and Apple Pay mobile documentation. Once you've completed these integration steps, you will be able to display the Apple Pay button and validate an Apple Pay Session (required for the web version).