Apple Pay and Google Pay Deposit with decrypted token

This article describes how to integrate Apple Pay or Google Pay with decrypted flow.

At the moment, PXP Financial support GooglePay only with decrypted token.

For ApplePay, PXP Financial supports only a flow handling the token decryption - see Browser-based flow and App-based flow.

Apple Pay

ApplePay is a secure, easy way to make payments for physical goods and services within iOS and watchOS. Websites can also accept ApplePay – it is available in Safari for iPhone, iPad, and Mac. Users authorize payments and provide shipping and contact information, using securely stored credentials on an iPhone, an iPad, or a MacBook Pro with Touch ID. On other Macs, the purchase is confirmed with the user's nearby iPhone or Apple Watch that has ApplePay enabled.

The following Apple Pay payment methods are covered in this article:

IDNameCredit/Debit State
298AppleVisaDepositAuthorisedByProvider (13)
CapturedByProvider (27)
300AppleECMCDepositAuthorisedByProvider (13)
CapturedByProvider (27)
364AppleMaestroDepositAuthorisedByProvider (13)
CapturedByProvider (27)
391AppleDiscoverDepositAuthorisedByProvider (13)
CapturedByProvider (27)
397Apple AMEX DepositAuthorisedByProvider (13)
CapturedByProvider (27)

Google Pay

The following Google Pay payment methods are covered in this article:

IDNameCredit/Debit State
413GoogleVisaDepositAuthorisedByProvider (13)
CapturedByProvider (27)
414GoogleECMCDepositAuthorisedByProvider (13)
CapturedByProvider (27)
415GoogleMaestroDepositAuthorisedByProvider (13)
CapturedByProvider (27)
416GoogleDinersDepositAuthorisedByProvider (13)
CapturedByProvider (27)

Payment method interaction type: Synchronous Execution (see Interaction Types)

State Diagram

The below state diagram applies to all Apple and Google Pay deposit methods as listed above.

Redirect Integration

Currently not supported.

Backend2Backend Integration

The following table contains the fields to be sent in specificPaymentData section of the request:

key (value type, account type, required)value
PaymentDescription
(string, required)
Text describing the deposit method
PaymentDescriptionLanguageCode
(string, required)
Two letter language: ex. "en"
ThreeDSecureCheckResult
(int, required)
Always provide "4" in the request
ThreeDSecureCAVV
(string, required)
ThreeD secure data, provided in the Applepay (PaymentData.OnlinePaymentCryptogram) or Googlepay (paymentMethodDetails.cryptogram) payloads after decryption
ThreeDSecureECI
(string, required)
ThreeD secure data, provided from the Applepay payloads (PaymentData.EciIndicator) or the Googlepay payloads (paymentMethodDetails.eciIndicator) after decryption, if present.

The following table contains the fields to be sent in specificPaymentAccountData section of the request:

key (value type, account type, required)value
CardNumber
(string, required)
DPAN number from the ApplePay payload (applicationPrimaryAccountNumber) or GooglePay payload (paymentMethodDetails.pan)
ExpiryMonth
(int, required)
Card expiry month from the ApplePay payload (applicationExpirationDate(extracted month)) or from the GooglePay payload (paymentMethodDetails.expirationMonth)
ExpiryYear
(int, required)
Card expiry year from the ApplePay payload (applicationExpirationDate(extracted year)) or from the GooglePay payload (paymentMethodDetails.expirationYear)

📘

Sample values

Please note that the ThreeDSecureCAVV and ThreeDSecureECI values in the samples below are only examples. Check the description above to extract the correct values from the ApplePay or GooglePay payload.

Example initiatePaymentRequest (AppleVisaDeposit):

<?xml version="1.0" encoding="utf-8"?>
<initiatePaymentRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.cqrpayments.com/PaymentProcessing">
    <merchantID>KalixaAcceptDEMO</merchantID>
    <shopID>KalixaAcceptDEMO</shopID>
    <merchantTransactionID>9d9f2bd1-bdc0-4746-b1ac-j5gessd23</merchantTransactionID>
    <paymentMethodID>298</paymentMethodID>
    <amount currencyCode="EUR">10</amount>
    <userID>usertsani</userID>
    <userIP>127.0.0.1</userIP>
    <userSessionID>af1d6858-aab5-4ff2-875f-203c785fc9df</userSessionID>
    <creationTypeID>1</creationTypeID>
    <specificPaymentData>
        <data xsi:type="keyStringValuePair">
            <key>PaymentDescription</key>
            <value>VISA Payment</value>
        </data>
        <data xsi:type="keyStringValuePair">
            <key>PaymentDescriptionLanguageCode</key>
            <value>en</value>
        </data>
        <data xsi:type="keyIntValuePair">
            <key>ThreeDSecureCheckResult</key>
            <value>4</value>
        </data>
        <data xsi:type="keyStringValuePair">
            <key>ThreeDSecureCAVV</key>
            <value>jLRabyR3C2QaABEAAFHSuWJ7w5g=</value>
        </data>
        <data xsi:type="keyStringValuePair">
            <key>ThreeDSecureECI</key>
            <value>05</value>
        </data>
    </specificPaymentData>
    <paymentAccount>
        <specificPaymentAccountData>
            <data xsi:type="keyStringValuePair">
                <key>CardNumber</key>
                <value>4111111111111111</value>
            </data>
            <data xsi:type="keyIntValuePair">
                <key>ExpiryMonth</key>
                <value>1</value>
            </data>
            <data xsi:type="keyIntValuePair">
                <key>ExpiryYear</key>
                <value>2020</value>
            </data>
        </specificPaymentAccountData>
    </paymentAccount>
