Introduction

Customers with iOS devices or Macs can use Apple Pay to make payments using their stored payment methods.

To enable eligible customers to use Apple Pay, merchants should display an Apple Pay button. Upon selection, customers are presented with a payment sheet for easy review of the order and payment details.

Apple Pay on the Web can be now used with Payone without a need to have own Apple Pay developer account making the integration process simpler. 

Overview

Apple Pay is currently not supported in all countries, please check with Apple Pay if it is available in your country/region. This specific version is not supported in Mainland China.

All currencies that Apple Pay supports are currently also supported by the PAYONE platform.

Supported Payment methods:

  • Visa
  • Mastercard
  • girocard

The Apple Pay token serves as a pseudo card PAN, resembling a credit card number, allowing third-party systems to utilize it without needing to adhere to PCI DSS requirements for storing card data. However This information is not available for the Merchant using Apple Pay without own developer account and can be accessed only by Payment Service Provider responsible for the Payment. 

Clearingtype / Clearingsubtype

clearingtype wallettype
wlt APL

 

Test Data

The test data that can be used is documented on the developer page of Apple Pay

LIABILITY SHIFT

Apple Pay supports liability shift globally for all the major Schemes, except for Visa.

The liability shift rules for Visa are defined as following:

  • For devices running iOS 16.2 and above, there is global support for all countries.
  • For devices running on versions below iOS 16.2, support is only available for cards issued in Europe region (as defined by Visa). 

Liability shift applies only to the Customer-Initiated Transactions (CITs). 
It is not available for Merchant-Initiated Transactions (MITs) since the cardholder is not present in-session for biometrics authentication. 

However in certain scenarios the liability can stay with a Merchant if it was indicated in the Apple Pay payload by providing a specific ECI value. 

Please make sure you only make payment methods available for Apple Pay which are part of your contract with us.

Sequence Diagram

Prerequisites

Opposed to the Apple pay integration with your own Apple Pay Developer Accounts described here, there is no need to create or have a Developer Account with Apple, but there are other requirements which should be followed.

In order to begin processing with Apple Pay you should contact our customer support, however first ensure that you have completed the Domain verification step described below

Domain Verification and server Setup

Prior to requesting the Apple Pay without Developer account with our Merchant Services team , prepare your website for registration (will be done by Payone) with Apple pay. Please see the same process should be completed each time you change any URL`s or would like to enable a new Merchant ID (MID) or Portal.

Step 1 -Put the following file to your web page to the dedicated URL defined below. 

HERE THE DOMAIN VERIFICATION FILE TO BE HOSSTED 

Path where this file should be located on each your domain:

/.well-known/apple-developer-merchant-id-domain-association

Step 2 - Setup your Server and Web Page

Follow Apple guidelines for Server Setup. You should specifically allow Apple IP Addresses for Domain Verification and payment processing. 

Please ensure that domain has a valid SSL certificate. For future it is crucial to update the certificate not later than 7 days prior to it`s expiration to keep Apple Pay functional.

Step 3 - Requesting a Merchant Identifier

Once all prerequisites are done, contact our Merchant Services team in order to be on-boarded and receive merchantIdentifier. You will need this identifier in order to begin payment processing with Apple Pay on the Web. 

Apple Pay on Your Website

How Apple Pay Works

Similar to other payment buttons, Apple Pay is designed to bypass the typical checkout steps by displaying a comprehensive payment sheet to the customer.

source: Apple

Initiating The Payment Session

Apple Pay on the Web

Apple Pay on the Web utilizes JavaScript APIs integrated into Safari on both Mac and mobile devices. For enhanced security, all Apple Pay sessions must be initiated using the Merchant Identification Certificate. Furthermore, your domains must be whitelisted in the Apple Developer Portal.  

In order to be able to process the transaction with Apple Pay without developer account, you will need to implement a session retrieval process for the onvalidatemerchant event, which would be done against Payone Endpoint  using a generic request.

