Table of Contents

Appley Pay Using XML


Apple Pay Web helps users quickly and easily complete purchases on Apple Devices with the Safari browser, using cards stored in your Apple Wallet.

Availability

Apple Pay is enabled on the WorldNet for TSYS Saratoga and Elavon Processors only, and only customers from the following countries can use Apple Pay to make a transaction:

Integrating

In this integration method you ned to implement a few steps:

Step 01: Certificate Setup

To process apple pay payments, you will need to set up the Apple Pay Certificates on your WorldNet Selfcare Terminal. To do this, follow the instructions on Apple Pay Certificate settings.


Step 02: Integrate the Apple Pay JS API to your website

The merchant’s developer team will need to implement the Apple Pay JS API into the merchant website in order to retrieve the customers (encrypted) card details (to be informed as APPLEPAYLOAD).

Note that when specifying the version for your apple pay session, you should use version 3.

Example:

    const session = new ApplePaySession(3, yourPaymentRequest);


Step 03: Send Payment Request

After you’ve retrieved the Apple Payload, convert the data to Hexadecimal, place it in the XML Payment Request in the APPLEPAYLOAD tag, and send the XML Payment Request to our servers as normal.

Consult the XML Payment Features for details on the URL for the request and other body fields too. Using the example below (change the data inside the tags) shows you how to perform a simple transaction using apple pay.

<PAYMENT>
   <ORDERID>5345435</ORDERID>
   <TERMINALID>161007</TERMINALID>
   <AMOUNT>66.0</AMOUNT>
   <DATETIME>05-01-2017:11:04:55:055</DATETIME>
   <APPLEPAYLOAD>7b0d0a2020227368697070696e67436f6e74616374223a207b0d0a2020202022656d61696c41646472657373223a20226578616d706c6540776f726c646e65747470732e636f6d222c0d0a202020202266616d696c794e616d65223a2022222c0d0a2020202022676976656e4e616d65223a2022222c0d0a202020202270686f6e6574696346616d696c794e616d65223a2022222c0d0a202020202270686f6e65746963476976656e4e616d65223a2022220d0a20207d2c0d0a202022746f6b656e223a207b0d0a20202020227061796d656e7444617461223a207b0d0a20202020276c6a59544d7559334a734d41344741315564447745422f775145417749486744415042676b71686b694739324e6b42683045416755414d416f4743437147534d343942414d4341306b414d4559434951446148474f75692b583254343452364756704e376d326e456372365436734d6a4f685a354e75536f316567774968414c31612b2f68703838444b4a3073763365543346785763733731786d624...... (etc it's quite long)</APPLEPAYLOAD>
   <CARDTYPE>APPLEPAY</CARDTYPE>
   <CARDHOLDERNAME>John Junior Jameson</CARDHOLDERNAME>
   <HASH>2db545a97060c95c33bd2844418ff6e7</HASH>
   <CURRENCY>USD</CURRENCY>
   <TERMINALTYPE>2</TERMINALTYPE>
   <TRANSACTIONTYPE>7</TRANSACTIONTYPE>
  <POSTCODE>12345</POSTCODE>
</PAYMENT>


Variations of this request are possible, but for that, consult the complete reference for a payment at the XML Payment Features page and don't forget that the APPLEPAYLOAD tag replaces the TRACKDATA (for transactions using cards) or CARDNUMBER (for transctions using Secure Token) tags.