Flow of Apple Pay In-App Transactions Processed Using `Cybersource` Decryption {#applepay-inapp-txn-cybs-decrypt}
=================================================================================================================

This diagram illustrates the flow of in-app transaction processing using `Cybersource` decryption.

#### Figure:

In-App Transaction Processing with `Cybersource` Decryption  
![In-App Processing with non-Merchant Decryption](/content/dam/new-documentation/documentation/en-us/topics/payments-processing/card-processing/applepay/images/api-method.png/jcr:content/renditions/original)

1. When the customer chooses to pay with Apple Pay, you use the Apple PassKit Framework to request the encrypted payment data from Apple.
2. Apple uses the Secure Element to create a *payment token* and encrypt the token's *payment data* before it sends your application.
   * The payment token is the `PKPaymentToken` structure.
   * The payment data is the paymentData field of the `PKPaymentToken` structure.
3. You forward the encrypted payment data to your order management system.
4. Using the `Cybersource` API, you submit the authorization request. In the encryptedPayment_data field, include the Base64-encoded value that you obtained from the paymentData field of the `PKPaymentToken` structure.
5. `Cybersource` decrypts the payment data and forwards the information to the payment network, which includes your processor and the relevant payment card company. You must use the ` Business Center ` or one of the ` Cybersource ` API services to capture, credit, or void the authorization.