New Apple Pay on the web without a developer account special parameters 
API PARAMETER REQUIRED Definition
add_paydata[action]="init_applepay_session" YES Generic action
add_paydata[display_name]="testStore" YES Merchant Display Name
add_paydata[domain_name]="aTestDomain"' YES

Merchant Domain Name

Sample Session initiation request

Please use the following generic request to retrieve a session against Payone Server API

request="genericpayment"
mid="18323"
portalid="2013224"
key="c839f8eeee77e8621c20f52d31a8a105"
mode="test"
aid="18324"
currency="EUR"
clearingtype="wlt"
reference="PM-APL-304"
lastname="Sørensen"
country="de"
wallettype="APL"
add_paydata[action]="init_applepay_session"
add_paydata[display_name]="testStore"
add_paydata[domain_name]="aTestDomain"'
Sample Session initiation Response
{
    "KeyValueBody": {
        "status": "OK",
        "workorderid": "PP2AADH3T16XW53W",
        "add_paydata[
            applepay_payment_session
        ]": "BASE64_encoded_STRING"
    }
}
Apple Pay Button display 

"For information on displaying the buttons and initiating the payment session, please refer to the Apple documentation: https://developer.apple.com/documentation/apple_pay_on_the_web/displaying_apple_pay_buttons and https://developer.apple.com/documentation/apple_pay_on_the_web/apple_pay_js_api/creating_an_apple_pay_session

Visit https://applepaydemo.apple.com for a comprehensive overview and some demo code.

Ensure that your payment request is configured correctly to align with your merchant account capabilities. For instance, a basic request for a merchant who can process Mastercard, Visa, and girocard in live mode might look like this:

{
  "countryCode": "DE",
  "currencyCode": "EUR",
  "merchantCapabilities": [
    "supports3DS" // mandatory
  ],
  "supportedNetworks": [
    "visa",
    "masterCard",
        "girocard"
  ],
  "total": {
    "label": "Demo (Card is not charged)",
    "type": "final",
    "amount": "1.99"
  }
}

Handling of Co-Badged Cards

Starting with iOS 15.4, the Apple Pay APIs will honor the order in which the supportedNetworks array is listed. If both networks of a co-badged card are supported by the merchant and the customer’s default card is co-badged, the pre-selected network will be chosen based on the listed order of the networks. This preference affects only the user’s default card (if it’s co-badged), as merchants cannot change the default card selection.

For Mastercard co-badged Girocards, you can specify the preferred network order like this:

optional parameters


"supportedNetworks": [
    "girocard",
    "masterCard",
    "visa"
  ],
optional parameters


"supportedNetworks": [
    "masterCard",
    "girocard",
    "visa"
  ],

Apple Pay In-App

Apple Pay in the App is not supported without Developer Account as this a limitation from Apple. You will need to have your own developer account and implement the regular version of the Apple Pay available from Payone. 

Forwarding the Data to the Payone API

After the customer completes the payment sheet and authenticates using biometric methods (such as Touch ID or Face ID), you'll receive an Apple Pay object like this:

Apple Pay Object
{
   "token":{
      "paymentData":{
         "version":"EC_v1",
         "data":"3+f4oOTwPa6f1UZ6tG...CE=",
         "signature":"MIAGCSqGSIb3DQ...AAAA==",
         "header":{
            "ephemeralPublicKey":"MFkwEK...Md==",
            "publicKeyHash":"l0CnXdMv...D1I=",
            "transactionId":"32b...4f3"
         }
      },
      "paymentMethod":{
         "displayName":"Visa 1234",
         "network":"Visa",
         "type":"debit"
      },
      "transactionIdentifier":"32b...4f3"
   },
   "billingContact":{
      "addressLines":[
         "1 Street",
         ""
      ],
      "administrativeArea":"",
      "country":"United Kingdom",
      "countryCode":"GB",
      "familyName":"Appleseed",
      "givenName":"John",
      "locality":"London",
      "postalCode":"AB12 3CD",
      "subAdministrativeArea":"",
      "subLocality":""
   },
   "shippingContact":{
      "addressLines":[
         "1 Street",
         ""
      ],
      "administrativeArea":"",
      "country":"United Kingdom",
      "countryCode":"GB",
      "familyName":"Appleseed",
      "givenName":"John",
      "locality":"London",
      "postalCode":"AB12 3CD",
      "subAdministrativeArea":"",
      "subLocality":"",
      "phoneNumber":"01234 567890",
      "emailAddress":"john.appleseed@apple.com"
   }
}

