User Guide for Apple Pay

PDF Version:

Apple Pay with Hosted Payments

To use Apple Pay with the Hosted Payments Page, you will just need to enable the Apple Pay option in the Settings & Configuration page of the Admin Dashboard. MerchantE will handle all registrations and certificate maintenance.

Apple Pay with the Payment Gateway

Apple Pay Configuration

To use Apple Pay as a payment option on your site, you must: 

  1. Configure your server according to Apple Pay specifications.

  2. Register with Apple Pay to obtain a Merchant Identification (MID).

  3. Use the MID to obtain a Payment Processing Certificate (PPC) to use on their site.

  4. Use the MID to obtain a Merchant Identity Certificate (MIC) to use on their site.

  5. Validate every domain where Apple Pay is to be implemented.

Configuring Your Server

For full information on setting up your server for Apple Pay, see Setting Up Your Server.

  1. Serve all pages over HTTPS.

  2. Have a valid domain SSL certificate.

  3. Support Transport Layer Security (TLS) protocol version 1.2 or later.

  4. Allow Apple IP addresses for merchant validation over HTTPS (TCP over port 443). You can find a full list of IP addresses here.

  5. Allow Apple IP addresses for domain verification. You can find a full list of IP addresses here.

Registering with Apple Pay

Creating a Merchant Identifier

The Merchant Identifier (Merchant ID) is an identifier you register with Apple to identify business as a merchant allowed to accept payments. This ID never expires and can be used on multiple websites.

Navigate: Developer Account → Certificates, Identifiers, & Profiles → Identifiers → Merchant ID

  1. Login to your developer account and navigate to Certificates, Identifiers, & Profiles.

  2. Select Identifiers from sidebar and click the + button.

  3. Select Merchant ID. Enter the merchant description and identifier name and click Continue.

  4. Review the information and click Register.

For more information, see Create a Merchant Identifier.

Enabling Apple Pay Capability in Xcode

You can enable Apple Pay in your Xcode project using your Merchant ID.

  1. Open your project in Xcode.

  2. Choose the app from the Target section in the outline view.

  3. Open the Signing & Capability tab.

  4. Click the + button and select Apple Pay capability from the Capabilities library.

  5. Click the refresh button to sync with your Merchant IDs from the Apple Developer site.

  6. Select the Merchant ID to use with the app in Xcode.

Creating a Payment Processing Certificate

The Payment Processing Certificate (PPC) is associated with your Merchant ID and is used to encrypt payment information. The PPC expires every 25 months and must be recreated if revoked.

Navigate: Developer Account → Certificates, Identifiers, & Profiles → Identifiers → Merchant IDs → Apple Pay Payment Processing Certificate 

  1. Login to your developer account and navigate to Certificates, Identifiers, & Profiles.

  2. Select Identifiers from sidebar and filter by Merchant IDs.

  3. Select your Merchant ID.

  4. Click Create Certificate under Apple Pay Payment Processing Certificate.

  5. Create a certificate signing request and. Use your email address and enter a common name. Select the Saved to disk checkbox and click Continue.

  6. Click Choose File.

  7. Select the certificate request file (a file with a .certSigningRequest extension) and click Choose.

  8. Click Continue.

  9. Click Download. The file will have a .cer extension. For information on how to use the .cer file, see Preparing Merchant Domains for Verification

For more information on Payment Processing Certificates, see Create a Payment Processing Certificate.

Creating a Merchant Identity Certificate

The Merchant Identity Certificate (MIC) is used to authenticate communication with Apple Pay servers. You will need your Merchant ID to create your MIC. You are required to register every domain that will communicate with Apple Pay.

Navigate: Developer Account → Certificates, Identifiers, & Profiles → Identifiers → Merchant ID

  1. Login to your developer account and navigate to Certificates, Identifiers, & Profiles.

  2. Select Identifiers from sidebar and open Merchant IDs.

  3. Select your Merchant ID.

  4. Click Create Certificate under Apple Pay Merchant Identity Certificate

  5. Select the certificate request file (a file with a .certSigningRequest extension) and click Choose.

  6. Click Continue.

  7. Click Download. The file will have a .cer extension. For information on how to use the .cer file, see Preparing Merchant Domains for Verification.

For more information on Merchant Identity Certificates, see Create a Merchant Identity Certificate.

Registering Your Domain

Navigate: Developer Account → Certificates, Identifiers, & Profiles → Merchant ID

