Apple Pay Integrations and Payload Decryption Methods
In response to a payment request,
Apple Pay returns an encrypted payload that contains sensitive payment information.
Two methods can be used to extract and decrypt the payment information,
and both methods support Apple Pay in-app and web transactions.
- With,CybersourcedecryptionCybersourcemanages the generation of the payment encryption key and the decryption of the Apple Pay response.This method reduces the exposure of sensitive payment data to your system.
- Withmerchant decryption, you manage both the payment encryption key generation and the decryption of the Apple Pay response.
The remainder of this section summarizes the flow of Apple Pay transaction processing for
each decryption method.
Flow of Apple Pay In-App Transactions Processed Using Cybersource Decryption
Cybersource
DecryptionThis diagram illustrates the flow of in-app transaction processing
using
Cybersource
decryption.- When the customer chooses to pay with Apple Pay, you use the Apple PassKit Framework to request the encrypted payment data from Apple.
- Apple uses the Secure Element to create apayment tokenand encrypt the token’spayment databefore it sends your application.
- The payment token is thePKPaymentTokenstructure.
- The payment data is thepaymentDatafield of thePKPaymentTokenstructure.
- You forward the encrypted payment data to your order management system.
- Using theCybersourceAPI, you submit the authorization request. In theencryptedPayment_datafield, include the Base64-encoded value that you obtained from thepaymentDatafield of thePKPaymentTokenstructure.
- Cybersourcedecrypts the payment data and forwards the information to the payment network, which includes your processor and the relevant payment card company.You must use theBusiness Centeror one of theCybersourceAPI services to capture, credit, or void the authorization.
Flow of Apple Pay In-App Transactions Processed Using Merchant Decryption
This diagram illustrates the flow of in-app transaction processing
using merchant decryption.
- When the customer chooses to pay with Apple Pay, you use the Apple PassKit Framework to request the encrypted payment data from Apple.
- Apple uses the Secure Element to create apayment tokenand encrypt the token’spayment databefore it sends your application.
- The payment token is thePKPaymentTokenstructure.
- The payment data is thepaymentDatafield of thePKPaymentTokenstructure.
- You forward the encrypted payment data to your order management system to decrypt. For information on decryption, see the Payment Token Format Reference article in the Apple Pay Developer Documentation.
- Using theCybersourceAPI, you submit the authorization request and include the decrypted payment data.
- Cybersourceforwards the information to the payment network, which includes your processor and the relevant payment card company.You must use theBusiness Centeror one of theCybersourceAPI services to capture, credit, or void the authorization.
Flow of Apple Pay Web Transactions Using Cybersource Decryption
Cybersource
Decryption- When the customer chooses to pay with Apple Pay, you use the Apple Pay JavaScript to request the encrypted payment data from Apple.
- Apple uses the Secure Element to create apayment tokenand encrypt the token’spayment databefore it sends your application using theonpaymentauthorizedevent handler.
- The payment token is theApplePayPaymentTokenstructure.
- The payment data is thepaymentDatafield of theApplePayPaymentTokenstructure.
For more information, see Apple Pay on the Web Interactive Demo. - You forward the encrypted payment data to your order management system.
- Using theCybersourceAPI, you submit the authorization request. In theencryptedPayment_datafield, include the Base64-encoded value obtained from thepaymentDatafield of theApplePayPaymentTokenstructure.
- Cybersourcedecrypts the payment data and forwards the information to the payment network, which includes your processor and the relevant payment card company.Use theBusiness Centeror one of theCybersourceAPI services to capture, credit, or void the authorization.
Flow of Apple Pay Web Transactions Using Merchant
Decryption
- When the customer chooses to pay with Apple Pay, you use the Apple Pay JavaScript to request the encrypted payment data from Apple.
- Apple uses the Secure Element to create apayment tokenand encrypt the token’spayment databefore it sends your application using theonpaymentauthorizedevent handler.
- The payment token is theApplePayPaymentTokenstructure.
- The payment data is thepaymentDatafield of theApplePayPaymentTokenstructure.
For more information, see Apple Pay on the Web Interactive Demo. - You forward the encrypted payment data to your order management system to decrypt. For information on decryption, see the Payment Token Format Reference article in the Apple Pay Developer Documentation.
- Using theCybersourceAPI, you submit the authorization request and include the decrypted payment data. See Authorization Service.
- Cybersourceforwards the information to the payment network, which includes your processor and the relevant payment card company.Use theBusiness Centeror one of theCybersourceAPI services to capture, credit, or void the authorization.