Generate Payment Credentials for Digital Commerce Authentication Program {#tms-net-tkn-pay-cred-dcap-intro}
===========================================================================================================

This section describes how to create payment credentials with data for the Digital Commerce Authentication Program (DCAP). ![](/content/dam/documentation/cybs/en-us/topics/payments-processing/payment-services/tms/images/tms-dcap-650x150.svg/jcr:content/renditions/original)  
The Digital Commerce Authentication Program (DCAP), provides you with a way to enhance the security and reliability of card-not-present transactions by providing enhanced data without adding complexity in checkout. DCAP helps the clients that use network tokenization to provide more information to issuers when purchases are made using network tokens.  
DCAP does not require the token to be an authenticated payment credential. Instead, you can include additional fields in the transaction request that are sent to the issuer and are used in risk scoring. This enables issuers to make a more informed authorization decision. You can use the payment credentials API to retrieve the payment credentials for an existing customer, payment instrument, instrument identifier or tokenized card. For information about these token types, see these topics:

* [Customer Tokens](/docs/cybs/en-us/tms/developer/all/rest/tms/tms-cust-tkn.md "")
* [Payment Instrument Tokens](/docs/cybs/en-us/tms/developer/all/rest/tms/tms-pi-tkn.md "")
* [Instrument Identifier Tokens](/docs/cybs/en-us/tms/developer/all/rest/tms/tms-ii-tkn.md "")
  {#tms-net-tkn-pay-cred-dcap-intro_ul_qfx_t2c_2jc}

Endpoint {#tms-net-tkn-pay-cred-dcap-intro_section_hmt_j2c_2jc}
---------------------------------------------------------------

**Test:** `POST ``https://apitest.cybersource.com``/tms/v2/tokens/`*{tokenId}/*`payment-credentials`  
**Production:** `POST ``https://api.cybersource.com``/tms/v2/tokens/`*{tokenId}/*`payment-credentials`  
**Production in India:** `POST ``https://api.in.cybersource.com``/tms/v2/tokens/`*{tokenId}/*`payment-credentials`  
**Production in Saudi Arabia:** `POST ``https://api.sa.cybersource.com``/tms/v2/tokens/`*{tokenId}/*`payment-credentials`{#tms-net-tkn-pay-cred-dcap-intro_d17e76}  
**Test in Saudi Arabia:** `POST ``https://apitest.sa.cybersource.com``/tms/v2/tokens/`*{tokenId}/*`payment-credentials`{#tms-net-tkn-pay-cred-dcap-intro_d17e87}  
The *`{tokenId}`* is the identifier of the tokenized card.

Required Fields for Generating Payment Credentials for DCAP {#tms-net-tkn-pay-cred-dcap-reqfields}
==================================================================================================

deviceInformation.id
:

[deviceInformation.ipAddress](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/device-info-aa/device-info-ip-address.md "")
:

[orderInformation.billTo.address1](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-address1.md "")
:

[orderInformation.billTo.address2](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-address2.md "")
:
Required in the US.

[orderInformation.billTo.administrativeArea](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-admin-area.md "")
:

[orderInformation.billTo.country](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-country.md "")
:

[orderInformation.billTo.email](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-email.md "")
:
Required when `orderInformation.billTo.phoneNumber` is not included in the request. either if not in US

[orderInformation.billTo.firstName](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-first-name.md "")
:

[orderInformation.billTo.lastName](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-last-name.md "")
:

[orderInformation.billTo.locality](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-locality.md "")
:

[orderInformation.billTo.phoneNumber](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-phone-num.md "")
:
Required in the US.

[orderInformation.billTo.postalCode](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-postal-code.md "")
:

[paymentCredentialType](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/payment-credential-type.md "")
:
Set to one of these values: add to request

    * `CRYPTOGRAM`
    * `NETWORK_TOKEN`
    * `SECURITY_CODE`
    {#tms-net-tkn-pay-cred-dcap-reqfields_ul_nft_dgc_2jc}

[transactionType](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/transaction-type.md "")
:
{#tms-net-tkn-pay-cred-dcap-reqfields_dl_pdn_xfc_2jc}

Related Information {#tms-net-tkn-pay-cred-dcap-reqfields_section_qdn_xfc_2jc}
------------------------------------------------------------------------------

* [API Field Reference for the REST API](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/rest-api-fields-intro.md "")
  {#tms-net-tkn-pay-cred-dcap-reqfields_ul_kpc_xzz_sxb}

REST Example: Generating Payment Credentials for DCAP {#tms-net-tkn-pay-cred-dcap-ex-rest}
==========================================================================================

Request

```
{
  "paymentCredentialType": "CRYPTOGRAM",
  "transactionType": "ECOM",
  "orderInformation": {
    "billTo": {
      "firstName": "John",
      "lastName": "Doe",
      "address1": "1 Market St",
      "locality": "San Francisco",
      "administrativeArea": "CA",
      "postalCode": "94105",
      "country": "US",
      "email": "test@cybs.com"
      "phoneNumber": "123-456-7890"
    }
  },
  "deviceInformation": {
    "id": "1234567890",
    "ipAddress": "127.0.0.1"
  }
}
```

{#tms-net-tkn-pay-cred-dcap-ex-rest_codeblock_c51_vmt_gwb}  
Response to a Successful Request

```
{
  "_links": {
    "self": {
      "href": "/tms/v2/tokens/7010000000016241111/payment-credentials"
    }
  },
  "tokenizedCard": {
    "state": "ACTIVE",
    "enrollmentId": "c2d1b36fad46aed1ca8318dca5ed1e02",
    "tokenReferenceId": "168661ada5115ca3589b1ba3dabdb102",
    "number": "X895370016750801",
    "expirationMonth": "12",
    "expirationYear": "2023",
    "type": "visa",
    "cryptogram": "AwAAAADggP/Ce5+ZciCXQUUAAAA=",
    "eci": "05",
    "requestorId": "40010052236",
    "card": {
      "suffix": "0394",
      "expirationMonth": "12",
      "expirationYear": "2023"
    }
  },
  "card": {
    "number": "411111XXXXXX1111"
  },
  "issuer": {
    "paymentAccountReference": "V0010013022298169667504231315"
  },
  "processingInformation": {
    "authorizationOptions": {
      "initiator": {
        "merchantInitiatedTransaction": {
          "previousTransactionId": "123456789619999"
        }
      }
    },
    "commerceIndicator": "vbv"
  }
}
```

{#tms-net-tkn-pay-cred-dcap-ex-rest_codeblock_z52_pgc_2jc}
