Using the Worldpay Mobile API for Apple Pay
In this scenario, your native iOS application performs an HTTPS POST of the Apple Pay PKPaymentToken using the Worldpay Mobile API for Apple Pay. From this point forward, your handling of the transaction is identical to any other PayPage transaction. The PayPage server returns a PayPage Registration ID and your Mobile App (or server) constructs the cnpAPI transaction using that ID.
Step 1, Step 2, and Step 3 are the same as those outlined in Overview of Apple Pay Operation.
The process after Step 3 is detailed below and in FIGURE 1-8 Data/Transaction Flow using the Worldpay Mobile API for Apple Pay.
-
Your native iOS application sends the PKPaymentToken to our secure server via an HTTPS POST and eProtect returns a Registration ID. Please refer to the Worldpay eComm eProtect Integration Guide for additional information.
-
Your native iOS application forwards the transaction data along with the Registration ID to your order processing server, as it would with any eProtect transaction.
-
Your server constructs/submits a standard cnpAPI Authorization/Sale transaction using the Registration ID, setting the
<orderSource>
element toapplepay
. -
Using the private key, Worldpay decrypts the PKPaymentToken associated with the Registration ID and submits the transaction with the appropriate information to the card networks for approval.
-
Worldpay sends the Approval/Decline message back to your system. This message is the standard format for an Authorization or Sale response and includes the Worldpay token.
-
You return the Approval/Decline message to your mobile application.
FIGURE 1-8 Data/Transaction Flow using the Worldpay Mobile API for Apple Pay