On This Page

{#jumplink-list}  
[Markdown](/docs/cybs/en-us/apple-pay/developer/all/rest/applepay/applepay-auth-digital-wallet/applepay-auth-dw-with-3ds.md)  
Filter  
FILTER BY TAG

Authorizing an Apple Pay Digital Wallet Payment with 3-D Secure {#applepay-auth-dw-with-3ds}
============================================================================================

The topics in this section show to how to authorize an Apple Pay digital wallet payment with 3-D Secure authentication:

* Basic steps
* Required fields
* Diners Club example
  For general information about basic authorizations, see the "Standard Payments Processing" section of the [Payments Developer Guide](https://developer.cybersource.com/docs.md#PaymentServices "").

Basic Steps to Authorize an Apple Pay Digital Wallet Payments with 3-D Secure {#applepay-auth-ex-with-3ds-rest-steps}
=====================================================================================================================

1. Follow these steps to authorize an Apple Pay payment on Mastercard with 3-D Secure authentication:

2. Create the request message with the required `REST` API fields.

   * Use the API fields listed in [Required Fields to Authorize an Apple Pay Digital Wallet Payment with 3-D Secure](/docs/cybs/en-us/apple-pay/developer/all/rest/applepay/applepay-auth-digital-wallet/applepay-auth-dw-with-3ds/applepay-auth-dw-with-3ds-rest-fields.md "").  
     These REST API fields are specific to this payload:
     * merchantInformation.merchantDomain
     * consumerAuthenticationInformation.cavv---Diners Club and Visa only
     * consumerAuthenticationInformation.ucafAuthenticationData---Mastercard only
     * consumerAuthenticationInformation.ucafCollectionIndicator---Mastercard only
     * paymentInformation.tokenizedCard.cryptogram
     * paymentInformation.tokenizedCard.transactionType
     * paymentInformation.tokenizedCard.type
     * processingInformation.commerceIndicator
     * processingInformation.paymentSolution
     * processingInformation.paymentNetworkTokenTransactionType
   * Refer to the example [Visa Card Example: Authorize an Apple Pay Digital Wallet Payment with 3-D Secure](/docs/cybs/en-us/apple-pay/developer/all/rest/applepay/applepay-auth-digital-wallet/applepay-auth-dw-with-3ds/applepay-auth-dw-with-3ds-rest-code-visa.md ""). IMPORTANT

     > The example is based on a Visa card transaction. Set these fields to the appropriate values based on the card type:
     > * paymentInformation.tokenizedCard.type
     > * processingInformation.commerceIndicator

3. Send the message to one of these endpoints:

   * Production: `POST ``https://api.cybersource.com``/pts/v2/payments`
   * Test: `POST ``https://apitest.cybersource.com``/pts/v2/payments`
4. Verify the response messages to make sure that the request was successful.

   #### ADDITIONAL INFORMATION

A 200-level HTTP response code indicates success. See the [Transaction Response Codes](https://developer.cybersource.com/api/reference/response-codes.md "").

Required Fields to Authorize an Apple Pay Digital Wallet Payment with 3-D Secure {#applepay-auth-dw-with-3ds-rest-fields}
=========================================================================================================================

These REST API fields are required to request authorization of an Apple Pay digital wallet payment with 3-D Secure authentication.

clientReferenceInformation.code
:

consumerAuthenticationInformation.cavv
:
For Diners Club and Visa cards only---Set this value to the universal cardholder authentication number to indicate 3-D Secure authentication.

consumerAuthenticationInformation.directoryServerTransactionId
:

consumerAuthenticationInformation.paSpecificationVersion
:

consumerAuthenticationInformation.ucafAuthenticationData
:
For Mastercard transactions only---Set this value to the universal cardholder authentication field (UCAF) data to indicate 3-D Secure authentication.

consumerAuthenticationInformation.ucafCollectionIndicator
:
For Mastercard transactions only---Set the value of this field to `2`. UCAF collection is supported on your website and the UCAF was populated. This value indicates a successful Mastercard Identity Check transaction.

merchantInformation.merchantId
:

orderInformation.amountDetails.currency
:

orderInformation.amountDetails.totalAmount
:

orderInformation.billTo.address1
:

orderInformation.billTo.country
:

orderInformation.billTo.email
:

orderInformation.billTo.firstName
:

orderInformation.billTo.lastName
:

orderInformation.billTo.locality
:

orderInformation.billTo.phoneNumber
:

orderInformation.billTo.postalCode
:

paymentInformation.tokenizedCard.cryptogram
:
Set the value to the network token cryptogram from Apple Pay.

paymentInformation.tokenizedCard.expirationMonth
:

paymentInformation.tokenizedCard.expirationYear
:

paymentInformation.tokenizedCard.transactionType
:
Set the value to `1`.

paymentInformation.tokenizedCard.type
:
Set the value to the card type code. Possible values:

    * `001` for Visa
    * `002` for Mastercard
    * `005` for Diners Club

processingInformation.commerceIndicator
:
Set the value to the code for the 3-D Secure authentication service. Possible values:

    * `pb` for 3-D Secure authentication by Diners Club ProtectBuy
    * `spa` for 3-D Secure authentication by Mastercard Identity Check
    * `vbv` for 3-D Secure authentication by Visa Secure

processingInformation.paymentSolution
:
Set the value to `001` for Apple Pay in-app and web transactions.

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

* [API Field Reference for the REST API](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/acq-info.md "")

Visa Card Example: Authorize an Apple Pay Digital Wallet Payment with 3-D Secure {#applepay-auth-dw-with-3ds-rest-code-mc}
==========================================================================================================================

Request

```
{
  "clientReferenceInformation": {
    "code": "VISA-3DS-APPLEPAY-006"
  },
  "orderInformation": {
    "amountDetails": {
      "totalAmount": "199.00",
      "currency": "EUR"
    },
    "billTo": {
      "firstName": "Pierre",
      "lastName": "Dubois",
      "address1": "15 Rue de la Paix",
      "locality": "Paris",
      "postalCode": "75001",
      "country": "FR",
      "email": "pierre.dubois@example.fr",
      "phoneNumber": "+33-1-42-96-12-34"
    }
  },
  "paymentInformation": {
    "tokenizedCard": {
      "cryptogram": "BwABBJQ0AgAAAAAgJDUCAAAAAAA=",
      "transactionType": "1",
      "expirationMonth": "08",
      "expirationYear": "2027",
      "type": "001"
    }
  },
  "consumerAuthenticationInformation": {
    "cavv": "BgABBJQ0AgAAAAAgJDUCAAAAAA=",
    "directoryServerTransactionId": "8a2+89r+vs8fsc8w+v+79y==",
    "paSpecificationVersion": "2.2.0"
  },
  "processingInformation": {
    "paymentSolution": "001",
    "commerceIndicator": "vbv"
  },
  "merchantInformation": {
    "merchantId": "demo_merchant_12345"
  }
}
```

RELATED TO THIS PAGE

