1 About Apple Pay

1.1 What is Apple Pay

Logo

InfoType
Apple Pay is a digital wallet for storing payment details, providing an easy and secure way to pay in iOS applications, websites running on Safari browser and contactless POS terminals. In applications and on websites, users can quickly and securely provide their payment, shipping, and contact information to check out with just one touch using Apple’s Touch ID.  Apple Pay’s simplicity increases conversion rates and new user adoption that come with it.Payments by eWallet

First Cash Solution’s Apple Pay solution supports following scenarios:

  • In-application payments (also part of the First Cash Solution SDK)
  • Web payments

Notice: Regarding the liability shift in case of the card processing, please contact your Acquirer directly. Because First Cash Solution is not a direct contract partner, your Acquirer should specify the liability shift rules for each card brand.

1.2 Web payment

Apple Pay on the Web enables purchases while using Safari web browser. For shopping on iPhone or iPad, after selecting checkout with Apple Pay, a payment sheet appears, prompting the customer to confirm payment via Touch ID. For shopping on Mac, customers need to have an iOS device in close range, and they’ll be prompted on that device to authorize the payment, which will then synchronize to the browser. The latest Mac Book Pro allows customers to authorize payment directly on the Mac Book.

Apple Pay requirements:

  • iOS 10. Apple Pay Web payments are supported on all iOS devices with a Secure Element.
  • macOS 10.12. Apple Pay Web payments are supported in Safari.
    • The user must have an iPhone or Apple Watch that can authorize the payment.
    • On the latest Mac Book Pro payments can be authorized directly via Touch ID
  • All pages that incorporate Apple Pay must be served over HTTPS.
  • Your website must comply with the Apple Pay guidelines. For more information, see Apple Pay on the Web Acceptable Use Guidelines
  • Server requirements

1.3 In-app payment

Apple Pay can be used for payments within the iOS applications. The main advantage of Apple Pay is that it is frictionless process with no need to re-type credit card data, shipping or billing address, which can be cumbersome on the smaller iPhone screens. Customer just choose to checkout with Apple Pay and confirms the payment with Touch ID.

Merchants can also use First Cash Solution’s SDK for facilitating the in-app payment integration, making it easier and faster.

Apple Pay requirements:

  • Apple Pay in-app payments are supported on all iOS devices with a Secure Element.

1.4 Process flow chart

Apple Pay process flow

1.4.1 Presenting the Apple Pay button

Within apps, PassKit provides the API’s that your app will use to determine if it is running on a device with a Secure Element and if the device has been provisioned with payment cards that you support. On websites, WebKit provides APIs that allow your website to check if the individual has an Apple Pay capable device and if it is set up.

If the device is Apple Pay enabled you should present the Buy with Apple Pay button using APIs supplied within PassKit within apps and Webkit within Safari.

1.4.2 Presenting the payment sheet

When your user selects goods or services to buy, and selects Apple Pay as the payment method, you create a payment request and ask PassKit in apps or Webkit on your website to present the payment sheet to the user. The payment sheet must immediately follow the user tapping the Apple Pay button, without any interim screens or pop-ups except to prompt for necessary product details, such as size or quantity.

Your app specifies the contents of the payment sheet but it does not control the user’s interaction with the sheet. You must decide if it makes sense to present shipping and billing information, shipping method, and other line items to the user. You should only request the information necessary to process the transaction.

1.4.3 Processing payments

Once authorized by the user with Touch ID (and bank PIN code in China), your app receives a payment token from PassKit. The payment token encapsulates the information needed to complete a payment transaction, including the device-specific account number, the amount, and a unique, one-time-use cryptogram. The encrypted payment bundle will be decrypted by First Cash Solution, which then handles the whole processing of the transaction.

2 Step by Step Set-Up Guide for Apple Pay

Once you have decided to support Apple Pay, there is a set of steps that need to be completed:

1. Validate if the Acquirer supports Apple Pay

a. Not all Acquirers are supporting Apple Pay for in-app and web payments

b. First Cash Solution can provide information about supporting Acquirers

2. Create Merchant ID, unique identifier that represents a merchant for Apple Pay

