Apple Pay Deposit (Browser-based flow)

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 method ID is covered in this section:

IDNameCredit/Debit State

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

State Diagram


Redirect Integration

Currently not supported.

Backend2Backend Integration

ApplePay integration in PXP Financial PaymentService requires 2 operations:

1. Initiate new ApplePay session - a secured signed request is performed (using Merchant Identity certificate) against Аpple API and a new ApplePay session is triggered.

To initiate an ApplePay deposit the initiatePayment web method should be invoked. The following table contains the fields to be sent in specificPaymentData section of the request:

key (value type, account type, required)value
(string, required)
Validation url for ApplePay session. This is the url passed on the client side inside onvalidatemerchant callback.
(string, requried)
Merchant's domain name registered for applePay with Apple.
(string, requried)
Text describing the deposit method
(string, requried)
Two letter language: ex. "en"

Example initiatePaymentRequest:

<?xml version="1.0" encoding="utf-8"?>
<initiatePaymentRequest xmlns:xsd="" xmlns:xsi="" xmlns="">
      <paymentMethodID>292</paymentMethodID> <!-- AppleCardDeposit -->
      <amount currencyCode="EUR">10.00</amount>
         <data xsi:type="keyStringValuePair">
            <!--https://url-from-client-side-applePaySession.onvalidatemerchant-callback -->
         <data xsi:type="keyStringValuePair">
            <!--##Registered apple pay domain name##-->
          <data xsi:type="keyStringValuePair">
			<value>Apple visa deposit</value>
		<data xsi:type="keyStringValuePair">

Example initiatePaymentResponse:

<initiatePaymentResponse xmlns="" xmlns:xsd="" xmlns:xsi="">
    <payment xsi:type="paymentWithPaymentAccount">
        <amount currencyCode="EUR">10.00</amount>
                <detail xsi:type="keyStringValuePair">
        <baseAmount currencyCode="EUR">10</baseAmount>
            <detail xsi:type="keyStringValuePair">



The detail DeviceFingerprintingSessionID is needed for the client to initiate client side ApplePaySession.completeMerchantValidation(ApplePaySessionObjectValue) against Apple API. Value is a JSON object string.

2. Process ApplePay token - after the user authorizes the payment a payment payload with encrypted token is received from Apple. Here 4 sub-operations are performed:

  • Check the validity of the token (signature validation and other security aspects);
  • Decrypt (using Payment Processing Certificate’s private key) device specific payment card information;
  • Map AppleCardDeposit payment method to PXP Financial specific card payment method - AppleVisa Deposit, AppleECMCDeposit, etc.
  • Authorize the actual card payment - in this operation an actual card payment like AppleVisa Deposit, AppleECMCDeposit etc. is created.


The initial payment method AppleCardDeposit is changed

  • NOTE: The initial payment method AppleCardDeposit is changed to the actual card payment method after operation 2 is finalized. New card payment methods are created specifically for ApplePay for existing card deposits like:
    Visa Deposit - AppleVisaDeposit (Payment Method ID 298)
    ECMC Deposit - AppleECMCDeposit (Payment Method ID 300)
    Maestro Deposit - AppleMaestroDeposit (Payment Method ID 364)
    Discover Deposit - AppleDiscoverDeposit (Payment Method ID 391)
    Amex Deposit - Apple AMEX Deposit (Payment Method ID 397)

The new payment method replaced AppleCardDeposit after processing the token. The card payment method has the same flow as the standard card deposit payment methods - authorization, capturing and settlement.

For this operation the executePaymentAction web method should be invoked.
The following table contains executePaymentActionRequest fields:

field (type, required)description
(string, required)
Action that is executed - Process (fixed value 260307)
(string, required)
Key from actionData key-value collection which is used for transporting the ApplePay Token Payload. The Payload is encoded as Base64.

Example executePaymentActionRequest:

<?xml version="1.0" encoding="utf-8"?>
	<actionID>260307</actionID> <!-- Process -->
		<data xsi:type="keyStringValuePair">
		      	  <!-- UTF8 JSON  ApplePay payload string encoded as Base64  -->

Example executePaymentActionResponse:

<?xml version="1.0" encoding="utf-8"?>
<executePaymentActionResponse xmlns="" xmlns:xsd="" xmlns:xsi="">
		<result xsi:type="keyStringValuePair">
			<value><!-- ID of an actual card deposit that will be used for ApplePay --></value>  		
		<result xsi:type="keyStringValuePair">
		<result >
		<result xsi:type="keyStringValuePair">
        <result xsi:type="keyStringValuePair">

State Diagram after the change of the payment method:



No notification are sent until the payment is with payment method ApplePay Deposit. After changing the payment method the notifications are sent according the card payment methods' integration manual. (see Card Payments Notifications)

Provider status codes

[Apple Status code] (


Apple JavaScript documentation