Create Tokenized Card Payment Credentials with Device Signed JWS {#tms-net-tkn-device-jws-intro}
================================================================================================

This section describes how to create tokenized card payment credentials with device signed JWS.

Endpoint {#tms-net-tkn-device-jws-intro_tms-net-tkn-card-otp-intro-endpoint}
----------------------------------------------------------------------------

**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-device-jws-intro_restcust-prod-ksa}  
**Test in Saudi Arabia:** `POST ``https://apitest.sa.cybersource.com``/tms/v2/tokens/{tokenId/payment-credentials`{#tms-net-tkn-device-jws-intro_restcust-test-ksa}  
The *`{tokenId}`* is the identifier of the tokenized card.

Required Fields for Creating a Tokenized Card Payment Credentials with Device Signed JWS {#tms-net-tkn-device-jws-reqfields}
============================================================================================================================

[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 "")
:

[merchantInformation.merchantDescriptor.name](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/merch-info-aa/merch-info-merchant-descriptor-name.md "")
:

[merchantInformation.merchantDescriptor.url](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/merch-info-aa/merch-info-merchant-descriptor-url.md "")
:

[orderInformation.amountDetails.currency](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-amount-details-currency.md "")
:

[orderInformation.amountDetails.totalAmount](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-amount-details-total-amount.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.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 "")
:

[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.locailty](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.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 "")
:

[tokenInformation.tokenAuthenticationInformation.authenticatedIdentities.data](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/authenticated-ids-aa/authenticated-ids-data.md "")
:

[tokenInformation.tokenAuthenticationInformation.authenticatedIdentities.provider](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/authenticated-ids-aa/authenticated-ids-provider.md "")
:

[tokenInformation.tokenAuthenticationInformation.authenticatedIdentities.userAuthenticationMethod](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/authenticated-ids-aa/authenticated-ids-user-auth-method.md "")
:
Required when tokenInformation.tokenAuthenticationInformation.authenticatedIdentities.provider is set to `CLIENT_DEVICE_CERT_JWS`.

[tokenInformation.tokenAuthenticationInformation.clientCorrelationId](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/client-correlation-id.md "")
:

[transactionType](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/transaction-type-aa/transaction-type.md "")
:

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

* [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-device-jws-reqfields_ul_kpc_xzz_sxb}

REST Example: Creating a Tokenized Card Payment Credentials with Device Signed JWS {#tms-net-tkn-device-jws-ex-rest}
====================================================================================================================

Request with authenticatedIdentities

```
{
  "clientReferenceInformation": {
    "code": "abc"
  },
  "paymentInformation": {
    "customer": {
      "id": "&lt;id in payment-credentials url&gt;"
    }
  },
  "orderInformation": {
    "amountDetails": {
      "totalAmount": "&lt;orderInformation.amountDetails.totalAmount&gt;",
      "currency": "&lt;orderInformation.amountDetails.currency&gt;"
    },
    "billTo": {
      "firstName": "&lt;orderInformation.billTo.firstName&gt;",
      "lastName": "&lt;orderInformation.billTo.lastName&gt;",
      "address1": "&lt;orderInformation.billTo.address1&gt;",
      "locality": "&lt;orderInformation.billTo.locality&gt;",
      "administrativeArea": "&lt;orderInformation.billTo.administrativeArea&gt;",
      "postalCode": "&lt;orderInformation.billTo.postalCode&gt;",
      "country": "&lt;orderInformation.billTo.country&gt;",
      "email": "&lt;orderInformation.billTo.email&gt;",
      "phoneNumber": "&lt;orderInformation.billTo.phoneNumber&gt;"
    }
  },
  "deviceInformation": {
    "ipAddress": "&lt;deviceInformation.ipAddress&gt;"
  },
  "merchantInformation": {
    "merchantDescriptor": {
      "name": "&lt;merchantInformation.merchantDescriptor.name&gt;",
      "url": "&lt;merchantInformation.merchantDescriptor.url&gt;"
    }
  },
  "tokenInformation": {
    "tokenAuthenticationInformation": {
      "clientCorrelationId": "&lt;clientCorrelationId&gt;",
      "authenticatedIdentities": [
        {
          "data": "&lt;authenticatedIdentities[].data&gt;",
          "provider": "CLIENT_DEVICE_CERT_JWS",
          "userAuthenticationMethod": "&lt;authenticatedIdentities[].userAuthenticationMethod&gt;"
        }
      ]
    }
  }
}
```

{#tms-net-tkn-device-jws-ex-rest_codeblock_c51_vmt_gwb}  
Request with Network Token \& Cryptogram

```
{
  "clientReferenceInformation": {
    "code": "abc"
  },
  "paymentInformation": {
    "customer": {
      "id": "&lt;id in payment-credentials url&gt;"
    },
    "tokenizedCard": {
      "number": "411111111111XXXX",
      "expirationMonth": "12",
      "expirationYear": "2031",
      "cryptogram": "AceY+igABPs3jdwNaDg3MAACAAA=",
      "transactionType": "3"
    }
  },
  "orderInformation": {
    "amountDetails": {
      "totalAmount": "&lt;orderInformation.amountDetails.totalAmount&gt;",
      "currency": "&lt;orderInformation.amountDetails.currency&gt;"
    },
    "billTo": {
      "firstName": "&lt;orderInformation.billTo.firstName&gt;",
      "lastName": "&lt;orderInformation.billTo.lastName&gt;",
      "address1": "&lt;orderInformation.billTo.address1&gt;",
      "locality": "&lt;orderInformation.billTo.locality&gt;",
      "administrativeArea": "&lt;orderInformation.billTo.administrativeArea&gt;",
      "postalCode": "&lt;orderInformation.billTo.postalCode&gt;",
      "country": "&lt;orderInformation.billTo.country&gt;",
      "email": "&lt;orderInformation.billTo.email&gt;",
      "phoneNumber": "&lt;orderInformation.billTo.phoneNumber&gt;"
    }
  },
  "deviceInformation": {
    "ipAddress": "&lt;deviceInformation.ipAddress&gt;"
  },
  "merchantInformation": {
    "merchantDescriptor": {
      "name": "&lt;merchantInformation.merchantDescriptor.name&gt;",
      "url": "&lt;merchantInformation.merchantDescriptor.url&gt;"
    }
  }
}
```

{#tms-net-tkn-device-jws-ex-rest_codeblock_c51_vmt_gwb2}  
Response to a Successful Request

```

```