a. Access your Apple Developer Account and visit the Certificates, Identifiers & Profiles section of the Apple member center. You can then navigate to Merchant IDs and click add.

b. Set your Merchant ID. The identifier you enter should be a reverse DNS style identifier prefixed with the word merchant

c. Send your Apple Merchant ID to the 1cs Online Payment System

3. Create Payment Processing Certificate, used to securely transfer payment data. Apple Pay servers use the payment processing certificate’s public key to encrypt the payment data.

a. The First Cash Solution creates Certificate Signing Request (CSR).

i. With your Apple Merchant ID the First Cash Solution Helpdesk (support@1cs.de) creates the Apple Pay CSR and provides you with this information.

ii. CSR will be needed by Apple to generate actual certificate for signing Payment Token

b. Upload CSR at Apple

i. In Member Center, select Certificates, Identifiers & Profiles. Under Identifiers, select Merchant IDs. Select the merchant ID from the list, and click Edit.

ii. Click Choose File, select the CSR received from First Cash Solution, and click Generate.

iii. Download the certificate by clicking Download, and click Done.

hinweis  To be able to upload the CSR, the following key pair settings must be selected:

  • Algorithm: ECC
  • Key Size: 256 bits

4. Enable Apple Pay for your app in Xcode

a. Open Capabilities pane

b. Select the switch in the Apple Pay row, and then select the merchant IDs you want the app to use.

5. (WEB ONLY) Create Merchant Identity Certificate. A Transport Layer Security (TLS) certificate used to authenticate your merchant sessions with the Apple Pay servers.

To register and verify your domain, and create your Merchant Identity Certificate:

a. In Member Center, select Certificates, Identifiers and Profiles.

b. Under Identifiers, select Merchant IDs.

c. Select the merchant ID from the list, and click Edit.

d. In the Apple Pay on the Web section, click the Add Domain

e. Enter your fully qualified domain name, and click Continue.

f. The site creates a file and makes it available to download. Download this file and host it at the provided location.

g. As soon as the file is available on your server, click the Verify button. If the verification succeeds, the site returns to the iOS Merchant ID Settings page and shows a green Verified status label.

h. In the Apple Pay on the Web section, click the Create Certificate Follow the instructions to create and download your Merchant Identity Certificate. Use this certificate when requesting a merchant session during payment validation. For more information, see Merchant Validation in ApplePaySession.

6. Integrate Apple Pay at your application or web shop

a. Follow guidelines: https://developer.apple.com/apple-pay

b. Important: When creating PKPaymentRequest, request.merchantCapabilities = PKMerchantCapability3DS. First Cash Solution only supports 3DS types.

3 1cs Online Payment System interface

3.1 Definitions

3.1.1 Data formats

FormatDescription
aalphabetical
asalphabetical with special characters
nnumeric
analphanumeric
ansalphanumeric with special characters
nsnumeric with special characters
boolboolean expression (true or false)
3fixed length with 3 digits/characters
..3variable length with maximum 3 digits/characters
enumenumeration of allowed values
dttmISODateTime (YYYY-MM-DDThh:mm:ss)

3.1.2 Abbreviations

AbbreviationDescription
CNDcondition
Mmandatory
Ooptional
Cconditional

Notice: Please note that the names of parameters can be returned in upper or lower case.

3.2 Calling the interface

Two transactions are created when making a credit card payment via Apple Pay. In the Apple Pay transaction the required credit card data are determined first and the actual credit card transaction is then carried out automatically. This takes place via a server-to-server connection and supports all usual credit card transaction options. The difference here, however, is that you don’t transmit the credit card information, which you don’t know. Instead, you transmit the PKPaymentToken generated by Apple Pay, which contains the required credit card data in encrypted form.

In order to make a credit card payment with Apple Pay, go to the following URL:

https://www.computop-paygate.com/applepay.aspx

Notice: For security reasons, the 1cs Online Payment System rejects all payment requests with formatting errors. Therefore please use the correct data type for each parameter.

The following table describes the encrypted transfer parameters.