</initiatePaymentRequest>

Example initiatePaymentResponse (AppleVisaDeposit):

<initiatePaymentResponse xmlns="http://www.cqrpayments.com/PaymentProcessing" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <payment xsi:type="paymentWithPaymentAccount">
        <merchantID>KalixaAcceptDEMO</merchantID>
        <shopID>KalixaAcceptDEMO</shopID>
        <paymentMethod>
            <key>298</key>
            <value>AppleVisaDeposit</value>
        </paymentMethod>
        <merchantTransactionID>9d9f2bd1-bdc0-4746-b1ac-j5gessd23</merchantTransactionID>
        <paymentID>64bd669b-85f8-4cc7-82f2-47a732aa38bc</paymentID>
        <userID>usertsani</userID>
        <paymentProvider>
            <key>92</key>
            <value>CQRUK</value>
        </paymentProvider>
        <amount currencyCode="EUR">10</amount>
        <creationType>
            <key>1</key>
            <value>User</value>
        </creationType>
        <userIP>127.0.0.1</userIP>
        <state>
            <id>302f5f44-1af6-47a0-836f-5ef919020aa8</id>
            <definition>
                <key>13</key>
                <value>AuthorisedByProvider</value>
            </definition>
            <createdOn>2019-03-05T09:05:00.7401631Z</createdOn>
            <description>Approved or completed successfully</description>
            <paymentStateDetails>
                <detail xsi:type="keyStringValuePair">
                    <key>ProviderResponseCode</key>
                    <value>0</value>
                </detail>
                <detail xsi:type="keyStringValuePair">
                    <key>ApprovalCode</key>
                    <value>131185</value>
                </detail>
            </paymentStateDetails>
        </state>
        <isExecuted>true</isExecuted>
        <baseAmount currencyCode="EUR">10</baseAmount>
        <paymentDetails>
            <detail xsi:type="keyStringValuePair">
                <key>AccountBalanceCurrencyCode</key>
                <value>EUR</value>
            </detail>
            <detail xsi:type="keyDecimalValuePair">
                <key>AccountBalanceAmount</key>
                <value>150.01</value>
            </detail>
            <detail xsi:type="keyStringValuePair">
                <key>ProviderExternalID</key>
                <value>11339795</value>
            </detail>
        </paymentDetails>
        <paymentAccount>
            <paymentAccountID>cdf92860-4c93-4fbb-8c42-532fed695f26</paymentAccountID>
            <details>
                <detail xsi:type="keyStringValuePair">
                    <key>MaskedNumber</key>
                    <value>************1111</value>
                </detail>
                <detail xsi:type="keyStringValuePair">
                    <key>AccountOwnerToken</key>
                    <value>214d8a0e-a34d-45fb-86fd-c3a93a6f9f9e</value>
                </detail>
                <detail xsi:type="keyIntValuePair">
                    <key>ExpiryMonth</key>
                    <value>1</value>
                </detail>
                <detail xsi:type="keyIntValuePair">
                    <key>ExpiryYear</key>
                    <value>2020</value>
                </detail>
                <detail xsi:type="keyStringValuePair">
                    <key>HolderName</key>
                    <value>TEST1</value>
                </detail>
                <detail xsi:type="keyStringValuePair">
                    <key>CardType</key>
                    <value>Visa</value>
                </detail>
            </details>
        </paymentAccount>
    </payment>
</initiatePaymentResponse>

Example initiatePaymentRequest (AppleECMCDeposit):