Many contents of this object can be mapped to existing Server API parameters.

Apple Pay Object
"billingContact":{
      "addressLines":[
         "1 Street",
         ""
      ],
      "administrativeArea":"",
      "country":"United Kingdom",
      "countryCode":"GB",
      "familyName":"Appleseed",
      "givenName":"John",
      "locality":"London",
      "postalCode":"AB12 3CD",
      "subAdministrativeArea":"",
      "subLocality":""
   },
PAYONE Server API
country=GB
        lastname=Appleseed
        firstname=John
        street=1 Street
        city=London
        zip=AB12 3CD

However, the payment component of the object is encrypted and must be sent to the PAYONE API using specific parameters.

Please note that the token generated by Apple has a limited lifespan of 5 minutes. In live mode (mode=live), PAYONE is required to reject expired tokens. 

Apple Pay Specific Error Messages

Error Description Suggested Activity

2700

Request amount differs from apple pay token amount.

Make sure to use the same amount as in your Apple Pay payment sheet

2701

Request currency differs from apple pay token amount.

Make sure to use the same currency as in your Apple Pay payment sheet

2702

Failed to decrypt apple pay token

Check whether your Payment Processing Certificate is valid and uploaded to our merchant backend

2703

Certificate service declined request because of validation errors.

2704

Required parameter in apple pay token is missing or empty

Check if all required parameters for the Apple Pay token are set

Integrations

POST Request Pre- /Authorization
Account Parameters
request
required
Fixed Value: preauthorization
mid
required
your merchant ID, 5-digit numeric
aid
required
your subaccount ID, 5-digit numeric
portalId
required
your Portal ID, 7-digit numeric
key
required
your key value, alpha-numeric
PERSONAL DATA Parameters
firstname
optional
Format CHAR(1..50)

First name of customer; optional if company is used, i.e.: you may use "company" or "lastname" or "firstname" plus "lastname"

lastname
required
Format CHAR(2..50)

Last name of customer; optional if company is used, i.e.: you may use "company" or "lastname" or "firstname" plus "lastname"

company
optional
Format CHAR(2..50)

Company name, required for B2B transactions (if add_paydata[b2b] = “yes”)

street
optional
Format CHAR(1..50)

Street number and name (required: at least one character)

zip
optional
Format CHAR(2..50)
Permitted Symbols [0-9][A-Z][a-z][_.-/ ]

Postcode

city
optional
Format CHAR(2..50)

City of customer

country
required
Format LIST
Permitted values ISO 3166 2-letter-codes
Samples

DE

GB

US

Specifies country of address for the customer.

Some countries require additional information in parameter "state"
email
optional
Format CHAR(5..254)

Permitted Symbols RFC 5322

Special Remark email validation:

Max. length for email is 254 characters. Validation is set up in the following way:

Username = Max. 63 characters

Domain Name = Max. 63 characters
Domain Suffixes = Max. 4 suffixes with max. 124 characters 
Example: username[63]@domain_name[63].suffix[60].suffix[60].suffix[4]

"@" and "." is counted as a character as well; in case of a total of three suffixes, this would allow a total of 254 characters.

email-address of customer

birthday
optional
Format DATE(8), YYYYMMDD

Samples 20190101 / 19991231


Date of birth of customer

telephonenumber
optional

Telephone number

