Setting Up Device Data Collection Using Digital Payment (Google Pay) {#pa2-setup-google-use-intro}
==================================================================================================

Running the Setup service identifies the customer's bank and prepares for collecting data about the device that the customer is using to place the order. This use case demonstrates how the service works using a digital payment method like Google Pay.

Card-Specific Requirements {#pa2-setup-google-use-intro_card-specific}
----------------------------------------------------------------------

Some payment cards require specific information to be collected during a transaction.

[card_cardType](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/card-card-type.md "")
:
This field is required when the card type is JCB, Cartes Bancaires, China UnionPay, or Meeza.
{#pa2-setup-google-use-intro_dl_d1v_trz_rxb}

Country-Specific Requirements {#pa2-setup-google-use-intro_country-specific-SO}
-------------------------------------------------------------------------------

These fields are required for transactions in specific countries.

[billTo_state](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/bill-to-state.md "")
:
This field is required for transactions in the US, Canada, and Mainland China.

[billTo_postalCode](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/bill-to-postal-code.md "")
:
This field is required when the billTo_country field value is `US` or `CA`.

[invoiceHeader_ merchantDescriptorCountry](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/bill-to-state.md "")
:
For Meeza transactions, this value must be set to `EG` if Egypt was not set as the country in the merchant configuration during merchant boarding.

[payerAuthEnrollService_ merchantCountrycode](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/payer-auth-enroll-service-merchant-country-code.md "")
:
For Meeza transactions, this value must be set to `EG` if Egypt was not set as the country in the merchant configuration during merchant boarding.
{#pa2-setup-google-use-intro_dl_gpf_5rb}

Endpoint
--------

Set the `payerAuthSetupService_run` field to `true`.  
Send the request to:  
**Production:** `https://ics2ws.ic3.com/commerce/1.x/transactionProcessor`  
**Test:** `https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor`

Required Fields for Device Data Collection {#id__rfc}
-----------------------------------------------------

These fields are the minimum fields required when you request the Payer Authentication Setup service. Other fields that can be used to collect additional information during a transaction are listed in the optional fields section. Under certain circumstances, a field that is normally optional might be required. The circumstance that makes an optional field required is noted.

Required Fields
---------------

[billTo_postalCode](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/bill-to-postal-code.md "")
:
This field is required when the billTo_country field value is `US` or `CA`.

[billTo_state](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/bill-to-state.md "")
:
This field is required for the US and Canada.

[card_accountNumber](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/card-account-number.md "")
:

[card_cardType](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/card-card-type.md "")
:
This field is required when the card type is Cartes Bancaires, JCB, China UnionPay, or Meeza.

[card_expirationMonth](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/card-expiration-month.md "")
:
This field is required when card_accountNumber is included.

[card_expirationYear](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/card-expiration-year.md "")
:
This field is required when card_accountNumber is included.

[invoiceHeader_ merchantDescriptorCountry](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/bill-to-state.md "")
:
For Meeza transactions, this value must be set to `EG` when Egypt is not set as the country in the merchant configuration during merchant boarding.

[payerAuthEnrollService_ merchantCountrycode](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/payer-auth-enroll-service-merchant-country-code.md "")
:
For Meeza transactions, this value must be set to `EG` when Egypt is not set as the country in the merchant configuration during merchant boarding.

payerAuthSetupService_run
:

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

* [API field reference guide 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 "")

Optional Fields for Device Data Collection {#id_qpk_cc}
-------------------------------------------------------

These fields are optional for setting up a Payer Authentication transaction. Under certain circumstances, a field might appear as both an optional field and a required field.

[billTo_city](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/bill-to-city.md "")
:

[billTo_country](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/bill-to-country.md "")
:

[billTo_email](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/bill-to-email.md "")
:

[billTo_firstName](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/bill-to-first-name.md "")
:

[billTo_lastName](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/bill-to-last-name.md "")
:

[billTo_postalCode](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/bill-to-postal-code.md "")
:

[billTo_street1](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/bill-to-street1.md "")
:

[card_cardType](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/card-card-type.md "")
:

[card_expirationMonth](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/card-expiration-month.md "")
:
This field is required when card_accountNumber is included.

[card_expirationYear](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/card-expiration-year.md "")
:
This field is required when card_accountNumber is included.

[encryptedPayment_data](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/encrypted-payment-data.md "")
:

[encryptedPayment_descriptor](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/encrypted-payment-descriptor.md "")
:

[merchantID](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/merchant-id.md "")
:

[merchantReferenceCode](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/merchant-reference-code.md "")
:

[tokenSource_transientToken](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/token-source-transient-token.md "")
:

Simple Order Example: Setting Up Device Data Collection When Using Google Pay {#pa2-use-setup-google-so-ex}
===========================================================================================================

This is an example of an Payer Authentication Setup request and response using Google Pay as the digital payment option. The data in this example is for illustrative purposes. Request

```
merchantID=patest
merchantReferenceCode=0001
payerAuthSetupService_run=true
payment_solution=012
encryptedPayment_data=eyJzaWduYXR1cmUiOiJNRVlDSVFDMnNQcmduTmQ1cUY5N0hIMU1uWXRGV1Q
        xSFlWbnFrek93NU4ySXNldUZBZ0loQU90dWF1anc5L3lXWm5BYUlxUlVySktLWFF3M1I0Y3Mr
        aWFlWHBJYlNPT2wiLCJwcm90b2NvbFZlcnNpb24iOiJFQ3YxIiwic2lnbmVkTWVzc2FnZSI6I
        ntcImVuY3J5cHRlZE1lc3NhZ2VcIjpcIld2blBMbXVnR3NNZ3N5TlBRU2toWjEwWkJKV09lV2
        Z1SncxZzR2ZVRjOENoTWpTaE1SWkdBemJ2TEhpM2RvTGtaYkNxcXJQeVIwVU1SNEFDQUFlSks
        rSWNvTzM4UlFDbE5XNTgyM1ZrNEFEMmlkSGxKQU90YjhjYXVrWlFOTkdQUmVJL3lwZ3c3Szhj
        M0lRRlBHQStMZ2ZaZ1dtWjNtWm4yMFFmYU9JRHZvcGt2V1hFTHNSVXdvaC9lNXFUeTlpb2RoO
        WlTQmUvN09HSlUvK2h6MTMrRnc2ZFk3d2F3Y3FVY0hXUkRSYkl3Tzk5dXU5L2NEbzQxZjZyT3
        JoaGNVTTBlY25Eak1lYzhMNy9RUWozMmZsMGNJMVQwdHg2UFpuMU1iby9iMG5VOTAwTzN1VXB
        nNWtheHBpRzg5a0NhemR0V2FlMC9MaitsWENMcm1UYjV5VGxmVXE3L25OTmwvTEwwT1BaUit3
        MENDdnBKZDB4b3QwRkd1OXRTdHYwOG9CTkJ2Y25kNDMzUmYraGlyaGVoOW1JNEJET01rODIxa
        nlxWUcxNWdGVGFlMFFYTDUzS2lFalpYZHV4VDdmc0F2YXc3OXkzemNhMEVnXFx1MDAzZFxcdT
        AwM2RcIixcImVwaGVtZXJhbFB1YmxpY0tleVwiOlwiQkRkR0xtQVg2MUoxZnRNTStLSU95dkZ
        1a1BPZWovVURld0krK0lqd2hyVXZwdVFpbDBRY29tK0JCRkh3QnN4U2VhZDYrK0tYanBCWUQ4
        VUVkWDR6ZFJnXFx1MDAzZFwiLFwidGFnXCI6XCJVallCemN6dEl6Q3pkMTJMVHRmTGF2OWRtV
        jc4aHM2NlVIT3c5WFRoQ2hzXFx1MDAzZFwifSJ9
  
```

Response to Successful Request

```
payerAuthSetupReply_accessToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI2N
&gt;payerAuthSetupReply_accessToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI2N

         jFlZjkwMS04MTFlLTQzZWQtkwMS04MTFlLTQzZWQtYWU0MS00MDM4ZGIyNDI5MjUiLCJpYXQi
         OjE2Nzk1ODIyNDAsImlzcyI6IjVkZDgzYmYwMGU0MjNkMTQ5OGRjYmFjYSIsImV4cCI6MTY3O
         TU4NTg0MCwiT3JnVW5pdElkIjoiNTVlZjNmMDNmNzIzYWE0MzFjOTliMDA2IiwiUmVmZXJlbm
         NlSWQiOiJjMjUxYmE4OC1hMjY2LTQ1YmItODE3OC02MDc4NzFjMWFhNzQifQ.picPcWjbtOLG
         ZmNyLEhlM0NV3GYNVu7nRXIt7diaO1w
decision=ACCEPT
payerAuthSetupReply_deviceDataCollectionURL=https://centinelapistag.cardinal
         commerce.com/V1/Cruise/Collect
payerAuthSetupReply_referenceID=c251ba88-a266-45bb-8178-607871c1aa74
merchantReferenceCode=0001
reasonCode=100
requestID=6795822405176891104008
payerAuthSetupReply_reasonCode=100
requestToken=AxizbwSTcGb7N7K5VVsI/7gBURy2bEzgAMCoZNJMq6PSYifATAAAFwni
```