<?xml version="1.0" encoding="utf-8"?>
<initiatePaymentRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.cqrpayments.com/PaymentProcessing">
    <merchantID>KalixaAcceptDEMO</merchantID>
    <shopID>KalixaAcceptDEMO</shopID>
    <merchantTransactionID>9d9f2bd1-bdc0-4746-b1ac-gh34hywas</merchantTransactionID>
    <paymentMethodID>300</paymentMethodID>
    <amount currencyCode="EUR">10</amount>
    <userID>usertsani</userID>
    <userIP>127.0.0.1</userIP>
    <userSessionID>af1d6858-aab5-4ff2-875f-203c785fc9df</userSessionID>
    <creationTypeID>1</creationTypeID>
    <specificPaymentData>
        <data xsi:type="keyStringValuePair">
            <key>PaymentDescription</key>
            <value>hi</value>
        </data>
        <data xsi:type="keyStringValuePair">
            <key>PaymentDescriptionLanguageCode</key>
            <value>en</value>
        </data>
        <data xsi:type="keyIntValuePair">
            <key>ThreeDSecureCheckResult</key>
            <value>4</value>
        </data>
        <data xsi:type="keyStringValuePair">
            <key>ThreeDSecureCAVV</key>
            <value>jLRabyR3C2QaABEAAFHSuWJ7w5g=</value>
        </data>
        <data xsi:type="keyStringValuePair">
            <key>ThreeDSecureECI</key>
            <value>02</value>
        </data>
    </specificPaymentData>
    <paymentAccount>
        <specificPaymentAccountData>
            <data xsi:type="keyStringValuePair">
                <key>CardNumber</key>
                <value>5472509295772840</value>
            </data>
            <data xsi:type="keyIntValuePair">
                <key>ExpiryMonth</key>
                <value>1</value>
            </data>
            <data xsi:type="keyIntValuePair">
                <key>ExpiryYear</key>
                <value>2020</value>
            </data>
        </specificPaymentAccountData>
    </paymentAccount>
</initiatePaymentRequest>

Example initiatePaymentResponse (AppleECMCDeposit):

<initiatePaymentResponse xmlns="http://www.cqrpayments.com/PaymentProcessing" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <payment xsi:type="paymentWithPaymentAccount">
        <merchantID>KalixaAcceptDEMO</merchantID>
        <shopID>KalixaAcceptDEMO</shopID>
        <paymentMethod>
            <key>300</key>
            <value>AppleECMCDeposit</value>
        </paymentMethod>
        <merchantTransactionID>9d9f2bd1-bdc0-4746-b1ac-gh34hywas</merchantTransactionID>
        <paymentID>2ed50134-3e97-4201-bb9d-8d6b3a5dbb15</paymentID>
        <userID>usertsani</userID>
        <paymentProvider>
            <key>92</key>
            <value>CQRUK</value>
        </paymentProvider>
        <amount currencyCode="EUR">10</amount>
        <creationType>
            <key>1</key>
            <value>User</value>
        </creationType>
        <userIP>127.0.0.1</userIP>
        <state>
            <id>9b762bd0-e719-4e2c-ae06-2aed647459cd</id>
            <definition>
                <key>13</key>
                <value>AuthorisedByProvider</value>
            </definition>
            <createdOn>2019-03-05T09:06:40.6181652Z</createdOn>
            <description>Approved or completed successfully</description>
            <paymentStateDetails>
                <detail xsi:type="keyStringValuePair">
                    <key>ProviderResponseCode</key>
                    <value>0</value>
                </detail>
                <detail xsi:type="keyStringValuePair">
                    <key>ApprovalCode</key>
                    <value>947103</value>
                </detail>
            </paymentStateDetails>
        </state>
        <isExecuted>true</isExecuted>
        <baseAmount currencyCode="EUR">10</baseAmount>
        <paymentDetails>
            <detail xsi:type="keyStringValuePair">
                <key>AccountBalanceCurrencyCode</key>
                <value>EUR</value>
            </detail>
            <detail xsi:type="keyDecimalValuePair">
                <key>AccountBalanceAmount</key>
                <value>150.01</value>
            </detail>
            <detail xsi:type="keyStringValuePair">
                <key>ProviderExternalID</key>
                <value>11339815</value>
            </detail>
        </paymentDetails>
        <paymentAccount>
            <paymentAccountID>a5915277-2aac-4d34-98d3-5363baa32f59</paymentAccountID>
            <details>
                <detail xsi:type="keyStringValuePair">
                    <key>MaskedNumber</key>
                    <value>************2840</value>
                </detail>
                <detail xsi:type="keyStringValuePair">
                    <key>AccountOwnerToken</key>
                    <value>d61b3c8d-9c70-415d-b2c5-5bc927a4b52e</value>
                </detail>
                <detail xsi:type="keyIntValuePair">
                    <key>ExpiryMonth</key>
                    <value>1</value>
                </detail>
                <detail xsi:type="keyIntValuePair">
                    <key>ExpiryYear</key>
                    <value>2020</value>
                </detail>
                <detail xsi:type="keyStringValuePair">
                    <key>HolderName</key>
                    <value>TEST1</value>
                </detail>
                <detail xsi:type="keyStringValuePair">
                    <key>CardType</key>
                    <value>Mastercard</value>
                </detail>
            </details>
        </paymentAccount>
    </payment>
</initiatePaymentResponse>

Notifications

The notifications are sent according the card payment methods' integration manual. (see Card Payments)

Provider status codes

https://developer.apple.com/documentation/apple_pay_on_the_web/apple_pay_js_api/apple_pay_status_codes