add_paydata PARAMETERS
add_paydata[paymentdata_token_version]
required
Format STRING

Sample EC_v1

add_paydata[paymentdata_token_data]
required

Sample rhHAQUrR118u[...]cwDw==

add_paydata[paymentdata_token_signature]
required
Format STRING

Sample MIAGCSqGSIb3DQEHAqCAMIACAQE[...]AAAAAAA==

add_paydata[paymentdata_token_ephemeral_publickey]
required

Sample MFkwEwYHKoZIzj0[...]Y2A==

add_paydata[paymentdata_token_publickey_hash]
required
Format STRING

Sample ilecVF58bpB8qio[...]l6eirw2Y1v1KU

add_paydata[paymentdata_token_transaction_id]
Format STRING

Sample be2e745845b31dfac7778c6e29[...]b658cbcca971c0e0

Response Parameters
status
Permitted Values
APPROVED
ERROR
Response Parameter (Approved)
txid
Format NUMERIC(9..12)

The txid specifies the payment process within the PAYONE platform

userid
Format NUMERIC(9..12)

PAYONE User ID, defined by PAYONE

Response Parameter (Error)
errorcode
Format NUMERIC(1..6)

In case of error the PAYONE Platform returns an error code for your internal usage.

errormessage
Format CHAR(1..1024)

In case of error the PAYONE Platform returns an error message for your internal usage.

customermessage
Format CHAR(1..1024)

The customermessage is returned to your system in order to be displayed to the customer.

