Create Tokenized Card Payment Credentials with `Payment Passkey` {#tms-net-tkn-create-vpp-intro}
================================================================================================

This section describes how to create tokenized card payment credentials with `Payment Passkey`.

Endpoint {#tms-net-tkn-create-vpp-intro_tms-net-tkn-card-otp-intro-endpoint}
----------------------------------------------------------------------------

**Test:** `POST ``https://apitest.visaacceptance.com``/pts/v2/payments`  
**Production:** `POST ``https://api.visaacceptance.com``/pts/v2/payments`

Required Fields for Creating a Tokenized Card Payment Credentials with VPP {#tms-net-tkn-create-vpp-reqfields}
==============================================================================================================

authenticatedIdentities.provider
:

authenticatedIdentities.userAuthenticationMethod
:
Required if authenticatedIdentities.provider is set to `CLIENT_DEVICE_CERT_JWS`.

Optional Fields for Creating a Tokenized Card Payment Credentials with VPP {#tms-net-tkn-create-vpp-optfields}
==============================================================================================================

transactionType
:

deviceInformation.ipAddress
:

clientCorrelationId
:

authenticatedIdentities.data
:
When authenticatedIdentities.provider is set to `CLIENT_DEVICE_CERT_JWS`, this field is a JSON Web Signature (JWS) made up of these elements:

    * **Header** :
      * `alg`: Signature algorithm (e.g., `"PS256"` for RSA-PSS with SHA-256)
      * `kid`: Client device ID (e.g., `"1234"`)
      * `typ`: `"JOSE"`
      * `cty`: `"application/json"` (payload content type)
      * `iat`: UTC timestamp when transaction was created/signed
    * **Payload**

      ```
      {
        "clientDeviceID": "&lt;clientDeviceID&gt;",
        "clientReferenceID": "&lt;clientCorrelationId&gt;",
        "vProvisionedTokenID": "&lt;tokenizedCard.tokenReferenceId&gt;",
        "nonce": "&lt;Random 5 digit number&gt;"
      }
      ```

    * **Signature**
      * Algorithm: **RSA-PSS** with SHA-256 and MGF1
      * `alg` in header set to `"PS256"`

:
When authenticatedIdentities.provider is set to `VISA_PAYMENT_PASSKEY`, the value of this field is from the iframe.

orderInformation.amountDetails.totalAmount
:

orderInformation.amountDetails.currency
:

REST Example: Creating a Tokenized Card Payment Credentials with Payment Passkey {#tms-net-tkn-create-vpp-ex-rest}
==================================================================================================================

Request1

```
{
  "clientReferenceInformation": {
    "code": "&lt;clientCorrelationId&gt;"
  },
  "processingInformation": {
    "authorizationOptions": {
      "aftIndicator": "&lt;true = transactionType: AFT&gt;"
    }
  },
  "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;",
    "httpAcceptContent": "&lt;deviceInformation.httpAcceptContent&gt;",
    "httpBrowserLanguage": "&lt;deviceInformation.httpBrowserLanguage&gt;",
    "httpBrowserJavaEnabled": "&lt;deviceInformation.httpBrowserJavaEnabled&gt;",
    "httpBrowserJavaScriptEnabled": "&lt;deviceInformation.httpBrowserJavaScriptEnabled&gt;",
    "httpBrowserColorDepth": "&lt;deviceInformation.httpBrowserColorDepth&gt;",
    "httpBrowserScreenHeight": "&lt;deviceInformation.httpBrowserScreenHeight&gt;",
    "httpBrowserScreenWidth": "&lt;deviceInformation.httpBrowserScreenWidth&gt;",
    "httpBrowserTimeDifference": "&lt;deviceInformation.httpBrowserTimeDifference&gt;",
    "userAgentBrowserValue": "&lt;deviceInformation.userAgentBrowserValue&gt;"
  },
  "merchantInformation": {
    "merchantDescriptor": {
      "name": "&lt;merchantInformation.merchantDescriptor.name&gt;",
      "url": "&lt;merchantInformation.merchantDescriptor.url&gt;"
    }
  },
  "tokenInformation": {
    "clientCorrelationId": "&lt;clientCorrelationId&gt;",
    "tokenAuthenticationInformation": {
      "authenticatedIdentities": [
        {
          "data": "&lt;authenticatedIdentities[].data&gt;",
          "provider": "&lt;authenticatedIdentities[].provider&gt;",
          "id": "&lt;authenticatedIdentities[].id&gt;",
          "relyingPartyId": "&lt;authenticatedIdentities[].relyingPartyId&gt;",
          "userAuthenticationMethod": "&lt;authenticatedIdentities[].userAuthenticationMethod&gt;"
        }
      ]
    }
  }
}
```

{#tms-net-tkn-create-vpp-ex-rest_codeblock_c51_vmt_gwb}  
Response to a Successful Request

```

```