The table describes just basic parameters. It is also possible to include all credit card payment parameters (without credit card data). More information about this you can find within Card processing EN. If you are processing Recurring or stored Credential on File transactions, please make sure to review all the necessary information in “COF Mandate Integration Guide”. If there are any specific parameters that are mandatory for credit card payment, these parameters are also mandatory for Apple Pay.

ParameterFormatCNDDescription
MerchantIDans..30MMerchantID, assigned by First Cash Solution. Additionally this parameter has to be passed in plain language too.
TransIDans..64MTransactionID which should be unique for each payment
RefNrns..30CUnique reference number. Mandatory in case that this parameter is mandatory for merchant’s card processing. Only ASCII characters are allowed. Special characters such as (“umlauts”, …) are not permitted and may have to be replaced by ASCII characters (e.g. ü → ue, é → e, …).
Amountn..10MAmount in the smallest currency unit (e.g. EUR Cent) Please contact the helpdesk, if you want to capture amounts < 100 (smallest currency unit).
Currencya3MCurrency, three digits DIN / ISO 4217, e.g. EUR, USD, GBP. Please find an overview here: Currency table
MACan64MHash Message Authentication Code (HMAC) with SHA-256 algorithm. Details can be found here: HMAC Authentication (Request) HMAC Authentication (Notify)
UserDataans..1024OIf specified at request, the 1cs Online Payment System forwards the parameter with the payment result to the shop.
RTFa1OEstablishment of Credential on File Agreement (Cardholder agrees that his card data can be stored for further transactions).
Capturean..6OMDetermines the type and time of capture. AUTO: capturing immediately after authorisation (default value). MANUAL: capturing made by the merchant. <Number>: Delay in hours until the capture (whole number; 1 to 696).
OrderDescans..64MDescription of purchased goods, unit prices etc.
URLNotifyans..256OComplete URL which the 1cs Online Payment System calls up in order to notify the shop about the payment result. The URL may be called up only via port 443 It may not contain parameters: Use the UserData parameter instead. Common notes: We recommend to use parameter “response=encrypt” to get an encrypted response by the 1cs Online Payment System
However, fraudster may just copy the encrypted DATA-element which are sent to URLFailure and send the DATA to URLSuccess/URLNotify. Therefore ensure to check the “code”-value which indicates success/failure of the action. Only a result of “code=00000000” should be considered successful.
MerchantIDExtans..128CMerchant Identifier of Public Key Mandatory if more then one Merchant Identifiers are stored with First Cash Solution.
TokenExtans..6000MApple Pay PKPaymentToken as JSON string in the Base64 format Example for TokenExt {  “paymentData”: {   “data”: “GiZiyzsI6r6lnPYUeceR6itk2PDyBozl2Xy77c5u2X8Ze7l5EasyyH4Q6BoAevrvBfe0FnUNARBEXRySLwqqnpUHO6Du/amZEECRXxlrH91wFqH4oXry2CTDRu7TaIlmnR+s3ien5JI8iWo9hoEW7hyJOE7QGaS6rfR1CtQ4DWJEUq/tFnW98tj3kwKU6iOAAvE467boopMDGBS1fK5HzGXs4hH/6r+LPRfSOKBi1L5VWAexs9Bzw3ByyG69i52doRuFb1xOcMOJbmPg40hap13IjBW6dnj1phbsqP2i/JxvWPV3EcuqpuIoVZr5w53w//pPsl54kmeXNddIjVD5dIhhOKZ8AznD4eL2dbzkp6bic8xScBf3G8hrKXTRTL7V+KT2S+TQliHN0SNXrFu6B6o=”,   “signature”: “MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCAMIID4zCCA4igAwIBAgIITDBBSVGdVDYwCgYIKoZIzj0EAwIwejEuMCwGA1UEAwwlQXBwbGUgQXBwbGljYXRpb24gSW50ZWdyYXRpb24gQ0EgLSBHMzEmMCQGA1UECwwdQXBwbGUgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxEzARBgNVBAoMCkFwcGxlIEluYy4xCzAJBgNVBAYTAlVTMB4XDTE5MDUxODAxMzI1N1oXDTI0MDUxNjAxMzI1N1owXzElMCMGA1UEAwwcZWNjLXNtcC1icm9rZXItc2lnbl9VQzQtUFJPRDEUMBIGA1UECwwLaU9TIFN5c3RlbXMxEzARBgNVBAoMCkFwcGxlIEluYy4xCzAJBgNVBAYTAlVTMFkwEwYHKoZIzj0CAQY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Z1UNjANBglghkgBZQMEAgEFAKCBlTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0yMjAyMjMxMDMyMzFaMCoGCSqGSIb3DQEJNDEdMBswDQYJYIZIAWUDBAIBBQChCgYIKoZIzj0EAwIwLwYJKoZIhvcNAQkEMSIEIKELTeQBJkyBdJ9Ge0BlmVOTIqU4sV75S/aC6sJMIHxbMAoGCCqGSM49BAMCBEYwRAIgC0iKpRgZQE2vMCSczjMRe+4b0aqiO79D2d0+9CKMmA8CICnC+e7RBgIPVbA32ZsKOV8e3iTdvm1OaH/ABCDEFGHIJKL”,   “header”: {       “publicKeyHash”: “OgiD2qBTWYf/a+LDshFeQcPq6tOmePu0epHpP4ZkNicc=”,       “ephemeralPublicKey”: “MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEc/HxA3lJZrC+B0ITom0Iji+gFdn7ivGtpI+fl2u8n8XByPgBaVK2b44qUvsGigoNd0OFLNXo0Q07R2B54eIdS3A==”,       “transactionId”: “156632b2aadf355d4958d9051a42bf62e07aea5716e72083aa64247944f6e3e14d”   },   “version”: “EC_v1”  },  “paymentMethod”: {   “displayName”: “MasterCard 0063”,   “network”: “MasterCard”,   “type”: “debit”  },  “transactionIdentifier”: “156632B2AAD12F355D4958D9051A42BF62E07AE5716E720AA6424794F6E3E14567D” }
Channela..10OChannel over which the order is processed. Allowed values are WEBSITE and MOBILE_APP

Parameters for Apple Pay

The following table describes the result parameters with which the 1cs online payment system responds to your system

hinweisbe prepared to receive additional parameters at any time and do not check the order of parameters

hinweisthe parameters (e.g. MerchantId, RefNr) should not be checked case-sentive

ParameterFormatCNDDescription
MIDans..30MMerchantID, assigned by First Cash Solution
PayIDan32MID assigned by the 1cs Online Payment System for the payment, e.g. for referencing in batch files This ID refers to the credit card transaction unless an error occurs already at the Apple Pay transaction.
XIDan32MID for all single transactions (authorisation, capture, credit note) for one payment assigned by 1cs Online Payment System
TransIDans..64MTransactionID provided by you which should be unique for each payment
RefNrns..30OMerchant´s unique reference number Only ASCII characters are allowed. Special characters such as (“umlauts”, …) are not permitted and may have to be replaced by ASCII characters (e.g. ü → ue, é → e, …).
UserDataans..1024OIf specified at request, the 1cs Online Payment System forwards the parameter with the payment result to the shop.
Statusa..50MOK (URLSuccess) or FAILED (URLFailure)
Descriptionans..1024MFurther details in the event that payment is rejected. Please do not use the Description but the Code parameter for the transaction status analysis!
Coden8MError code according to 1cs Online Payment System Response Codes Excel file
MACan64MHash Message Authentication Code (HMAC) with SHA-256 algorithm. Details can be found here: HMAC Authentication (Request) HMAC Authentication (Notify)
schemeReferenceIDans..64CCard scheme specific transaction ID required for subsequent credential-on-file payments, delayed authorizations and resubmssions.

Result parameters for Apple Pay

3.3 Capture / Credit / Reversal

Captures, credits and reversals do not refer to the Apple Pay transaction but directly to the credit card transaction. More information about this you can find within Card processing EN.

3.4 Batch processing via the interface

Captures, credits and reversals via batch do not refer to the Apple Pay transaction but directly to the credit card transaction. More information about this you can find within the document Card processing EN.