Developer Portal

Apple Pay® Integration Guide

This document provides a guide to integrating Apple Pay into your web applications. Apple Pay provides a secure, wallet-based payment method for your users. PaywayWS provides the RESTful web service with which you will interact to implement your Apple Pay interface. The actual integration is done in a JavaScript that we provide to you and you can customize to your needs.

Download pdf

1 Introduction

This document provides a guide to integrating Apple Pay into your web applications. Apple Pay provides a secure, wallet-based payment method for your users. PaywayWS provides the RESTful web service with which you will interact to implement your Apple Pay interface. The actual integration is done in a JavaScript that we provide to you and you can customize to your needs.

1 Apple Pay and 3DSecure

To use Apple Pay, a user must register a credit card in the wallet on their Apple device. When this process is complete, the card is registered on a 3DSecure token server and the related account number and OnlinePaymentCryptogram is stored securely on the phone. Note that the account number on the wallet entry is not the same as the credit card account number. The data from the wallet on the Apple device is what Payway® sends to the card processor. The processor then interacts with the token server to acquire the original credit card PAN, and the transaction is processed.

4 Managing Payway Transactions

The Payway Apple Pay integration uses the PaywayWS RESTful API to validate Apple Pay merchants and perform Apple Pay transactions. To manage your transactions, you can use PaywayWS requests. These include reading transactions and updating user accounts where needed. Reports and other payment management functionality is provided by the Payway web application.

6 Apple® Inc. Requirements for Apple Pay

Apple has requirements for the look and feel of the button, placement of the button, and interaction with the payment sheet. Refer to Apple’s web site for integration guides including Apple requirements on presenting the Apple Pay button.

https://developer.apple.com/design/human-interface-guidelines/apple-pay/overview/buttons-and-marks/

5 Sample Application

There is a sample application in the form of .jsp pages and a JavaScript. The following files constitute the sample application. The files are commented on to explain each step and indicate where you can customize the JavaScript for your needs.

 

File Description
Cart.jsp Simple shopping cart page containing amount and transaction type specification (authorize, sale, credit).
Checkout.jsp Payment page including Apple Pay button. This is where the queue transaction requests happen, sending the transaction information to PaywayWS. This page Includes calls to the JavaScript to execute the payment
TransactionResults.jsp This page simply presents the result of the payment, the PaywayWS code and any error message that was returned to the browser.
TransactionDetails.jsp Optional page that requests all payment details. Note this is executed from the host application server to PaywayWS, NOT from the client browser.
PaywayApple.js Where the Apple Pay merchant validation and transaction are completed. This is the JavaScript you can modify to suit your application needs.
PaywayApple.css Styles for the Apple Pay button.

 

 

Subscribe

Every post in your inbox