Submitting the Apple Pay PKPaymentToken in a cnpAPI Message

In this scenario, you submit the Apple Pay PKPaymentToken to the Worldpay eCommerce platform using a new cnpAPI structure (see applepay), typically from your server. As with the previous scenario, Worldpay decrypts the PKPaymentToken from Apple Pay using the private key.

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-9 Data/Transaction Flow with Direct Submission of PKPaymentToken via cnpAPI.

  1. Your mobile application forwards the PKPaymentToken from Apple Pay, along with other normal information from the transaction (such as Bill To and Ship To Address), to your order processing server.

  2. You do not decrypt the PKPaymentToken, but rather forward the data to Worldpay in the Authorization/Sale transaction using the cnpAPI <applepay> element structure instead of <card> (Server-side API submit) and setting the <orderSource> element to applepay.

  3. Using the private key retained by Worldpay, we decrypt the PKPaymentToken and submit the transaction with the appropriate information to the card networks for approval.

  4. Worldpay sends the Approval/Decline message back to your system. This message is the standard format for an Authorization or Sale response.

  5. You return the Approval/Decline message to you mobile application.

FIGURE 1-9 Data/Transaction Flow with Direct Submission of PKPaymentToken via cnpAPI