On This Page

{#jumplink-list}  
[Markdown](/content/cybsdeveloper2021/amer/en/docs/cybs/en-us/apple-pay/developer/ctv/so/applepay.md)

Recent Revisions to This Document {#applepay-doc-revisions}
===========================================================

24.02
-----

Clarified Apple Pay requirements. See [Requirements for Using Apple Pay](/content/cybsdeveloper2021/amer/en/docs/cybs/en-us/apple-pay/developer/ctv/so/applepay/applepay-intro/applepay-requirements.md "").

24.01
-----

Support for the mada Pay mobile app in Saudi Arabia
:
For `Visa Platform Connect` only, Apple Pay supports mada Pay mobile app transactions for these payment cards, which are issued in the Kingdom of Saudi Arabia:

    * mada
    * Mastercard co-badged with mada
    * Visa co-badged with mada

:
For Apple Pay transactions on the mada Pay mobile app, specify the mada card type (`060`) in the card_cardType Simple Order API field.

23.04
-----

This revision contains only editorial changes and no technical updates.

23.03
-----

This revision contains only editorial changes and no technical updates.

23.02
-----

This revision contains only editorial changes and no technical updates.

About This Guide {#applepay-about-guide}
========================================

This section describes the audience and purpose of this guide and the conventions used in this guide.

Audience and Purpose
--------------------

This document is written for merchants who want to use Apple Pay in an iOS application and use information from Apple to process payments through `Cybersource`. This document provides an overview for integrating Apple and `Cybersource` services into an order management system.

Conventions
-----------

The following special statement is used in this document:

> An *Important* statement contains information essential to successfully completing a task or learning a concept.

Customer Support
----------------

For support information about any service, visit the Support Center:  
<http://support.visaacceptance.com>

VISA Platform Connect: Specifications and Conditions for Resellers/Partners {#vpc-acquirer-reseller-disclaimer}
===============================================================================================================

The following are specifications and conditions that apply to a Reseller/Partner enabling its merchants through Cybersource for Visa Platform Connect ("VPC") processing. Failure to meet any of the specifications and conditions below is subject to the liability provisions and indemnification obligations under Reseller/Partner's contract with Visa/Cybersource.

1. Before boarding merchants for payment processing on a VPC acquirer's connection, Reseller/Partner and the VPC acquirer must have a contract or other legal agreement that permits Reseller/Partner to enable its merchants to process payments with the acquirer through the dedicated VPC connection and/or traditional connection with such VPC acquirer.
2. Reseller/Partner is responsible for boarding and enabling its merchants in accordance with the terms of the contract or other legal agreement with the relevant VPC acquirer.
3. Reseller/Partner acknowledges and agrees that all considerations and fees associated with chargebacks, interchange downgrades, settlement issues, funding delays, and other processing related activities are strictly between Reseller and the relevant VPC acquirer.
4. Reseller/Partner acknowledges and agrees that the relevant VPC acquirer is responsible for payment processing issues, including but not limited to, transaction declines by network/issuer, decline rates, and interchange qualification, as may be agreed to or outlined in the contract or other legal agreement between Reseller/Partner and such VPC acquirer.

DISCLAIMER: NEITHER VISA NOR CYBERSOURCE WILL BE RESPONSIBLE OR LIABLE FOR ANY ERRORS OR OMISSIONS BY THE Visa Platform Connect ACQUIRER IN PROCESSING TRANSACTIONS. NEITHER VISA NOR CYBERSOURCE WILL BE RESPONSIBLE OR LIABLE FOR RESELLER/PARTNER BOARDING MERCHANTS OR ENABLING MERCHANT PROCESSING IN VIOLATION OF THE TERMS AND CONDITIONS IMPOSED BY THE RELEVANT Visa Platform Connect ACQUIRER.

Introduction to Apple Pay {#applepay-intro}
===========================================

You can use the `Cybersource` platform to process and manage Apple Pay transactions.  
Apple Pay is a digital payment solution that allows customers to maake secure and convenient transactions using their Apple devices. By adding Apple Pay to your web page, you can offer your customers a faster and easier way to pay online, without requiring them to enter their card details or shipping information. Apple Pay also reduces the exposure of sensitive payment data to your system, as the payment information is encrypted and tokenized by Apple.

Requirements for Using Apple Pay {#applepay-requirements}
=========================================================

In order to use the `Cybersource` platform to process Apple Pay transactions, you must have these things:

* A `Cybersource` account. If you do not already have a `Cybersource` account, contact your local `Cybersource` sales representative.
* A [live merchant account](https://ebc2.cybersource.com/ebc2/registration/external "") with a [supported processor](/content/cybsdeveloper2021/amer/en/docs/cybs/en-us/apple-pay/developer/ctv/so/applepay/applepay-intro/applepay-processors.md "") to handle processing the transactions.
* An *Admin* or *Team Agent* user of the [Apple Pay Developer](https://developer.apple.com/apple-pay/ "") account to initiate the transactions.
  {#applepay-requirements_ul_scm_kwb_s4b}

> Apple Pay relies on authorizations with payment network tokens. You can sign up for Apple Pay only when these statements are true:
>
> * Your processor supports payment network tokens.
> * ` Cybersource ` supports payment network tokens with your processor.
>
> {#applepay-requirements_ul_ugr_qxb_s4b}  
> If one of these statements is not true, you must take one of these actions before you can sign up for Apple Pay:
>
> * Obtain a new merchant account with a processor that supports payment network tokens.
> * Wait until your processor supports payment network tokens.
>   {#applepay-requirements_ul_tf5_txb_s4b}

Supported Card Types and Optional Features {#applepay-processors}
=================================================================

This table explains which card types and optional features are supported for each processor.  
Merchant-initiated transactions, multiple partial captures, and subsequent authorizations are described in [Authorizations with Payment Network Tokens](https://docs.cybersource.com/content/dam/new-documentation/documentation/en/auths-pnt/developer/all/so/auths-pnt-so.pdf ""). Recurring payments and split shipments are described in [Credit Card Services Optional Features](https://docs.cybersource.com/content/dam/new-documentation/documentation/en/credit-card/supplement/credit-card-services-optional-features-so.pdf "").

|                                                                                    Processor                                                                                     |                                                                                                                        Card Types                                                                                                                        |                                 Optional Features                                  |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------|
| `Visa Platform Connect` Supported acquirers: * Australia and New Zealand Banking Group Limited (ANZ) * CitiBank Singapore Ltd. * Global Payments Asia Pacific * Vantiv * Westpac | * JCB * mada cards debit cards and prepaid cards issued in the Kingdom of Saudi Arabia * Mastercard (including mada co-badged cards issued in the Kingdom of Saudi Arabia) * Visa (including mada co-badged cards issued in the Kingdom of Saudi Arabia) | * Merchant-Initiated transactions * Multiple partial captures * Recurring payments |

Payment Processors {#cc-payments-processing-requirements}
=========================================================

Payment processors connect with acquirers. Before you can accept payments, you must register with a payment processor. An acquirer might require you to use a payment processor with an existing relationship with the acquirer.  
Your payment processor assigns one or more merchant IDs (MIDs) to your business. These unique codes identify your business during payment transactions.  
This table lists the processors and corresponding card types that are supported for payment services. Only the card types explicitly listed here are supported.

|    Payment Processor    |                                                                                                                                Supported Card Types                                                                                                                                |                                                                     Notes                                                                      |
|-------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------|
| `Visa Platform Connect` | Different card types are supported for each `Visa Platform Connect`acquirer. See [Visa Platform Connect Acquirers](/content/cybsdeveloper2021/amer/en/docs/cybs/en-us/apple-pay/developer/ctv/so/applepay/applepay-intro/payments-intro-processors/payments-intro-ctv-acqs.md ""). | The Visa Electron card type is processed the same way that the Visa debit card is processed. Use card type value 001 (Visa) for Visa Electron. |
[Payment Processors and Supported Card Types]

`Visa Platform Connect` Acquirers {#payments-intro-ctv-acqs}
============================================================

The following acquirers and card types are supported for `Visa Platform Connect`:

| Raw Processor Name |                                                      Processor Name                                                      |                                                                                                                                                             Supported Card Types                                                                                                                                                              |
|--------------------|--------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| vdcabsa            | Absa Bank on `Visa Platform Connect`                                                                                     | Visa, Mastercard, JCB, Diners Club                                                                                                                                                                                                                                                                                                            |
| vdcagbkchina       | Agricultural Bank of China (ABC) on `Visa Platform Connect`                                                              | Visa, Mastercard, American Express, JCB, Diners Club > ` Visa Platform Connect ` cannot process domestic transactions in China. ` Visa Platform Connect ` can process only cross-border transactions. A crossborder transaction is a transaction for which the payment card is issued in another country and accepted by a merchant in China. |
| networkintluae     | Ahli United Bank in Bahrain, BLOM Bank, Network International                                                            | Visa, Mastercard, JCB, Diners Club                                                                                                                                                                                                                                                                                                            |
| vdcaaib            | Arab African International Bank (AAIB) on `Visa Platform Connect`                                                        | Visa, Mastercard, JCB                                                                                                                                                                                                                                                                                                                         |
| vdcacbvietnam      | Asia Commercial Bank (ACB) on `Visa Platform Connect`                                                                    | Visa, Mastercard, JCB                                                                                                                                                                                                                                                                                                                         |
| vdcasb             | Auckland Savings Bank (ASB) on `Visa Platform Connect`                                                                   | Visa, Mastercard                                                                                                                                                                                                                                                                                                                              |
| vdcanzbank         | Australia and New Zealand Banking Group Ltd. (ANZ) on `Visa Platform Connect`                                            | Visa, Mastercard                                                                                                                                                                                                                                                                                                                              |
| vdcaxis            | Axis Bank Ltd. of India on `Visa Platform Connect`                                                                       | Visa, Mastercard, Diners Club                                                                                                                                                                                                                                                                                                                 |
| vdcbanamex         | Banco Nacional de México (Banamex) on `Visa Platform Connect`                                                            | Visa, Mastercard, American Express, Discover, JCB, Diners Club                                                                                                                                                                                                                                                                                |
| vdcbcosafrabr      | Banco Safra on `Visa Platform Connect`                                                                                   | Visa, Mastercard, American Express                                                                                                                                                                                                                                                                                                            |
| vdcbbl             | Bangkok Bank Ltd. on `Visa Platform Connect`                                                                             | Visa, Mastercard, JCB                                                                                                                                                                                                                                                                                                                         |
| vdcbankmuscat      | Bank Muscat of Oman on `Visa Platform Connect`                                                                           | Visa, Mastercard, American Express, Diners Club                                                                                                                                                                                                                                                                                               |
| vdcbay             | Bank of Ayudhya (BAY) on `Visa Platform Connect`                                                                         | Visa, Mastercard, JCB                                                                                                                                                                                                                                                                                                                         |
| vdcbocmacau        | Bank of China in Macau on `Visa Platform Connect`                                                                        | Visa, Mastercard                                                                                                                                                                                                                                                                                                                              |
| vdcbocom           | Bank of Communications on `Visa Platform Connect`                                                                        | Visa, Mastercard                                                                                                                                                                                                                                                                                                                              |
| vdcbksinarmasid    | Bank Sinarmas (Omise Ltd.) on `Visa Platform Connect`                                                                    | Visa, Mastercard                                                                                                                                                                                                                                                                                                                              |
| vdcbcellao         | Banque Pour Le Commerce Exterieur Lao (BCEL) on `Visa Platform Connect`                                                  | Visa, Mastercard, American Express, JCB                                                                                                                                                                                                                                                                                                       |
| vdcbarclaysbw      | Barclays Bank Botswana on `Visa Platform Connect`                                                                        | Visa, Mastercard, American Express                                                                                                                                                                                                                                                                                                            |
| vdcbarclaysmu      | Barclays Bank Mauritius Ltd. on `Visa Platform Connect`                                                                  | Visa, Mastercard, American Express                                                                                                                                                                                                                                                                                                            |
| vdcbarclaysghtzug  | Barclays Bank of Ghana Ltd., Barclays Bank of Tanzania Ltd., and Barclays Bank of Uganda Ltd. on `Visa Platform Connect` | Visa, Mastercard, American Express                                                                                                                                                                                                                                                                                                            |
| vdcbarclayske      | Barclays Bank of Kenya on `Visa Platform Connect`                                                                        | Visa, Mastercard, American Express                                                                                                                                                                                                                                                                                                            |
| vdcbarclayszm      | Barclays Bank of Zambia on `Visa Platform Connect`                                                                       | Visa, Mastercard, American Express                                                                                                                                                                                                                                                                                                            |
| vdcbarclayssc      | Barclays Bank Seychelles on `Visa Platform Connect`                                                                      | Visa, Mastercard, American Express                                                                                                                                                                                                                                                                                                            |
| vdcbccardkr        | BC Card Co., Ltd. on `Visa Platform Connect`                                                                             | Visa, Mastercard, American Express, JCB                                                                                                                                                                                                                                                                                                       |
| vdccubtw           | Cathay United Bank (CUB) on `Visa Platform Connect`                                                                      | Visa, Mastercard, JCB                                                                                                                                                                                                                                                                                                                         |
| vdccitihkmo        | Citibank Hongkong and Macau on `Visa Platform Connect`                                                                   | Visa, Mastercard, Diners Club, JCB                                                                                                                                                                                                                                                                                                            |
| vdccitimy          | Citibank Malaysia on `Visa Platform Connect`                                                                             | Visa, Mastercard                                                                                                                                                                                                                                                                                                                              |
| vdccitisg          | Citibank Singapore Ltd. on `Visa Platform Connect`                                                                       | Visa, Mastercard, JCB                                                                                                                                                                                                                                                                                                                         |
| vdccbq             | Commercial Bank of Qatar on `Visa Platform Connect`                                                                      | Visa, Mastercard, American Express, JCB, Diners Club                                                                                                                                                                                                                                                                                          |
| vdccredimax        | CrediMax (Bahrain) on `Visa Platform Connect`                                                                            | Visa, Mastercard, American Express, JCB, Diners Club                                                                                                                                                                                                                                                                                          |
| vdcctbc            | CTBC Bank Ltd. on `Visa Platform Connect`                                                                                | Visa, Mastercard, JCB                                                                                                                                                                                                                                                                                                                         |
| vdcfdmsbn          | First Data Merchant Solutions in Brunei on `Visa Platform Connect`                                                       | Visa, Mastercard, JCB                                                                                                                                                                                                                                                                                                                         |
| vdcfdmshk          | First Data Merchant Solutions in Hong Kong on `Visa Platform Connect`                                                    | Visa, Mastercard, JCB                                                                                                                                                                                                                                                                                                                         |
| vdcfdmsmy          | First Data Merchant Solutions in Malaysia on `Visa Platform Connect`                                                     | Visa, Mastercard, JCB                                                                                                                                                                                                                                                                                                                         |
| vdcfdmssg          | First Data Merchant Solutions in Singapore on `Visa Platform Connect`                                                    | Visa, Mastercard, JCB                                                                                                                                                                                                                                                                                                                         |
| vdcfnb             | FirstRand Bank on `Visa Platform Connect`                                                                                | Visa, Mastercard, American Express, Diners Club                                                                                                                                                                                                                                                                                               |
| vdchsbcbank        | Global Payments Asia Pacific on `Visa Platform Connect`                                                                  | Visa, Mastercard, JCB > In India, the only supported card types are Visa and Mastercard. All three card types (Visa, Mastercard, JCB) are supported in all other countries that Global Payments Asia Pacific covers.                                                                                                                          |
| vdchabibltd        | Habib Bank Ltd. (HBL) on `Visa Platform Connect`                                                                         | Visa, Mastercard, American Express, JCB, Diners Club                                                                                                                                                                                                                                                                                          |
| vdchdfc            | HDFC Bank Ltd. of India on `Visa Platform Connect`                                                                       | Visa, Mastercard, Diners Club                                                                                                                                                                                                                                                                                                                 |
| vdcimbank          | I\&M Bank on `Visa Platform Connect`                                                                                     | Visa, Mastercard                                                                                                                                                                                                                                                                                                                              |
| vdcicici           | ICICI of India on `Visa Platform Connect`                                                                                | Visa, Mastercard                                                                                                                                                                                                                                                                                                                              |
| vdckeb             | Korea Exchange Bank (KEB) on `Visa Platform Connect`                                                                     | Visa, Mastercard, JCB > ` Visa Platform Connect ` cannot process domestic transactions in Korea. ` Visa Platform Connect ` can process only cross-border transactions. A crossborder transaction is a transaction for which the payment card is issued in another country and accepted by a merchant in Korea.                                |
| vdcmashreqbk       | Mashreq on `Visa Platform Connect`                                                                                       | Visa, Mastercard, American Express, JCB, Diners Club                                                                                                                                                                                                                                                                                          |
| vdcmaybankmy       | Maybank on `Visa Platform Connect`                                                                                       | Visa, Mastercard, American Express, JCB                                                                                                                                                                                                                                                                                                       |
| vdcnbad            | National Bank of Abu Dhabi (NBAD) on `Visa Platform Connect`                                                             | Visa, Mastercard, JCB, Diners Club                                                                                                                                                                                                                                                                                                            |
| vdcnbk             | National Bank of Kuwait (NBK) on `Visa Platform Connect`                                                                 | Visa, Mastercard, Diners Club                                                                                                                                                                                                                                                                                                                 |
| vdcnacombk         | National Commercial Bank on `Visa Platform Connect`                                                                      | Visa, Mastercard, mada                                                                                                                                                                                                                                                                                                                        |
| vdcnijo            | Network International (NI) Jordan on `Visa Platform Connect`                                                             | Visa, Mastercard, American Express, JCB, Diners Club                                                                                                                                                                                                                                                                                          |
| vdcocbc            | Overseas Chinese Banking Corp (OCBC) on `Visa Platform Connect`                                                          | Visa, Mastercard                                                                                                                                                                                                                                                                                                                              |
| vdcpromerica       | Promerica in Honduras and Nicaragua on `Visa Platform Connect`                                                           | Visa, Mastercard                                                                                                                                                                                                                                                                                                                              |
| vdcbni             | PT Bank Negara Indonesia on `Visa Platform Connect`                                                                      | Visa, Mastercard                                                                                                                                                                                                                                                                                                                              |
| vdcqnbqa           | Qatar National Bank (QNB Group) on `Visa Platform Connect`                                                               | Visa, Mastercard, American Express, JCB, Diners Club                                                                                                                                                                                                                                                                                          |
| vdcsacomb          | Sacombank on `Visa Platform Connect`                                                                                     | Visa, Mastercard, JCB                                                                                                                                                                                                                                                                                                                         |
| vdcsmcc            | Sumitomo Mitsui Card Co. on `Visa Platform Connect`                                                                      | Visa                                                                                                                                                                                                                                                                                                                                          |
| vdctaishintw       | Taishin Bank Ltd. on `Visa Platform Connect`                                                                             | Visa, Mastercard, American Express, JCB                                                                                                                                                                                                                                                                                                       |
| vdcuob             | United Overseas Bank (UOB) in Singapore and Vietnam on `Visa Platform Connect`                                           | Visa, Mastercard, JCB                                                                                                                                                                                                                                                                                                                         |
| vdcuobth           | United Overseas Bank (UOB) in Thailand on `Visa Platform Connect`                                                        | Visa, Mastercard                                                                                                                                                                                                                                                                                                                              |
| vdcvantiv          | Vantiv on `Visa Platform Connect`                                                                                        | Visa, Mastercard, American Express, Discover, JCB, Diners Club                                                                                                                                                                                                                                                                                |
| vdcvietcombk       | Vietcombank on `Visa Platform Connect`                                                                                   | Visa, Mastercard, American Express, JCB, Diners Club                                                                                                                                                                                                                                                                                          |
| vdcvietin          | VietinBank on `Visa Platform Connect`                                                                                    | Visa, Mastercard, JCB, Diners Club                                                                                                                                                                                                                                                                                                            |
| vdctechcomvn       | Vietnam Technological and Commercial Joint Stock Bank (Techcombank) on `Visa Platform Connect`                           | Visa, Mastercard, American Express, JCB, Diners Club                                                                                                                                                                                                                                                                                          |
| vdcguatemala       | Visa Guatemala on `Visa Platform Connect`                                                                                | Visa                                                                                                                                                                                                                                                                                                                                          |
| vdcvisanetuy       | VisaNet Uruguay on `Visa Platform Connect`                                                                               | Visa                                                                                                                                                                                                                                                                                                                                          |
| vdcwestpac         | Westpac on `Visa Platform Connect`                                                                                       | Visa, Mastercard                                                                                                                                                                                                                                                                                                                              |
| vdcwhb             | Wing Hang Bank on `Visa Platform Connect`                                                                                | Visa, Mastercard                                                                                                                                                                                                                                                                                                                              |
| vdcwinglung        | Wing Lung Bank on `Visa Platform Connect`                                                                                | Visa, Mastercard                                                                                                                                                                                                                                                                                                                              |
[Supported `Visa Platform Connect` Acquirers and Card Types]

Apple Pay Integrations and Payload Decryption Methods {#applepay_integration_intro}
===================================================================================

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 **`Cybersource` decryption** , `Cybersource` manages 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.
* With **merchant 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 {#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.

Flow of Apple Pay In-App Transactions Processed Using Merchant Decryption {#applepay-inapp-txn-merchant-decrypt}
================================================================================================================

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

#### Figure:

In-App Transaction Processing with Merchant Decryption  
![In-App Processing with 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 to decrypt. For information on decryption, see the [Payment Token Format Reference](https://developer.apple.com/library/archive/documentation/PassKit/Reference/PaymentTokenJSON/PaymentTokenJSON.md#//apple_ref/doc/uid/TP40014929-CH8-SW1 "") article in the Apple Pay Developer Documentation.
4. Using the `Cybersource` API, you submit the authorization request and include the decrypted payment data.
5. `Cybersource` 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.

Flow of Apple Pay Web Transactions Using `Cybersource` Decryption {#applepay-web-txn-cybs-decrypt}
==================================================================================================

1. When the customer chooses to pay with Apple Pay, you use the Apple Pay JavaScript 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 using the `onpaymentauthorized` event handler.

   * The payment token is the `ApplePayPaymentToken` structure.
   * The payment data is the paymentData field of the `ApplePayPaymentToken` structure.

   For more information, see [Apple Pay on the Web Interactive Demo](https://applepaydemo.apple.com/ "").

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 obtained from the paymentData field of the `ApplePayPaymentToken` 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. Use the ` Business Center ` or one of the ` Cybersource ` API services to capture, credit, or void the authorization.

Flow of Apple Pay Web Transactions Using Merchant Decryption {#applepay-web-txn-merchant-decrypt}
=================================================================================================

1. When the customer chooses to pay with Apple Pay, you use the Apple Pay JavaScript 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 using the `onpaymentauthorized` event handler.

   * The payment token is the `ApplePayPaymentToken` structure.
   * The payment data is the paymentData field of the `ApplePayPaymentToken` structure.

   For more information, see [Apple Pay on the Web Interactive Demo](https://applepaydemo.apple.com/ "").

3. You forward the encrypted payment data to your order management system to decrypt. For information on decryption, see the [Payment Token Format Reference](https://developer.apple.com/library/archive/documentation/PassKit/Reference/PaymentTokenJSON/PaymentTokenJSON.md#//apple_ref/doc/uid/TP40014929-CH8-SW1 "") article in the Apple Pay Developer Documentation.

4. Using the `Cybersource` API, you submit the authorization request and include the decrypted payment data. See [Apple Pay Integrations and Payload Decryption Methods](/content/cybsdeveloper2021/amer/en/docs/cybs/en-us/apple-pay/developer/ctv/so/applepay/applepay-intro/applepay-integration-intro.md "").

5. `Cybersource` forwards the information to the payment network, which includes your processor and the relevant payment card company. Use the ` Business Center ` or one of the ` Cybersource ` API services to capture, credit, or void the authorization.

Configuring Apple Pay Processing {#applepay-configuring-intro}
==============================================================

A successful Apple Pay response to a payment request returns an encrypted payload that contains sensitive payment information. The payment information is extracted and decrypted using `Cybersource` decryption or merchant decryption.  
Before you can process Apple Pay transactions, you must complete these configuration tasks:

Generating and Loading a New Certificate Signing Request
:
For processing Apple Pay transactions using `Cybersource` decryption, you must first generate an Apple Pay encryption key on the business portal and load it into the Apple development portal.
:
For merchant decryption, this configuration task is not needed.

Configuring Apple Pay Response Handling
:
After the payment token is received, the transaction is finalized when you extract and decrypt the payment data. `Cybersource` decryption and merchant decryption methods consist of different configuration steps.

Generating and Loading a New Certificate Signing Request {#applepay_enrolling}
==============================================================================

This task is required in order to process Apple Pay transactions using `Cybersource` decryption. It does not apply to merchant decryption.
Follow these steps in order to configure Apple Pay in the `Cybersource` `Business Center`:

1. Log in to the `Business Center`:

   * Test: [businesscentertest.cybersource.com](https://businesscentertest.cybersource.com "")
   * Production: [businesscenter.cybersource.com](https://businesscenter.cybersource.com "")
2. On the left navigation panel, click the Payment Configuration icon.

3. Click Digital Payment Solution. The Digital Payments page appears. If you do not have the correct permissions enabled on your account, the Digital Payment Solution option does not appear on the left navigation panel.

4. Click Configure. The Apple Pay Registration panel opens.

5. Enter your Apple Merchant ID.

6. Click Generate New CSR.

7. To download your CSR, click the Download icon next to the key.

8. Follow your browser's instructions to save and open the file.

9. Complete the enrollment process by submitting your CSR to Apple.

10. For information about adding certificates to your Apple Merchant ID, refer to the Apple Pay PassKit:

    #### ADDITIONAL INFORMATION

    * In-App: [Setting Up Apple Pay](https://developer.apple.com/documentation/passkit/apple_pay/setting_up_apple_pay "")
    * Website: [Configuring Your Environment](https://developer.apple.com/documentation/apple_pay_on_the_web/configuring_your_environment "")
      {#applepay_enrolling_ul_kss_yb1_mrb}
11. Test your software by following the steps for processing a transaction.

    #### ADDITIONAL INFORMATION

    > If you are using a ` Cybersource ` test account, you must connect to the [Apple sandbox](https://developer.apple.com/apple-pay/sandbox-testing/ "") tester account and not to the Apple production system.  
    > After you complete your testing, you must create a new CSR for the ` Cybersource ` production system, and you must use that CSR for the Apple production system. Until you perform these steps, you cannot enable payments in your iOS application or website.

12. Repeat Steps 1 through 11 with your `Cybersource` production account and the Apple production account.

Configuring Apple Pay Response Handling {#applepay-web-configuring}
===================================================================

Configure one of the following decryption methods that will handle the response payload of a successful Apple Pay transaction.

1. After the payment token is received, the transaction is finalized when you extract and decrypt the payment data.
   * **`Cybersource` Decryption** :  
     This method forwards the encrypted payment data to your order management system. Use the `Cybersource` API to submit the authorization request, and include the Base64-encoded value obtained from the `paymentData` object in the encryptedPayment_data field.  
     Example of `Cybersource` decryption:

     ```
     session.onpaymentauthorized = function (event) {
         var paymentDataString = JSON.stringify(event.payment.token.paymentData);
         var paymentDataBase64 = btoa(paymentDataString);
     }
     ```
   * **Merchant Decryption** :  
     This method forwards the encrypted payment data to your order management system to decrypt. Use the `Cybersource` API to submit the authorization request and include the decrypted payment data.  
     For detailed information about decryption, see [Payment Token Format Reference](https://developer.apple.com/library/ios/documentation/PassKit/Reference/PaymentTokenJSON/PaymentTokenJSON.md#//apple_ref/doc/uid/TP40014929-CH8-SW1 "") in the Apple Developer Center.

Processing Apple Pay Transactions {#applepay_txns_intro}
========================================================

This section provides information about the different kinds of Apple Pay transactions that you can submit:

Authorization Using `Cybersource` Decryption or Merchant Decryption
:
You can request the authorization service using these decryption methods:

    * `Cybersource` decryption: Within this integration, `Cybersource` facilitates all of the encryption key generation and decryption processes associated with implementing Apple Pay. This method reduces the exposure of the sensitive payment data to your system.
    * Merchant decryption: Within this integration, you manage all aspects of the Apple Pay integration, from generation of the payment encryption keys to decryption of the Apple Pay payload response. As a merchant, you submit the Apple Pay payment token and other payment information to `Cybersource` for processing.

Authorization Reversal
:
This service uses the request ID returned from the previous authorization. An authorization reversal releases the hold that the authorization placed on the customer's credit card funds. Use this service to reverse an unnecessary or undesired authorization.

Capture
:
This service uses the request ID returned from the previous authorization. The request ID links the capture to the authorization. Use this service to transfer funds from the customer's account to your bank. The transaction typically completes in two to four days.

Sale
:
A sale is a bundled authorization and capture. Request the authorization and capture services at the same time. `Cybersource` processes the capture immediately.

Authorization Service {#applepay-auth-intro}
============================================

This section provides the information that you need for requesting the authorization service using these methods which determine the request fields that are required to request the authorization service. In addition, different request fields are required in order to request the authorization service. The type of card used to process the transaction determines which request fields are used.  
After you send the request, verify the response messages to make sure that the request was successful. A value of `ACCEPT` for the decision field indicates success.  
For information about response codes, see [Reason Codes for the Simple Order API](https://developer.cybersource.com/docs/cybs/en-us/reason-codes-so/reference/all/so/reason-codes-so/reason-codes-so.md "").

Endpoint {#applepay-auth-intro_d15e16}
--------------------------------------

Set the ccAuthService_run field to `true`.  
Send the request to `https://ics2ws.ic3.com/commerce/1.x/transactionProcessor`.

Authorizations Using `Cybersource` Decryption for JCB {#applepay-auth-cybs-intro-jcb}
=====================================================================================

This section provides the information you need in order to process an authorization using `Cybersource` decryption for JCB.

Required Fields for Authorizing a Payment Using `Cybersource` Decryption for JCB {#applepay-auth-reqfields-cybs-jcb}
====================================================================================================================

billTo_city
:

billTo_country
:

billTo_email
:

billTo_firstName
:

billTo_lastName
:

billTo_postalCode
:

billTo_state
:

billTo_street1
:

ccAuthService_run
:
Set this field to `true`.

encryptedPayment_data
:
Set this field to the Base64-encoded value obtained from the `paymentData` property of the `PKPaymentToken` object.

encryptedPayment_descriptor
:
Set this field to `RklEPUNPTU1PTi5BUFBMRS5JTkFQUC5QQVlNRU5U`.

merchantID
:

merchantReferenceCode
:

paymentSolution
:
Set this field to `001`.

purchaseTotals_currency
:

purchaseTotals_grandTotalAmount
:
Either purchaseTotals_grandTotalAmount or item_#_unitPrice must be included in the request.

requestorID
:
Set this field to your token requestor id.
:
Required for `Visa Platform Connect`.

transactionMode
:
Required only for merchants in Saudi Arabia.

Related Information {#applepay-auth-reqfields-cybs-jcb_section_awg_fx4_1yb}
---------------------------------------------------------------------------

* [API Field Reference for the Simple Order API](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/api-fields-so-intro.md "")
  {#applepay-auth-reqfields-cybs-jcb_ul_bwg_fx4_1yb}

Optional Fields for Authorizing a Payment for Apple Pay Transactions {#appplepay_auth_opt_fields_cybs_decrypt}
==============================================================================================================

You can include these optional fields in a request for an authorization:

paymentNetworkToken_assuranceMethod
:
Set this field to the tokenization confidence level that is assigned by the token service provider.

Related Information {#appplepay_auth_opt_fields_cybs_decrypt_section_ynd_dx4_1yb}
---------------------------------------------------------------------------------

* [API Field Reference for the Simple Order API](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/api-fields-so-intro.md "")
  {#appplepay_auth_opt_fields_cybs_decrypt_ul_znd_dx4_1yb}

Simple Order XML Example: `Cybersource` Decryption and JCB {#applepay-auth-ex-xml-cybs-jcb-so}
==============================================================================================

Request

```
&lt;requestMessage xmlns="urn:schemas-cybersource-comtransaction-data-1.121"&gt;
   &lt;merchantID&gt;demomerchant&lt;/merchantID&gt;
   &lt;merchantReferenceCode&gt;demorefnum&lt;/merchantReferenceCode&gt;
   &lt;billTo&gt;
      &lt;firstName&gt;Jane&lt;/firstName&gt;
      &lt;lastName&gt;Smith&lt;/lastName&gt;
      &lt;street1&gt;123 Main Street&lt;/street1&gt;
      &lt;city&gt;Small Town&lt;/city&gt;
      &lt;state&gt;CA&lt;/state&gt;
      &lt;postalCode&gt;98765&lt;/postalCode&gt;
      &lt;country&gt;US&lt;/country&gt;
      &lt;email&gt;jsmith@example.com&lt;/email&gt;
   &lt;/billTo&gt;
   &lt;purchaseTotals&gt;
      &lt;currency&gt;USD&lt;/currency&gt;
      &lt;grandTotalAmount&gt;5.00&lt;/grandTotalAmount&gt;
   &lt;/purchaseTotals&gt;
   &lt;encryptedPayment&gt;
      &lt;descriptor&gt;RklEPUNPTU1PTi5BUFBMRS5JTkFQUC5QQVlNRU5U&lt;/descriptor&gt;
      &lt;data&gt;ABCDEFabcdefABCDEFabcdef0987654321234567&lt;/data&gt;
      &lt;encoding&gt;Base64&lt;/encoding&gt;
   &lt;/encryptedPayment&gt;
   &lt;card&gt;
      &lt;cardType&gt;001&lt;/cardType&gt;
   &lt;/card&gt;
   &lt;ccAuthService run="true"/&gt;
   &lt;paymentSolution&gt;001&lt;/paymentSolution&gt;
&lt;/requestMessage&gt; 
```

Response to a Successful Request

```
&lt;c:replyMessage&gt;
   &lt;c:merchantReferenceCode&gt;demorefnum&lt;/c:merchantReferenceCode&gt;
   &lt;c:requestID&gt;4465840340765000001541&lt;/c:requestID&gt;
   &lt;c:decision&gt;ACCEPT&lt;/c:decision&gt;
   &lt;c:reasonCode&gt;100&lt;/c:reasonCode&gt;
   &lt;c:requestToken&gt;
      Ahj/7wSR5C/4Icd2fdAKakGLadfg5535r/ghx3Z90AoBj3u
   &lt;/c:requestToken&gt;
   &lt;c:token&gt;
      &lt;c:expirationMonth&gt;07&lt;/c:expirationMonth&gt;
      &lt;c:expirationYear&gt;2025&lt;/c:expirationYear&gt;
      &lt;c:prefix&gt;239845&lt;/c:prefix&gt;
      &lt;c:suffix&gt;2947&lt;/c:suffix&gt;
   &lt;/c:token&gt;
   &lt;c:purchaseTotals&gt;
      &lt;c:currency&gt;USD&lt;/c:currency&gt;
   &lt;/c:purchaseTotals&gt;
   &lt;c:ccAuthReply&gt;
      &lt;c:reasonCode&gt;100&lt;/c:reasonCode&gt;
      &lt;c:amount&gt;5.00&lt;/c:amount&gt;
      &lt;c:authorizationCode&gt;888888&lt;/c:authorizationCode&gt;
      &lt;c:avsCode&gt;X&lt;/c:avsCode&gt;
      &lt;c:avsCodeRaw&gt;I1&lt;/c:avsCodeRaw&gt;
      &lt;c:processorResponse&gt;100&lt;/c:processorResponse&gt;
      &lt;c:reconciliationID&gt;11267051CGJSMQDC&lt;/c:reconciliationID&gt;
   &lt;/c:ccAuthReply&gt;
&lt;/c:replyMessage&gt;  
```

Authorizations Using `Cybersource` Decryption for mada {#applepay-auth-cybs-intro-mada}
=======================================================================================

This section provides the information that you need in order to process an authorization using `Cybersource` decryption for mada debit cards and mada prepaid cards issued in the Kingdom of Saudi Arabia. Apple Pay transactions on these cards are supported on the mada Pay mobile app and for `Visa Platform Connect` only.

Required Fields for Authorizing a Payment Using `Cybersource` Decryption for mada {#applepay-auth-reqfields-cybs-mada}
======================================================================================================================

billTo_city
:

billTo_country
:

billTo_email
:

billTo_firstName
:

billTo_lastName
:

billTo_postalCode
:

billTo_state
:

billTo_street1
:

card_cardType
:
Set this field to `060`.

ccAuthService_run
:
Set this field to `true`.

encryptedPayment_data
:
Set this field to the Base64-encoded value obtained from the `paymentData` property of the `PKPaymentToken` object.

encryptedPayment_descriptor
:
Set this field to `RklEPUNPTU1PTi5BUFBMRS5JTkFQUC5QQVlNRU5U`.

merchantID
:

merchantReferenceCode
:

paymentNetworkToken_transactionType
:
Set this field to `1`.

paymentSolution
:
Set this field to `001`.

purchaseTotals_currency
:

purchaseTotals_grandTotalAmount
:
Either purchaseTotals_grandTotalAmount or item_#_unitPrice must be included in the request.

transactionMode
:
Required only for merchants in Saudi Arabia.

Related Information {#applepay-auth-reqfields-cybs-mada_section_t4z_gx4_1yb}
----------------------------------------------------------------------------

* [API Field Reference for the Simple Order API](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/api-fields-so-intro.md "")
  {#applepay-auth-reqfields-cybs-mada_ul_u4z_gx4_1yb}

Simple Order XML Example: `Cybersource` Decryption for mada {#applepay-auth-ex-xml-cybs-mada-so}
================================================================================================

Request

```
&lt;requestMessage xmlns="urn:schemas-cybersource-com:transaction-data-1.121"&gt;
    &lt;merchantID&gt;demomerchant&lt;/merchantID&gt;
    &lt;merchantReferenceCode&gt;demorefnum&lt;/merchantReferenceCode&gt;
    &lt;billTo&gt;
        &lt;firstName&gt;Jane&lt;/firstName&gt;
        &lt;lastName&gt;Smith&lt;/lastName&gt;
        &lt;street1&gt;123 Main Street&lt;/street1&gt;
        &lt;city&gt;Small Town&lt;/city&gt;
        &lt;state&gt;CA&lt;/state&gt;
        &lt;postalCode&gt;98765&lt;/postalCode&gt;
        &lt;country&gt;US&lt;/country&gt;
        &lt;email&gt;jsmith@example.com&lt;/email&gt;
    &lt;/billTo&gt;
    &lt;purchaseTotals&gt;
        &lt;currency&gt;USD&lt;/currency&gt;
        &lt;grandTotalAmount&gt;5.00&lt;/grandTotalAmount&gt;
    &lt;/purchaseTotals&gt;
    &lt;encryptedPayment&gt;
        &lt;descriptor&gt;RklEPUNPTU1PTi5BUFBMRS5JTkFQUC5QQVlNRU5U&lt;/descriptor&gt;
        &lt;data&gt;ABCDEFabcdefABCDEFabcdef0987654321234567&lt;/data&gt;
        &lt;encoding&gt;Base64&lt;/encoding&gt;
    &lt;/encryptedPayment&gt;
    &lt;card&gt;
        &lt;cardType&gt;060&lt;/cardType&gt;
    &lt;/card&gt;
    &lt;ccAuthService run="true"/&gt;
    &lt;paymentSolution&gt;001&lt;/paymentSolution&gt;
&lt;/requestMessage&gt;
```

Response to a Successful Request

```
&lt;c:replyMessage&gt;
    &lt;c:merchantReferenceCode&gt;demorefnum&lt;/c:merchantReferenceCode&gt;
    &lt;c:requestID&gt;4465840340765000001541&lt;/c:requestID&gt;
    &lt;c:decision&gt;ACCEPT&lt;/c:decision&gt;
    &lt;c:reasonCode&gt;100&lt;/c:reasonCode&gt;
    &lt;c:requestToken&gt;Ahj/7wSR5C/4Icd2fdAKakGLadfg5535r/ghx3Z90AoBj3u&lt;/c:requestToken&gt;
    &lt;c:token&gt;
        &lt;c:expirationMonth&gt;07&lt;/c:expirationMonth&gt;
        &lt;c:expirationYear&gt;2025&lt;/c:expirationYear&gt;
        &lt;c:prefix&gt;239845&lt;/c:prefix&gt;
        &lt;c:suffix&gt;2947&lt;/c:suffix&gt;
    &lt;/c:token&gt;
    &lt;/c:purchaseTotals&gt;
    &lt;c:purchaseTotals&gt;
        &lt;c:currency&gt;USD&lt;/c:currency&gt;
    &lt;/c:purchaseTotals&gt;
    &lt;c:ccAuthReply&gt;
        &lt;c:reasonCode&gt;100&lt;/c:reasonCode&gt;
        &lt;c:amount&gt;5.00&lt;/c:amount&gt;
        &lt;c:authorizationCode&gt;888888&lt;/c:authorizationCode&gt;
        &lt;c:avsCode&gt;X&lt;/c:avsCode&gt;
        &lt;c:avsCodeRaw&gt;I1&lt;/c:avsCodeRaw&gt;
        &lt;c:authorizedDateTime&gt;2015-11-03T20:53:54Z&lt;/c:authorizedDateTime&gt;
        &lt;c:processorResponse&gt;100&lt;/c:processorResponse&gt;
        &lt;c:reconciliationID&gt;11267051CGJSMQDC&lt;/c:reconciliationID&gt;
    &lt;/c:ccAuthReply&gt;
&lt;/c:replyMessage&gt;
```

Authorizations Using `Cybersource` Decryption for Mastercard {#applepay-auth-cybs-intro-mc}
===========================================================================================

This section provides the information you need in order to process an authorization using `Cybersource` decryption for Mastercard.

Required Fields for Authorizing a Payment Using `Cybersource` Decryption for Mastercard {#applepay-auth-reqfields-cybs-mc}
==========================================================================================================================

billTo_city
:

billTo_country
:

billTo_email
:

billTo_firstName
:

billTo_lastName
:

billTo_postalCode
:

billTo_state
:

billTo_street1
:

card_cardType
:
For `Visa Platform Connect`, to authorize a payment on the mada Pay mobile app with a Mastercard and mada co-badged card, set this field to `060`.

ccAuthService_run
:
Set this field to `true`.

encryptedPayment_data
:
Set this field to the Base64-encoded value obtained from the `paymentData` property of the `PKPaymentToken` object.

encryptedPayment_descriptor
:
Set this field to `RklEPUNPTU1PTi5BUFBMRS5JTkFQUC5QQVlNRU5U`.

merchantID
:

merchantReferenceCode
:

paymentSolution
:
Set this field to `001`.

purchaseTotals_currency
:

purchaseTotals_grandTotalAmount
:
Either purchaseTotals_grandTotalAmount or item_#_unitPrice must be included in the request.

requestorID
:
Required for `Visa Platform Connect` and `GPX`.
:
Required for `Visa Platform Connect`.

transactionMode
:
Required only for merchants in Saudi Arabia.

Related Information
-------------------

* [API Field Reference for the Simple Order API](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/api-fields-so-intro.md "")
  {#applepay-auth-reqfields-cybs-mc_ul_psd_gx4_1yb}

Simple Order XML Example: `Cybersource` Decryption for Mastercard {#applepay-auth-ex-xml-cybs-mc-so}
====================================================================================================

Request

```
&lt;requestMessage xmlns="urn:schemas-cybersource-com:transaction-data-1.121"&gt;
    &lt;merchantID&gt;demomerchant&lt;/merchantID&gt;
    &lt;merchantReferenceCode&gt;demorefnum&lt;/merchantReferenceCode&gt;
    &lt;billTo&gt;
        &lt;firstName&gt;Jane&lt;/firstName&gt;
        &lt;lastName&gt;Smith&lt;/lastName&gt;
        &lt;street1&gt;123 Main Street&lt;/street1&gt;
        &lt;city&gt;Small Town&lt;/city&gt;
        &lt;state&gt;CA&lt;/state&gt;
        &lt;postalCode&gt;98765&lt;/postalCode&gt;
        &lt;country&gt;US&lt;/country&gt;
        &lt;email&gt;jsmith@example.com&lt;/email&gt;
    &lt;/billTo&gt;
    &lt;purchaseTotals&gt;
        &lt;currency&gt;USD&lt;/currency&gt;
        &lt;grandTotalAmount&gt;5.00&lt;/grandTotalAmount&gt;
    &lt;/purchaseTotals&gt;
    &lt;encryptedPayment&gt;
        &lt;descriptor&gt;RklEPUNPTU1PTi5BUFBMRS5JTkFQUC5QQVlNRU5U&lt;/descriptor&gt;
        &lt;data&gt;ABCDEFabcdefABCDEFabcdef0987654321234567&lt;/data&gt;
        &lt;encoding&gt;Base64&lt;/encoding&gt;
    &lt;/encryptedPayment&gt;
    &lt;card&gt;
        &lt;cardType&gt;002&lt;/cardType&gt;
    &lt;/card&gt;
    &lt;ccAuthService run="true"/&gt;
    &lt;paymentSolution&gt;001&lt;/paymentSolution&gt;
&lt;/requestMessage&gt;
```

Response to a Successful Request

```
&lt;c:replyMessage&gt;
    &lt;c:merchantReferenceCode&gt;demorefnum&lt;/c:merchantReferenceCode&gt;
    &lt;c:requestID&gt;4465840340765000001541&lt;/c:requestID&gt;
    &lt;c:decision&gt;ACCEPT&lt;/c:decision&gt;
    &lt;c:reasonCode&gt;100&lt;/c:reasonCode&gt;
    &lt;c:requestToken&gt;Ahj/7wSR5C/4Icd2fdAKakGLadfg5535r/ghx3Z90AoBj3u&lt;/c:requestToken&gt;
    &lt;c:token&gt;
        &lt;c:expirationMonth&gt;07&lt;/c:expirationMonth&gt;
        &lt;c:expirationYear&gt;2025&lt;/c:expirationYear&gt;
        &lt;c:prefix&gt;239845&lt;/c:prefix&gt;
        &lt;c:suffix&gt;2947&lt;/c:suffix&gt;
    &lt;/c:token&gt;
    &lt;c:purchaseTotals&gt;
        &lt;c:currency&gt;USD&lt;/c:currency&gt;
    &lt;/c:purchaseTotals&gt;
    &lt;c:ccAuthReply&gt;
        &lt;c:reasonCode&gt;100&lt;/c:reasonCode&gt;
        &lt;c:amount&gt;5.00&lt;/c:amount&gt;
        &lt;c:authorizationCode&gt;888888&lt;/c:authorizationCode&gt;
        &lt;c:avsCode&gt;X&lt;/c:avsCode&gt;
        &lt;c:avsCodeRaw&gt;I1&lt;/c:avsCodeRaw&gt;
        &lt;c:authorizedDateTime&gt;2015-11-03T20:53:54Z&lt;/c:authorizedDateTime&gt;
        &lt;c:processorResponse&gt;100&lt;/c:processorResponse&gt;
        &lt;c:reconciliationID&gt;11267051CGJSMQDC&lt;/c:reconciliationID&gt;
    &lt;/c:ccAuthReply&gt;
&lt;/c:replyMessage&gt; 
```

Authorizations Using `Cybersource` Decryption for Visa {#applepay-auth-cybs-intro-visa}
=======================================================================================

This section provides the information you need in order to process an authorization using `Cybersource` decryption for Visa.

Required Fields for Authorizing a Payment Using `Cybersource` Decryption for Visa {#applepay-auth-reqfields-cybs-visa}
======================================================================================================================

billTo_city
:

billTo_country
:

billTo_email
:

billTo_firstName
:

billTo_lastName
:

billTo_postalCode
:

billTo_state
:

billTo_street1
:

card_cardType
:
For `Visa Platform Connect`, to authorize a payment on the mada Pay mobile app with a Visa and mada co-badged card, set this field to `060`.

ccAuthService_run
:
Set this field to `true`.

encryptedPayment_data
:
Set this field to the Base64-encoded value obtained from the `paymentData` property of the `PKPaymentToken` object.

encryptedPayment_descriptor
:
Set this field to `RklEPUNPTU1PTi5BUFBMRS5JTkFQUC5QQVlNRU5U`.

merchantID
:

merchantReferenceCode
:

paymentNetworkToken_transactionType
:
Set this field to `1`.

paymentSolution
:
Set this field to `001`.

purchaseTotals_currency
:

purchaseTotals_grandTotalAmount
:
Either purchaseTotals_grandTotalAmount or item_#_unitPrice must be included in the request.

transactionMode
:
Required only for merchants in Saudi Arabia.

Related Information
-------------------

* [API Field Reference for the Simple Order API](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/api-fields-so-intro.md "")
  {#applepay-auth-reqfields-cybs-visa_ul_u4z_gx4_1yb}

Simple Order XML Example: `Cybersource` Decryption for Visa {#applepay-auth-ex-xml-cybs-visa-so}
================================================================================================

Request

```
&lt;requestMessage xmlns="urn:schemas-cybersource-com:transaction-data-1.121"&gt;
    &lt;merchantID&gt;demomerchant&lt;/merchantID&gt;
    &lt;merchantReferenceCode&gt;demorefnum&lt;/merchantReferenceCode&gt;
    &lt;billTo&gt;
        &lt;firstName&gt;Jane&lt;/firstName&gt;
        &lt;lastName&gt;Smith&lt;/lastName&gt;
        &lt;street1&gt;123 Main Street&lt;/street1&gt;
        &lt;city&gt;Small Town&lt;/city&gt;
        &lt;state&gt;CA&lt;/state&gt;
        &lt;postalCode&gt;98765&lt;/postalCode&gt;
        &lt;country&gt;US&lt;/country&gt;
        &lt;email&gt;jsmith@example.com&lt;/email&gt;
    &lt;/billTo&gt;
    &lt;purchaseTotals&gt;
        &lt;currency&gt;USD&lt;/currency&gt;
        &lt;grandTotalAmount&gt;5.00&lt;/grandTotalAmount&gt;
    &lt;/purchaseTotals&gt;
    &lt;encryptedPayment&gt;
        &lt;descriptor&gt;RklEPUNPTU1PTi5BUFBMRS5JTkFQUC5QQVlNRU5U&lt;/descriptor&gt;
        &lt;data&gt;ABCDEFabcdefABCDEFabcdef0987654321234567&lt;/data&gt;
        &lt;encoding&gt;Base64&lt;/encoding&gt;
    &lt;/encryptedPayment&gt;
    &lt;card&gt;
        &lt;cardType&gt;001&lt;/cardType&gt;
    &lt;/card&gt;
    &lt;ccAuthService run="true"/&gt;
    &lt;paymentSolution&gt;001&lt;/paymentSolution&gt;
&lt;/requestMessage&gt;
```

Response to a Successful Request

```
&lt;c:replyMessage&gt;
    &lt;c:merchantReferenceCode&gt;demorefnum&lt;/c:merchantReferenceCode&gt;
    &lt;c:requestID&gt;4465840340765000001541&lt;/c:requestID&gt;
    &lt;c:decision&gt;ACCEPT&lt;/c:decision&gt;
    &lt;c:reasonCode&gt;100&lt;/c:reasonCode&gt;
    &lt;c:requestToken&gt;Ahj/7wSR5C/4Icd2fdAKakGLadfg5535r/ghx3Z90AoBj3u&lt;/c:requestToken&gt;
    &lt;c:token&gt;
        &lt;c:expirationMonth&gt;07&lt;/c:expirationMonth&gt;
        &lt;c:expirationYear&gt;2025&lt;/c:expirationYear&gt;
        &lt;c:prefix&gt;239845&lt;/c:prefix&gt;
        &lt;c:suffix&gt;2947&lt;/c:suffix&gt;
    &lt;/c:token&gt;
    &lt;/c:purchaseTotals&gt;
    &lt;c:purchaseTotals&gt;
        &lt;c:currency&gt;USD&lt;/c:currency&gt;
    &lt;/c:purchaseTotals&gt;
    &lt;c:ccAuthReply&gt;
        &lt;c:reasonCode&gt;100&lt;/c:reasonCode&gt;
        &lt;c:amount&gt;5.00&lt;/c:amount&gt;
        &lt;c:authorizationCode&gt;888888&lt;/c:authorizationCode&gt;
        &lt;c:avsCode&gt;X&lt;/c:avsCode&gt;
        &lt;c:avsCodeRaw&gt;I1&lt;/c:avsCodeRaw&gt;
        &lt;c:authorizedDateTime&gt;2015-11-03T20:53:54Z&lt;/c:authorizedDateTime&gt;
        &lt;c:processorResponse&gt;100&lt;/c:processorResponse&gt;
        &lt;c:reconciliationID&gt;11267051CGJSMQDC&lt;/c:reconciliationID&gt;
    &lt;/c:ccAuthReply&gt;
&lt;/c:replyMessage&gt;
```

Authorizations Using Merchant Decryption for JCB {#applepay-auth-merch-intro-jcb}
=================================================================================

This section provides the information you need in order to process an authorization using merchant decryption for JCB.

Required Fields for Authorizing a Payment Using Merchant Decryption for JCB {#applepay-auth-reqfields-merch-jcb}
================================================================================================================

billTo_city
:

billTo_country
:

billTo_email
:

billTo_firstName
:

billTo_lastName
:

billTo_postalCode
:

billTo_state
:

billTo_street1
:

card_accountNumber
:
Set this field to the payment network token value.

card_expirationMonth
:
Set this field to the value from the payment network token expiration month.

card_expirationYear
:
Set this field to the value from the payment network token expiration year.

ccAuthService_cavv
:
Set this field to the network token cryptogram.

ccAuthService_commerceIndicator
:
Set this field to the ECI value contained in the Apple Pay response payload.

ccAuthService_networkTokenCryptogram
:
Set this field to the network token cryptogram.

ccAuthService_run
:
Set this field to `true`.

merchantID
:

merchantReferenceCode
:

paymentNetworkToken_transactionType
:
Set this field to `1`.

paymentSolution
:
Set this field to `001`.

purchaseTotals_currency
:

purchaseTotals_grandTotalAmount
:
Either purchaseTotals_grandTotalAmount or item_#_unitPrice must be included in the request.

transactionMode
:
Required only for merchants in Saudi Arabia.

Related Information {#applepay-auth-reqfields-merch-jcb_section_ozz_kx4_1yb}
----------------------------------------------------------------------------

* [API Field Reference for the Simple Order API](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/api-fields-so-intro.md "")
  {#applepay-auth-reqfields-merch-jcb_ul_pzz_kx4_1yb}

Simple Order XML Example: Merchant Decryption and JCB {#applepay-auth-ex-xml-merch-jcb-so}
==========================================================================================

Request

```
&lt;requestMessage xmlns="urn:schemas-cybersource-com:transaction-data-1.121"&gt;
   &lt;merchantID&gt;demomerchant&lt;/merchantID&gt;
   &lt;merchantReferenceCode&gt;demorefnum&lt;/merchantReferenceCode&gt;
   &lt;billTo&gt;
      &lt;firstName&gt;Jane&lt;/firstName&gt;
      &lt;lastName&gt;Smith&lt;/lastName&gt;
      &lt;street1&gt;123 Main Street&lt;/street1&gt;
      &lt;city&gt;Small Town&lt;/city&gt;
      &lt;state&gt;CA&lt;/state&gt;
      &lt;postalCode&gt;98765&lt;/postalCode&gt;
      &lt;country&gt;US&lt;/country&gt;
      &lt;email&gt;jsmith@example.com&lt;/email&gt;
   &lt;/billTo&gt;
   &lt;purchaseTotals&gt;
      &lt;currency&gt;USD&lt;/currency&gt;
      &lt;grandTotalAmount&gt;5.00&lt;/grandTotalAmount&gt;
   &lt;/purchaseTotals&gt;
   &lt;card&gt;
      &lt;accountNumber&gt;356611111111xxxx&lt;/accountNumber&gt;
      &lt;expirationMonth&gt;12&lt;/expirationMonth&gt;
      &lt;expirationYear&gt;2020&lt;/expirationYear&gt;
      &lt;cvNumber&gt;123&lt;/cvNumber&gt;
      &lt;cardType&gt;001&lt;/cardType&gt;
   &lt;/card&gt;
   &lt;ccAuthService run="true"&gt;
      &lt;cavv&gt;ABCDEFabcdefABCDEFabcdef0987654321234567&lt;/cavv&gt;
      &lt;eciRaw&gt;5&lt;/eciRaw&gt;
   &lt;/ccAuthService&gt;
   &lt;paymentNetworkToken&gt;
      &lt;transactionType&gt;1&lt;/transactionType&gt;
   &lt;/paymentNetworkToken&gt;
   &lt;paymentSolution&gt;001&lt;/paymentSolution&gt;
&lt;/requestMessage&gt;  
```

Response to a Successful Request

```
&lt;c:replyMessage&gt;
   &lt;c:merchantReferenceCode&gt;demorefnum&lt;/c:merchantReferenceCode&gt;
   &lt;c:requestID&gt;4465840340765000001541&lt;/c:requestID&gt;
   &lt;c:decision&gt;ACCEPT&lt;/c:decision&gt;
   &lt;c:reasonCode&gt;100&lt;/c:reasonCode&gt;
   &lt;c:requestToken&gt;
      Ahj/7wSR5C/4Icd2fdAKakGLadfg5535r/ghx3Z90AoBj3u
   &lt;/c:requestToken&gt;
   &lt;c:purchaseTotals&gt;
      &lt;c:currency&gt;USD&lt;/c:currency&gt;
   &lt;/c:purchaseTotals&gt;
   &lt;c:ccAuthReply&gt;
      &lt;c:reasonCode&gt;100&lt;/c:reasonCode&gt;
      &lt;c:amount&gt;5.00&lt;/c:amount&gt;
      &lt;c:authorizationCode&gt;888888&lt;/c:authorizationCode&gt;
      &lt;c:avsCode&gt;X&lt;/c:avsCode&gt;
      &lt;c:avsCodeRaw&gt;I1&lt;/c:avsCodeRaw&gt;
      &lt;c:authorizedDateTime&gt;2015-11-03T20:53:54Z&lt;/      
      &lt;c:authorizedDateTime&gt;
      &lt;c:processorResponse&gt;100&lt;/c:processorResponse&gt;
      &lt;c:reconciliationID&gt;11267051CGJSMQDC&lt;/c:reconciliationID&gt;
   &lt;/c:ccAuthReply&gt;
&lt;/c:replyMessage&gt;  
```

Authorizations Using Merchant Decryption for mada {#applepay-auth-merch-intro-mada}
===================================================================================

This section provides the information you need in order to process an authorization using merchant decryption for mada debit cards and mada prepaid cards issued in the Kingdom of Saudi Arabia. Apple Pay transactions on these cards are supported on the mada Pay mobile app and for `Visa Platform Connect` only.

Required Fields for Authorizing a Payment Using Merchant Decryption for mada {#applepay-auth-reqfields-merch-mada}
==================================================================================================================

billTo_city
:

billTo_country
:

billTo_email
:

billTo_firstName
:

billTo_lastName
:

billTo_postalCode
:

billTo_state
:

billTo_street1
:

card_accountNumber
:
Set this field to the payment network token value.

card_cardType
:
Set this field to `060`.

card_expirationMonth
:
Set this field to the value from the payment network token expiration month.

card_expirationYear
:
Set this field to the value from the payment network token expiration year.

ccAuthService_cavv
:
Set this field to the network token cryptogram.

ccAuthService_commerceIndicator
:
This value should reflect the ECI Indicator value returned in the Apple Pay response payload.

ccAuthService_networkTokenCryptogram
:
Set this field to the network token cryptogram.

ccAuthService_run
:
Set this field to `true`.

merchantID
:

merchantReferenceCode
:

paymentNetworkToken_transactionType
:
Set this field to `1`.

paymentSolution
:
Set this field to `001`.

purchaseTotals_currency
:

purchaseTotals_grandTotalAmount
:
Either purchaseTotals_grandTotalAmount or item_#_unitPrice must be included in the request.

transactionMode
:
Required only for merchants in Saudi Arabia.

:

Related Information {#applepay-auth-reqfields-merch-mada_section_fxl_nx4_1yb}
-----------------------------------------------------------------------------

* [API Field Reference for the Simple Order API](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/api-fields-so-intro.md "")
  {#applepay-auth-reqfields-merch-mada_ul_gxl_nx4_1yb}

Simple Order XML Example: Merchant Decryption and mada {#applepay-auth-ex-nvp-merch-mada-so}
============================================================================================

Request

```
&lt;requestMessage xmlns="urn:schemas-cybersource-com:transaction-data-1.121"&gt;
    &lt;merchantID&gt;demomerchant&lt;/merchantID&gt;
    &lt;merchantReferenceCode&gt;demorefnum&lt;/merchantReferenceCode&gt;
    &lt;billTo&gt;
        &lt;firstName&gt;Jane&lt;/firstName&gt;
        &lt;lastName&gt;Smith&lt;/lastName&gt;
        &lt;street1&gt;123 Main Street&lt;/street1&gt;
        &lt;city&gt;Small Town&lt;/city&gt;
        &lt;state&gt;CA&lt;/state&gt;
        &lt;postalCode&gt;98765&lt;/postalCode&gt;
        &lt;country&gt;US&lt;/country&gt;
        &lt;email&gt;jsmith@example.com&lt;/email&gt;
    &lt;/billTo&gt;
    &lt;purchaseTotals&gt;
        &lt;currency&gt;USD&lt;/currency&gt;
        &lt;grandTotalAmount&gt;5.00&lt;/grandTotalAmount&gt;
    &lt;/purchaseTotals&gt;
    &lt;card&gt;
        &lt;accountNumber&gt;4111111111111111&lt;/accountNumber&gt;
        &lt;expirationMonth&gt;12&lt;/expirationMonth&gt;
        &lt;expirationYear&gt;2020&lt;/expirationYear&gt;
        &lt;cvNumber&gt;123&lt;/cvNumber&gt;
        &lt;cardType&gt;060&lt;/cardType&gt;
    &lt;/card&gt;
    &lt;ccAuthService run="true"&gt;
        &lt;cavv&gt;ABCDEFabcdefABCDEFabcdef0987654321234567&lt;/cavv&gt;
        &lt;commerceIndicator&gt;internet&lt;/commerceIndicator&gt;
    &lt;/ccAuthService&gt;
    &lt;paymentNetworkToken&gt;
        &lt;requestorID&gt;987654321plokijuhygtfrdeswa&lt;/requestorID&gt;
        &lt;transactionType&gt;1&lt;/transactionType&gt; 
    &lt;/paymentNetworkToken&gt;
    &lt;paymentSolution&gt;001&lt;/paymentSolution&gt;
&lt;/requestMessage&gt;
```

Response to a Successful Request

```
&lt;c:replyMessage&gt;
    &lt;c:merchantReferenceCode&gt;demorefnum&lt;/c:merchantReferenceCode&gt;
    &lt;c:requestID&gt;4465840340765000001541&lt;/c:requestID&gt;
    &lt;c:decision&gt;ACCEPT&lt;/c:decision&gt;
    &lt;c:reasonCode&gt;100&lt;/c:reasonCode&gt;
    &lt;c:requestToken&gt;Ahj/7wSR5C/4Icd2fdAKakGLadfg5535r/ghx3Z90AoBj3u&lt;/c:requestToken&gt;
    &lt;c:purchaseTotals&gt;
        &lt;c:currency&gt;USD&lt;/c:currency&gt;
    &lt;/c:purchaseTotals&gt;
    &lt;c:ccAuthReply&gt;
        &lt;c:reasonCode&gt;100&lt;/c:reasonCode&gt;
        &lt;c:amount&gt;5.00&lt;/c:amount&gt;
        &lt;c:authorizationCode&gt;888888&lt;/c:authorizationCode&gt;
        &lt;c:avsCode&gt;X&lt;/c:avsCode&gt;
        &lt;c:avsCodeRaw&gt;I1&lt;/c:avsCodeRaw&gt;
        &lt;c:authorizedDateTime&gt;2015-11-03T20:53:54Z&lt;/c:authorizedDateTime&gt;
        &lt;c:processorResponse&gt;100&lt;/c:processorResponse&gt;
        &lt;c:reconciliationID&gt;11267051CGJSMQDC&lt;/c:reconciliationID&gt;
    &lt;/c:ccAuthReply&gt;
&lt;/c:replyMessage&gt;    
```

Authorizations Using Merchant Decryption for Mastercard {#applepay-auth-merch-intro-mc}
=======================================================================================

This section provides the information you need in order to process an authorization using merchant decryption for Mastercard.

Required Fields for Authorizing a Payment Using Merchant Decryption for Mastercard {#applepay-auth-reqfields-merch-mc}
======================================================================================================================

billTo_city
:

billTo_country
:

billTo_email
:

billTo_firstName
:

billTo_lastName
:

billTo_postalCode
:

billTo_state
:

billTo_street1
:

card_accountNumber
:
Set this field to the payment network token value.

card_cardType
:
For `Visa Platform Connect`, to authorize a payment on the mada Pay mobile app with a Visa and mada co-badged card, set this field to `060`.

card_expirationMonth
:
Set this field to the value from the payment network token expiration month.

card_expirationYear
:
Set this field to the value from the payment network token expiration year.

ccAuthService_commerceIndicator
:
Set this field to the ECI value contained in the Apple Pay response payload.

ccAuthService_networkTokenCryptogram
:
Set this field to the network token cryptogram.

ccAuthService_run
:
Set this field to `true`.

merchantID
:

merchantReferenceCode
:

paymentNetworkToken_transactionType
:
Set this field to `1`.

paymentSolution
:
Set this field to `001`.

purchaseTotals_currency
:

purchaseTotals_grandTotalAmount
:
Either purchaseTotals_grandTotalAmount or item_#_unitPrice must be included in the request.

requestorID
:
Required for `Visa Platform Connect` and `GPX`.
:
Required for `Visa Platform Connect`.

transactionMode
:
Required only for merchants in Saudi Arabia.

ucaf_authenticationData
:
Set this field to the network token cryptogram.

ucaf_collectionIndicator
:
Set this field to `2`.

Related Information {#applepay-auth-reqfields-merch-mc_section_pvh_mx4_1yb}
---------------------------------------------------------------------------

* [API Field Reference for the Simple Order API](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/api-fields-so-intro.md "")
  {#applepay-auth-reqfields-merch-mc_ul_qvh_mx4_1yb}

Simple Order XML Example: Merchant Decryption and Mastercard {#applepay-auth-ex-xml-merch-mc-so}
================================================================================================

Request

```
&lt;requestMessage xmlns="urn:schemas-cybersource-com:transaction-data-1.121"&gt;
    &lt;merchantID&gt;demomerchant&lt;/merchantID&gt;
    &lt;merchantReferenceCode&gt;demorefnum&lt;/merchantReferenceCode&gt;
    &lt;billTo&gt;
        &lt;firstName&gt;Jane&lt;/firstName&gt;
        &lt;lastName&gt;Smith&lt;/lastName&gt;
        &lt;street1&gt;123 Main Street&lt;/street1&gt;
        &lt;city&gt;Small Town&lt;/city&gt;
        &lt;state&gt;CA&lt;/state&gt;
        &lt;postalCode&gt;98765&lt;/postalCode&gt;
        &lt;country&gt;US&lt;/country&gt;
        &lt;email&gt;jsmith@example.com&lt;/email&gt;
    &lt;/billTo&gt;
    &lt;purchaseTotals&gt;
        &lt;currency&gt;USD&lt;/currency&gt;
        &lt;grandTotalAmount&gt;5.00&lt;/grandTotalAmount&gt;
    &lt;/purchaseTotals&gt;
    &lt;card&gt;
        &lt;accountNumber&gt;555555555555xxxx&lt;/accountNumber&gt;
        &lt;expirationMonth&gt;12&lt;/expirationMonth&gt;
        &lt;expirationYear&gt;2020&lt;/expirationYear&gt;
        &lt;cvNumber&gt;123&lt;/cvNumber&gt;
        &lt;cardType&gt;002&lt;/cardType&gt;
    &lt;/card&gt;
    &lt;ucaf&gt;
        &lt;authenticationData&gt;ABCDEFabcdefABCDscdef0987654321234567&lt;/authenticationData&gt;
        &lt;collectionIndicator&gt;2&lt;/collectionIndicator&gt;
    &lt;/ucaf&gt;
    &lt;ccAuthService run="true"&gt;
        &lt;commerceIndicator&gt;spa&lt;/commerceIndicator&gt;
    &lt;/ccAuthService&gt; 
    &lt;paymentNetworkToken&gt;
        &lt;transactionType&gt;1&lt;/transactionType&gt; 
    &lt;/paymentNetworkToken&gt;
    &lt;paymentSolution&gt;001&lt;/paymentSolution&gt;
&lt;/requestMessage&gt;
```

Response to a Successful Request

```
&lt;c:replyMessage&gt;
    &lt;c:merchantReferenceCode&gt;demorefnum&lt;/c:merchantReferenceCode&gt;
    &lt;c:requestID&gt;4465840340765000001541&lt;/c:requestID&gt;
    &lt;c:decision&gt;ACCEPT&lt;/c:decision&gt;
    &lt;c:reasonCode&gt;100&lt;/c:reasonCode&gt;
    &lt;c:requestToken&gt;Ahj/7wSR5C/4Icd2fdAKakGLadfg5535r/ghx3Z90AoBj3u&lt;/c:requestToken&gt;
    &lt;c:purchaseTotals&gt;
        &lt;c:currency&gt;USD&lt;/c:currency&gt;
    &lt;/c:purchaseTotals&gt;
    &lt;c:ccAuthReply&gt;
        &lt;c:reasonCode&gt;100&lt;/c:reasonCode&gt;
        &lt;c:amount&gt;5.00&lt;/c:amount&gt;
        &lt;c:authorizationCode&gt;888888&lt;/c:authorizationCode&gt;
        &lt;c:avsCode&gt;X&lt;/c:avsCode&gt;
        &lt;c:avsCodeRaw&gt;I1&lt;/c:avsCodeRaw&gt;
        &lt;c:authorizedDateTime&gt;2015-11-03T20:53:54Z&lt;/c:authorizedDateTime&gt;
        &lt;c:processorResponse&gt;100&lt;/c:processorResponse&gt;
        &lt;c:reconciliationID&gt;11267051CGJSMQDC&lt;/c:reconciliationID&gt;
    &lt;/c:ccAuthReply&gt;
&lt;/c:replyMessage&gt;    
```

Authorizations Using Merchant Decryption for Visa {#applepay-auth-merch-intro-visa}
===================================================================================

This section provides the information you need in order to process an authorization using merchant decryption for Visa.

Required Fields for Authorizing a Payment Using Merchant Decryption for Visa {#applepay-auth-reqfields-merch-visa}
==================================================================================================================

billTo_city
:

billTo_country
:

billTo_email
:

billTo_firstName
:

billTo_lastName
:

billTo_postalCode
:

billTo_state
:

billTo_street1
:

card_accountNumber
:
Set this field to the payment network token value.

card_cardType
:
For `Visa Platform Connect`, to authorize a payment on the mada Pay mobile app with a Visa and mada co-badged card, set this field to `060`.

card_expirationMonth
:
Set this field to the value from the payment network token expiration month.

card_expirationYear
:
Set this field to the value from the payment network token expiration year.

ccAuthService_cavv
:
Set this field to the network token cryptogram.

ccAuthService_commerceIndicator
:
Set this field to the ECI value contained in the Apple Pay response payload.

ccAuthService_networkTokenCryptogram
:
Set this field to the network token cryptogram.

ccAuthService_run
:
Set this field to `true`.

merchantID
:

merchantReferenceCode
:

paymentNetworkToken_transactionType
:
Set this field to `1`.

paymentSolution
:
Set this field to `001`.

purchaseTotals_currency
:

purchaseTotals_grandTotalAmount
:
Either purchaseTotals_grandTotalAmount or item_#_unitPrice must be included in the request.

requestorID
:
Required only for `Visa Platform Connect`.

transactionMode
:
Required only for merchants in Saudi Arabia.

:

Related Information {#applepay-auth-reqfields-merch-visa_section_fxl_nx4_1yb}
-----------------------------------------------------------------------------

* [API Field Reference for the Simple Order API](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/api-fields-so-intro.md "")
  {#applepay-auth-reqfields-merch-visa_ul_gxl_nx4_1yb}

Simple Order XML Example: Merchant Decryption and Visa {#applepay-auth-ex-xml-merch-visa-so}
============================================================================================

Request

```
&lt;requestMessage xmlns="urn:schemas-cybersource-com:transaction-data-1.121"&gt;
    &lt;merchantID&gt;demomerchant&lt;/merchantID&gt;
    &lt;merchantReferenceCode&gt;demorefnum&lt;/merchantReferenceCode&gt;
    &lt;billTo&gt;
        &lt;firstName&gt;Jane&lt;/firstName&gt;
        &lt;lastName&gt;Smith&lt;/lastName&gt;
        &lt;street1&gt;123 Main Street&lt;/street1&gt;
        &lt;city&gt;Small Town&lt;/city&gt;
        &lt;state&gt;CA&lt;/state&gt;
        &lt;postalCode&gt;98765&lt;/postalCode&gt;
        &lt;country&gt;US&lt;/country&gt;
        &lt;email&gt;jsmith@example.com&lt;/email&gt;
    &lt;/billTo&gt;
    &lt;purchaseTotals&gt;
        &lt;currency&gt;USD&lt;/currency&gt;
        &lt;grandTotalAmount&gt;5.00&lt;/grandTotalAmount&gt;
    &lt;/purchaseTotals&gt;
    &lt;card&gt;
        &lt;accountNumber&gt;4111111111111111&lt;/accountNumber&gt;
        &lt;expirationMonth&gt;12&lt;/expirationMonth&gt;
        &lt;expirationYear&gt;2020&lt;/expirationYear&gt;
        &lt;cvNumber&gt;123&lt;/cvNumber&gt;
        &lt;cardType&gt;001&lt;/cardType&gt;
    &lt;/card&gt;
    &lt;ccAuthService run="true"&gt;
        &lt;cavv&gt;ABCDEFabcdefABCDEFabcdef0987654321234567&lt;/cavv&gt;
        &lt;commerceIndicator&gt;internet&lt;/commerceIndicator&gt;
    &lt;/ccAuthService&gt;
    &lt;paymentNetworkToken&gt;
        &lt;transactionType&gt;1&lt;/transactionType&gt; 
    &lt;/paymentNetworkToken&gt;
    &lt;paymentSolution&gt;001&lt;/paymentSolution&gt;
&lt;/requestMessage&gt;
```

Response to a Successful Request

```
&lt;c:replyMessage&gt;
    &lt;c:merchantReferenceCode&gt;demorefnum&lt;/c:merchantReferenceCode&gt;
    &lt;c:requestID&gt;4465840340765000001541&lt;/c:requestID&gt;
    &lt;c:decision&gt;ACCEPT&lt;/c:decision&gt;
    &lt;c:reasonCode&gt;100&lt;/c:reasonCode&gt;
    &lt;c:requestToken&gt;Ahj/7wSR5C/4Icd2fdAKakGLadfg5535r/ghx3Z90AoBj3u&lt;/c:requestToken&gt;
    &lt;c:purchaseTotals&gt;
        &lt;c:currency&gt;USD&lt;/c:currency&gt;
    &lt;/c:purchaseTotals&gt;
    &lt;c:ccAuthReply&gt;
        &lt;c:reasonCode&gt;100&lt;/c:reasonCode&gt;
        &lt;c:amount&gt;5.00&lt;/c:amount&gt;
        &lt;c:authorizationCode&gt;888888&lt;/c:authorizationCode&gt;
        &lt;c:avsCode&gt;X&lt;/c:avsCode&gt;
        &lt;c:avsCodeRaw&gt;I1&lt;/c:avsCodeRaw&gt;
        &lt;c:authorizedDateTime&gt;2015-11-03T20:53:54Z&lt;/c:authorizedDateTime&gt;
        &lt;c:processorResponse&gt;100&lt;/c:processorResponse&gt;
        &lt;c:reconciliationID&gt;11267051CGJSMQDC&lt;/c:reconciliationID&gt;
    &lt;/c:ccAuthReply&gt;
&lt;/c:replyMessage&gt;    
```

Authorization Reversals {#payments-processing-basic-auth-reversal-intro}
========================================================================

This section provides the information you need in order to process an authorization reversal.  
Reversing an authorization releases the hold on the customer's payment card funds that the issuing bank placed when processing the authorization.

Supported Card Types
--------------------

All supported card types can process reversals. For a list of all supported card types, see [Payment Processors](/content/cybsdeveloper2021/amer/en/docs/cybs/en-us/apple-pay/developer/ctv/so/applepay/applepay-intro/payments-intro-processors.md "").

Endpoint {#payments-processing-basic-auth-reversal-intro_d15e64}
----------------------------------------------------------------

Set the ccAuthReversalService_run field to `true`.  
Send the request to `https://ics2ws.ic3.com/commerce/1.x/transactionProcessor`.

Required Fields for Processing an Authorization Reversal {#payments-processing-basic-auth-reversal-required-fields-applepay-ctv}
================================================================================================================================

card_cardType
:
For `Visa Platform Connect`, when reversing the authorization of an Apple Pay transaction on the mada Pay mobile app, set this field to `060`. Apple Pay transactions on the mada Pay app are supported for these cards issued in the Kingdom of Saudi Arabia:

    * mada debit and prepaid cards
    * Mastercard payment cards co-badged with mada
    * Visa payment cards co-badged with mada

ccAuthReversalService_authRequestID
:
Set this field to the request ID that was included in the authorization response message.

ccAuthReversalService_run
:
Set this field to `true`.

merchantReferenceCode
:

merchantTransactionIdentifier
:

purchaseTotals_currency
:

purchaseTotals_grandTotalAmount
:
The amount of the reversal must be the same as the authorization amount that was included in the authorization response message. Do not use the amount that was requested in the authorization request message.

Simple Order Example: Processing an Authorization Reversal {#payments-processing-basic-auth-reversal-ex-so-nvp}
===============================================================================================================

Request

```
ccAuthReversalService_authRequestID=6522033834410167772169
ccAuthReversalService_run=true
merchantReferenceCode=482046C3A7E94F5BD1FE3C66C
merchantTransactionIdentifier=Napa Valley Vacations
purchaseTotals_currency=USD
purchaseTotals_grandTotalAmount=49.95
```

Response to a Successful Request

```
requestID=1019827520348290570293
merchantReferenceCode=482046C3A7E94F5BD1FE3C66C
decision=ACCEPT
reasonCode=100
ccAuthReversalReply_amount=49.95
purchaseTotals_currency=USD
ccAuthReversalReply_reasonCode=100
ccAuthReversalReply_reconciliationID=1094820975023470
```

Captures {#payments-processing-basic-capture-intro}
===================================================

This section provides the information you need in order to capture an authorized transaction.

Supported Card Types
--------------------

All supported card types can process captures. For a list of all supported card types, see [Payment Processors](/content/cybsdeveloper2021/amer/en/docs/cybs/en-us/apple-pay/developer/ctv/so/applepay/applepay-intro/payments-intro-processors.md "").

Endpoint {#payments-processing-basic-capture-intro_d15e88}
----------------------------------------------------------

Set the ccCaptureService_run field to `true`.  
Send the request to `https://ics2ws.ic3.com/commerce/1.x/transactionProcessor`.

Required Fields for Capturing an Authorization {#payments-processing-basic-capture-required-fields-applepay-ctv}
================================================================================================================

card_cardType
:
For `Visa Platform Connect`, when capturing the authorization of an Apple Pay transaction on the mada Pay mobile app, set this field to `060`. Apple Pay transactions on the mada Pay app are supported for these cards issued in the Kingdom of Saudi Arabia:

    * mada debit and prepaid cards
    * Mastercard payment cards co-badged with mada
    * Visa payment cards co-badged with mada

ccCaptureService_authRequestID
:

ccCaptureService_run
:

merchantID
:

merchantReferenceCode
:
Set to `merchant_ref_number` value used in corresponding authorization request.

purchaseTotals_currency
:

purchaseTotals_grandTotalAmount
:

Simple Order Example: Capturing an Authorization {#payments-processing-basic-capture-ex-so-nvp}
===============================================================================================

Request

```
ccCaptureService_authRequestID=6629978499572480812782
ccCaptureService_run=true
merchantID=npr_paymentech
merchantReferenceCode=TC42703-1
purchaseTotals_grandTotalAmount=100.00
```

Response to a Successful Request

```
ccCaptureReply_amount=100.00
ccCaptureReply_requestDateTime=2022-09-12T173947Z
decision=ACCEPT
merchantReferenceCode=TC42703-1
purchaseTotals_currency=USD
requestID=6630043878211258349460
```

Searching for Apple Pay Transactions {#applepay_txn_reports}
============================================================

Use the Transaction Search page in the `Business Center` to identify Apple Pay transactions. You can search for transactions by date, application type, customer name, and other transaction identifiers.  
For information about the Transaction Request Report, see the `Business Center` [Reporting Developer Guide](https://developer.cybersource.com/docs/cybs/en-us/reporting/developer/all/rest/reporting/reporting_api.md "").