(Language selection is based on the end customer's language, parameter "language")

Host: api.pay1.de
Content-Type: application/x-www-form-urlencoded    
Payload

add_paydata[paymentdata_token_data]=FpFyA6zSGkZC[...]xi8xeXCNbpGBpvlNXfcang==
add_paydata[paymentdata_token_ephemeral_publickey]=MFkwEwYHKoZIzj0CA[...]iXv34cYJ4lxZsjVgnsE0i6RX+mg==
add_paydata[paymentdata_token_publickey_hash]=tWOdQ0ARSRiQNsrS4[...]7X6KBxLLAa8=
add_paydata[paymentdata_token_signature]=MIAGCSqGSIb3DQEHAq[...]s9oHcqWMnolhsgAAAAAAAA
add_paydata[paymentdata_token_transaction_id]=12d7[...]d4eebc2e54109386
add_paydata[paymentdata_token_version]=EC_v1
aid=12345
amount=1000
api_version=3.11
cardtype=V
clearingtype=wlt
country=DE
currency=EUR
encoding=UTF-8
firstname=Demo
key=123456789abcdefghij
lastname=Dude
mid=12345
mode=test
portalid=123456
reference=013265464564654
request=preauthorization
wallettype=APL
RESPONSE

status=APPROVED
txid=123456789
userid=987654321
POST Request Capture

The capture request is used to finalize a preauthorized transaction.

If you use preauth/Capture with installment transactions, the capture request has to be sent right after the preauthorization

Account Parameters
request
required
Fixed Value: creditcardcheck
mid
required
your merchant ID, 5-digit numeric
aid
required
your subaccount ID, 5-digit numeric
portalId
required
your Portal ID, 7-digit numeric
key
required
your key value, alpha-numeric
common Parameters
txid
required
Format NUMERIC(9..12)

The txid specifies the payment process within the PAYONE platform

clearingtype
optional
Fixed Value wlt
wallettype
optional
Fixed Value: APL

APL: Apple Pay

capturemode
required
Format LIST
Value Comment
completed

Set with last capture; i.e.: Delivery completed.
No further capture is allowed.

notcompleted

Set with partial deliveries (last delivery with "completed")
Another capture is expected to complete the transaction.

Specifies whether this capture is the last one or whether there will be another one in future.

sequencenumber
optional
Format NUMERIC(1..3)
Permitted values 0..127

Sequence number for this transaction within the payment process (1..n), e.g. PreAuthorization: 0, 1. Capture: 1, 2. Capture: 2

Required for multi partial capture (starting with the 2nd capture)

amount
required
Format NUMERIC(1..10)
Permitted values max. +/- 19 999 999 99

Specifies the total gross amount of a payment transaction.

Value is given in smallest currency unit, e.g. Cent of Euro

The amount must be less than or equal to the amount of the corresponding booking.

currency
required
Fixed Value EUR
narrative_text
optional
Format CHAR(1..81)

Dynamic text element on account statements (3 lines with 27 characters each) and credit card statements.

Response Parameters
status
Permitted Values
APPROVED
ERROR
Response Parameter (approved)
txid
Format NUMERIC(9..12)

The txid specifies the payment process within the PAYONE platform

settleaccount
Format LIST
Value Comment
yes

Settlement of outstanding balances is carried out.

no

Do not carry out settlement of outstanding balances, book request only.

auto

The system decides - depending on type of payment and balance - if a settlement of balances can be carried out or not. (default)

Carry out settlement of outstanding balances. The request is booked and the resulting balance is settled by means of a collection, e.g. a refund.

Response parameters (error)
errorcode
Format NUMERIC(1..6)

In case of error the PAYONE Platform returns an error code for your internal usage.

errormessage
Format CHAR(1..1024)

In case of error the PAYONE Platform returns an error message for your internal usage.

customermessage
Format CHAR(1..1024)

The customermessage is returned to your system in order to be displayed to the customer.

(Language selection is based on the end customer's language, parameter "language")

Host: api.pay1.de
Content-Type: application/x-www-form-urlencoded


POST Request Debit
Account Parameters
request
required
Fixed Value: creditcardcheck
mid
required
your merchant ID, 5-digit numeric
aid
required
your subaccount ID, 5-digit numeric
portalId
required
your Portal ID, 7-digit numeric
key
required
your key value, alpha-numeric
common Parameters
txid
required
Format NUMERIC(9..12)

The txid specifies the payment process within the PAYONE platform

sequencenumber
required
Format NUMERIC(1..3)
Permitted values 0..127

Sequence number for this transaction within the payment process (1..n), e.g. PreAuthorization: 0, 1. Capture: 1, 2. Capture: 2

Required for multi partial capture (starting with the 2nd capture)

amount
required
Format NUMERIC(1..10)
Permitted values max. +/- 19 999 999 99

Specifies the total gross amount of a payment transaction.

Value is given in smallest currency unit, e.g. Cent of Euro; Pence of Pound sterling; Öre of Swedish krona.

The amount must be less than or equal to the amount of the corresponding booking.

currency
required
Fixed Value EUR
settleaccount
optional
Format LIST
Value Comment
yes

Settlement of outstanding balances is carried out.

no

Do not carry out settlement of outstanding balances, book request only.

auto

The system decides - depending on type of payment and balance - if a settlement of balances can be carried out or not. (default)

Carry out settlement of outstanding balances. The request is booked and the resulting balance is settled by means of a collection, e.g. a refund.

Response Parameters
status
Permitted Values
APPROVED
ERROR
Response Parameter (approved)
txid
Format NUMERIC(9..12)

The txid specifies the payment process within the PAYONE platform

settleaccount
Format LIST
Value Comment
yes

Settlement of outstanding balances is carried out.

no

Do not carry out settlement of outstanding balances, book request only.

Provides information about whether a settlement of balances has been carried out.

Response Parameter (error)
errorcode
Format NUMERIC(1..6)

In case of error the PAYONE Platform returns an error code for your internal usage.

errormessage
Format CHAR(1..1024)

In case of error the PAYONE Platform returns an error message for your internal usage.

customermessage
Format CHAR(1..1024)

The customermessage is returned to your system in order to be displayed to the customer.

(Language selection is based on the end customer's language, parameter "language")

Host: api.pay1.de
Content-Type: application/x-www-form-urlencoded