Skip to main content

Apple Pay

General information

Apple Pay is a digital wallet provided by Apple that enables customers to make payments on websites and through iOS mobile applications without the need to enter full payment data each time.

There are two ways to integrate Apple Pay:

  • Financial Line hosted integration (the Apple Pay payment button is located on our payment page).
  • Integration with the Apple Pay API (placing an Apple Pay payment button on your site).

Before starting the integration process, you should:

  1. Register in the merchant portal.
  2. Read the list of acceptable products.
  3. Ensure that your website uses HTTPS and supports TLS.

Financial Line hosted integration

You can easily add Apple Pay as a payment method to your website or mobile application with Financial Line's hosted integration. You don't need to make any additional settings as the Apple Pay payment button will be displayed on our payment page. Contact Financial Line to add this payment method.

Integration with Apple Pay API

To add Apple Pay as a payment method to your website or mobile app through Apple Pay API, you need to follow these steps:

  1. Create an Apple developer account associated with the Apple Developer Program or Apple Developer Enterprise Program.
  2. Obtain a personal merchant ID from Apple.
  3. Read and comply with Apple's Branding Guidelines for setup.

To complete the integration, follow these steps:

Step 1: Creating a Merchant ID

  1. Sign in to your Apple developer account.
  2. Proceed to the “Certificates, Identifiers & Profiles” tab.
  3. In the "Identifiers" section, select "Merchant ID".
  4. Click the "+" button in the top right corner to add a new merchant ID.
  5. Fill in the required fields and click "Continue".
  6. Click "Register" to confirm your details.

Step 2. Creating a merchant certificate:

  1. From the “Certificates, Identifiers & Profiles” tab, select an identifier in the sidebar, then choose a merchant identifier from the pop-up menu at the top right.
  2. Select your merchant ID.
  3. In the "Merchant Identity Certificate" section for Apple Pay, click "Create Certificate".
  4. Create a certificate signing request on your device, and then click "Continue".
  5. Click "Choose file".
  6. Select the certificate file with the .certSigningRequest extension in the dialog box that appears.
  7. Click "Continue".
  8. Click "Download".
  9. The certificate file with the ".cer" extension will be saved in the "Downloads" folder.

Step 3. Creating a merchant domain (optional):

This step is only necessary if you want to use Apple Pay on your website.

  1. Sign in to your Apple developer account.
  2. Go to the “Certificates, Identifiers & Profiles” tab and select an identifier in the sidebar, then select a merchant identifier from the pop-up menu at the top right.
  3. Choose your merchant ID.
  4. In the “Merchant Domains” section, click “Add Domain”.
  5. Enter the full domain name and click “Save”.
  6. Click “Download” to get the domain verification file and place it in the specified location and click “Verify” to confirm the domain ownership.
  7. Click “Done” to complete the process.

Step 4. Verifying the merchant domain

  1. Sign in to your Apple developer account.
  2. Under the “Certificates, Identifiers & Profiles” section select an identifier in the sidebar, then select a merchant identifier from the pop-up menu at the top right.
  3. Choose your merchant ID.
  4. In the "Merchant Domains" section, click "Verify" next to the domain you added in Step 3 and follow the further instructions to complete the verification process.
tip

To use Apple Pay on your website, make sure your server meets the requirements specified in the Apple Developer Portal.

Integration of Apple Pay on a website

  1. Familiarize yourself with the instructions and features of the Apple Pay payment method.
  2. Ensure that your device or browser is compatible with Apple Pay.
  3. Configure the payment request structure.
  4. Complete merchant validation.
  5. Initiate a payment session and process the payment.
  6. Send the payment data to the Financial Line API (refer to the next section "Charging").

Charging:

To charge a payment card stored in Apple Pay, include the following values in the direct method request for the payway and cc_token parameters:

  • payway: applepay
  • mode: direct
  • cc_token: applepay:${base64_applepay_encrypted_token}

Request example:

curl -X POST \
https://api.finline.io/api/v1/payment \
-H 'Content-Type: application/json' \
-H 'X-API-Auth: CPAY <API_KEY>:<API_SECRET>' \
-H 'X-API-Key: <ENDPOINTS_KEY>' \
-d '{
"pos_id": "<POS_ID>",
"mode": "direct",
"method": "purchase",
"amount": 1,
"currency": "UAH",
"order_3ds_bypass": "supported",
"cc_token": "applepay:123",
"products":[],
"customer_email": "test@gmail.com",
"description": "Pay with Apple Pay Token",
"order_id": "1234567890",
"server_url": "https://callback.blackhole.com/callback",
"result_url": "https://example.com/result"
}'

After the initial request is made, the payment processing follows the standard procedures that are inherent in direct-integration.