You will need to register the domain(s) in your organization that will process the Apple Pay transactions.

  1. Login to your developer account and navigate to Certificates, Identifiers, & Profiles.

  2. Select Identifiers from sidebar and open Merchant IDs.

  3. Click Add Domain under Merchant Domains.

  4. Enter the full domain name and click Save.

  5. Click Download. Place the file in the designated location.

  6. Click Verify to confirm the domain is registered.

  7. Click Done.

For more information on registering a domain, see Register a Merchant Domain.

Enabling the Apple Pay Option

Adding the Apple Pay JavaScript Code

The following code snippet will load the Apple Pay Java Script API. For more information, see Apple Pay JS API.

Adding the Apple Pay Button to Your Payment Page

The following HTML code can be used to set the button style according to preconfigured styles provided by Apple. For more information on button styles, see Apple Button Style. You can also set the button locale according to the Apple Pay Button Local. Ensure button compatibility using Cross Browser Compatibility.

Maintaining Your Apple Pay Environment

While your MID does not expire, you will need to maintain your certificates and domain verification.

  • PPC expires ever 25 month.

  • MIC expires every 25 months.

  • Domain verification expires when the SSL certificate expires.

Viewing and Updating Certificates

Navigate: Developer Account → Certificates, Identifiers, & Profiles → Merchant ID

  1. Login to your developer account and navigate to Certificates, Identifiers, & Profiles.

  2. Select Identifiers from sidebar and open Merchant IDs.

  3. Select the domain ID and click Edit.

Using the Payment Gateway with Apple Pay

Apple Pay to Payment Gateway Mapping

Decrypted data should be mapped to the appropriate fields. AMEX fields are mapped slightly different from other card brands.

Apple Pay Field

Representative Acquirer Field

Payment Gateway API Field

data.applicationPrimaryAccountNumber

DPAN

card_number

data.applicationExpirationDate (YYMMDD)

Expiration Date

card_exp_date

data.paymentData.onlinePaymentCryptogram

TAVV/CAVV /UCAF

cavv

ucaf_auth_data

data.paymentData.eciIndicator

ECI

moto_ecommerce_ind

Apple Pay Field

AMEX Card Field

Payment Gateway API Field

data.deviceManufacturerIdentifier

Token Requester ID

token_requestor_id

data.paymentData.onlinePaymentCryptogram

Token Block A

tac

Payment Gateway API Field Reference

The following fields are used to send payment data directly to the payment gateway for processing.

Request

Field

Description

Example

Required?

Length

Format

profile_id

ID issued by MerchantE

94100008819100000003

Required

20

N

profile_key

EAPI password assigned by MerchantE

oyFnzBewkLQEkGispfAoIjNoTuTwtcbv

Required

32

AN

transaction_type

D, where D denotes a sale.

D

Optional

1

AN

card_number

Payment card number

4012301230158

Conditional

5 – 22

N

moto_ecommerce_ind

Acceptable values are 5, 6, 7, and A.

Recurring transactions will require 2.

5

Required

1

AN

cavv

This contains a data value generated by the issuer to enable cardholder validation for 3D Secure transactions.

BwABBJaSmIZUMzSVMpKYAAAAAAA%3D

Conditional - Used for Visa and Discover.

40

AN

tac

 

TWsyTEhIakRyQWRNakd4SkhoeHI%3D

Conditional – Used for AMEX.

30

AN

ucaf_auth_data

This is a variable length issuer generated security field up to 32 bytes in length.

ucaf:jJJLtQa+Iws8AREAEbjsA1MAAAA

Conditional - Used for Mastercard.

0-32

AN

xid

This field contains a value assigned to a SET or 3D Secure transaction as a unique transaction identifier.

b1h4MTVGa2JXMzFhSEhOU3FqSjA%3D

Conditional - Used for AMEX.

0 or 40

AN

requesterapp_name

 Product Identifier

APL001

Conditional - Mandatory for Apple Pay.

 

AN

token_requestor_id

Hex-encoded device manufacturer identifier.

544553544456

Conditional- Mandatory for AMEX.

0 or 11

AN

recurring_pmt_num

Payment number of the transaction. Initial and subsequent recurring transactions should pass 1.

1

Conditional

2

N

Example Payment Gateway Request/Response

Visa

Request

POST 'http://pgapp03.dev.atx.merchante-solutions.com:7003/mes-api/tridentApi' Content-Type: text/plain profile_id=94100008819100000003&profile_key=oyFnzBewkLQEkGispfAoIjNoTuTwtcbv&transaction_type=D&card_number=4189080409331656&card_exp_date=1230&transaction_amount=2439&moto_ecommerce_ind=5&cavv=BwABBJaSmIZUMzSVMpKYAAAAAAA%3D&requesterapp_name=APL001&tac=TWsyTEhIakRyQWRNakd4SkhoeHI%3D

Response

transaction_id=528d174ea7ad31078e53c3827dcf26ca&error_code=000&auth_response_text=Approval T5421H&avs_result=0&auth_code=T5421H

Mastercard

Request

POST 'http://pgapp03.dev.atx.merchante-solutions.com:7003/mes-api/tridentApi' Content-Type: text/plain profile_id=94100011692500000001&profile_key=TsXvbzZQWlKsprgtjSkgTorHhgABdXOb&transaction_type=D&card_number=5371433958658489&card_exp_date=1222&transaction_amount=55&moto_ecommerce_ind=5&ucaf_auth_data=ucaf:jJJLtQa+Iws8AREAEbjsA1MAAAA&requesterapp_name=apl001

Response

transaction_id=b456e431188231519c9d3e9dd9e45386&error_code=000&auth_response_text=Approval T54245&avs_result=0&auth_code=T54245

Discover

Request

POST 'http://pgapp03.dev.atx.merchante-solutions.com:7003/mes-api/tridentApi' Content-Type: text/plain profile_id=94100008819100000003&profile_key=oyFnzBewkLQEkGispfAoIjNoTuTwtcbv&transaction_type=D&card_number=6011008160129125&card_exp_date=1230&transaction_amount=2239&cavv=BwABBJaSmIZUMzSVMpKYAAAAAAA%3D&xid=b1h4MTVGa2JXMzFhSEhOU3FqSjA%3D&moto_ecommerce_ind=5&requesterapp_name=APL001

Response

transaction_id=ed99c0fcc4023a6aa052dda1a0b62d47&error_code=000&auth_response_text=Approval T54201&avs_result=0&auth_code=T54201

American Express

Request

profile_id=94100000048000000002&profile_key=fSeGaefCijrCNWjjtZxosNwIFWQKHzFR&transaction_type=D&card_number=370295001292109&transaction_amount=30.00&card_exp_date=1222&moto_ecommerce_ind=A&tac=211314123644&token_requestor_id=1234567890&requesterapp_name=hpp01|apl001&cardholder_zip=55555&cardholder_street_address=123PG

Response

transaction_id=c320ea0da36937f085010ce18680744e&error_code=000&auth_response_text=Exact Match&avs_result=Y&auth_code=T25588

Testing Your Apple Pay Configuration

Sending Test Payments to MerchantE Payment Gateway

The certification request form must be submitted online in order to obtain testing credentials: Obtain Testing Credentials Upon receipt of the completed form, test credentials will be emailed within 24-48 hours.

Certification Host: https://cert.merchante-solutions.com/mes-api/tridentApi 

 Note: It is important to use the test profile for testing to prevent billing for authorizations obtained during testing. ME will bill for all authorizations obtained using a production profile even if the transactions are part of the testing cycle.

The MerchantE certification servers are always available for unattended testing. The certification servers replicate the Payment Gateway production servers and support testing for all available functions. The Apply Pay transactions will be visible in your Business Portal reports.

Certification transactions are processed as tests, so there is no need to worry about settlement to a customer account.

Creating an Apple Pay Testing Account

For more information and a list of testing cards, see Sandbox Testing.

Navigate: Developer Account → Users and Access → People → Sandbox

  1. Sign into your developer account and navigate to Users and Access.

  2. Under Sandbox, click Testers.

  3. Click + to setup your tester accounts.

  4. Complete the information and click the Invite button.

  5. Sign out of your developer account. Sign back in using the newly created testing account.

Adding a Card to the Apple Pay Testing Account

Navigate: Developer Account → Testing Account → Wallet → Add Credit or Debit Card

  1. Sign in to your device using your testing account.

  2. Go to Wallet and click Add Credit or Debit Card.

  3. Using your testing account credentials, manually add a new card. A list of test cards can be found using the Sandbox Testing link.

  4. After the card has been added, you can use the account to make test payments.

 


1150 Sanctuary Parkway, Suite 300, Alpharetta, GA 30009
©2024 Merchant eSolutions, Inc. All rights reserved.
https://www.merchante.com