---
page_title: Provision Token and create Passkey
product: API Reference
page_source: https://juspay.io/in/docs/api-reference/docs/visa-agentic-transactions/provision-token-and-create-passkey
openapi: https://juspay.io/in/docs/api/swagger?document=https%3A%2F%2Fjuspay.io%2Fin%2Fdocs%2Fapi-reference%2Fdocs%2Fvisa-agentic-transactions%2Fprovision-token-and-create-passkey
llms_txt: https://juspay.io/in/docs/llms.txt
product_llms_txt: https://juspay.io/in/docs/api-reference/llms.txt
---

## API Version: default


# Provision token and create passkey



This api is used for the below use cases:

1.  Create token in VISA’s tokenization system and create a passkey for new enrollment2. Do device binding for new enrollments3. Do passkey verification for purchase flows## Endpoints:
- Sandbox:  https://sandbox.juspay.in/provision-token-passkey

- Production: https://api.juspay.in/provision-token-passkey

## Request Type: 
POST

## Content-Type: 
application/json

## Authorization:

#### Basic Auth:
Consists of two parts.

* Username: API Key obtained from Juspay dashboard
* Password: Empty string

> **Note**
>  Example:- Basic MUQ2QUxxxxxxxxxxxxU5QTIxQzNFNTQwNkFDMEZCOg==


- Value: MUQ2QUZEQzhFQTY0OUU5QTIxQzNFNTQwNkFDMEZCOg==
- Tags: String, Mandatory
## Headers:

#### x-merchantid:
Merchantid of the AI Agent to be passed here
- Tags: String, Mandatory
## Sample Code Snippets:
### Request body:

#### New Card Flow Code Snippet:

```new card flow
{
    "customerId": "user_f96UTs2u7DpLrzh2",
    "sessionContext": {
        "secureToken": "ezAwMX06AAM1NkHHoGTHlinW2m5qFZyyKbZYfqJqtRWoUKTkamXXzNYzFFifYHHtH46AB7CCeEkhpoDNOWopqMASvU59EWZVHAGnkYcShe3nSeJ-ljSq0K-4le1ibA62QqWMxSHMRAM6fgvtfZMvfpdL023mVBkUHFJta0325mgmAiyxlk3scqxc3gmK7gcylvJmAHqtQIuovhR7AzwQjemL4wdytXN06tJKRCb4OdrrYExKvHMJUPPqd80oJ94Ump9rhGB4-gxfPTkxwJ8nBYXsKLIg1OdPUkMboWFBVmPJz_GdE8r-R1z3EqQjgEf7OqXOXMeqvwXEJ4HZI5-ZaulST6iEVP9IDFio5pjUuGL3WmPwOkvj5GBe11qq1CItXYga_nArg_HNEXDv28dCo2pUhJ-MXszbT3pjUCGfovKxcLLQ389Eopdqw2vBJWxAzuUlbyAmdeOoCVaJ7PXKku1v7grcfw2--LKMwWorSSmY83_yGoDjIU1bvaMHPVucxUxXFuPlXvSgGo_H9HDMhtiL3TUXIOE0g2VNoADLVVeApCSfdrDasZWF2Gaqe2RSYwaL_rjreZLhBmCL8mnH8gNUUdY2xW_TDnAj9wn3-bXIMLvGeiD2cgFU9LiKGHot7JmhGWRifX1tuy12PFe4fFrvnZBXbecZ3SYEKd89r-kmBGLSF0rSaivMQPcA7uiImqh07V_kHNDAgR4_YPODf0aYBlZycBPmQ6y7vq2ticOZ6wPDj3b_9DEguNJvTganKGkIqbf53O_oNYlfF3IGmYRVX6wXmEksz1ZZedD9yGOKUxsTzpbKNkMmoT-If1RJwPZvcGD8B3XGzpDv_ChMYf98OTV9fXU8vTqqGA_YmkqEAueAASUWtiDgtLojJFbaNltDPIzNOV1W2Z7uT6xnu3Y7g38dmv2TkOyV5GOaRfsdtsGozTszPZFT2BJm1bmMElAqbnLERN5x8Gr0oEK_t93hxP7abZHB1Rojy6MY"
    },
    "browserData": {
        "browserJavaEnabled": false,
        "browserJavascriptEnabled": true,
        "browserLanguage": "en-GB",
        "browserColorDepth": "30",
        "browserScreenHeight": "1117",
        "browserScreenWidth": "1728",
        "browserTimeZone": "-330",
        "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36",
        "browserHeader": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
        "ipAddress": "104.28.3.19"
    },
    "clientReferenceId": "235125b97f5147f9b9b4524b5e010a81",
    "authFlowType": "FIDO",
    "presentationType": "AI_AGENT",
    "platformType": "WEB",
    "deviceAttestationObj": {
        "reasonCode": "PAYMENT",
        "actionToPerform": "AUTHENTICATE"
    },
    "amount": {
        "currency": "SGD",
        "total": 92.65
    },
    "paymentInstrument": {
        "type": "CARD_TOKEN",
        "cardObj": "ctkn_cyq8CfH5yQEPxux8"
    }
}

```

#### Device binding flow Code Snippet:

```device binding flow
{
    "customerId": "user_1234567",
    "sessionContext": {
        "secureToken": "ezAwMX06AARNNDJB9tX3VAp8jgFzlpW1N8ZXlSylhxA-TjJspB7dJlQ39M8hVRPPVQYIYgK0tw8Tc3Qv31-V7Bve4fmyqyLCgxRwBISJJmHYgGqIFaL21nwqxBmHalQoWDh03CabLAgo_lcGUP996Uv9UOBR1Wb6yP8d6jsx5MfeToccgumRHAo38xPO23lbsLu24-P2k8hRU8zW6VQbJf3JJWCSEQv6mfioHzWAEilvbhevUDTIADQtcwXc6dOe97rrXSOFX6uXARdkO_TGgMRlOc6DR5UOOjKl_dwwbgk-TJOcW0WW6G_Y253ccLB1GBheeX-i6mXRiKpE6XOky171Xk33hijogOg4eRtGA2AxqXWJoNRPa6FdamKN5HovXyODzmNNAoLz8vbOCjFx1UWz8eySuktkIln7gL4QTpUIYTAJeuVQWrxceNRMXmLubE3J8KvTueqmdZPsQUfa915WwenBoaw_hkYsav90zD3p83HwPeLbiR0Vp0x15k1y1Dc6x6vHCVGdexw2yaGkFOt4NCzvZxpybM9OI0XNkhLcZpTkKpuMdLsMSwuo9moOplUCSiyDYWCcjllW9f3sLghm-lA3-OnUHyPY_2UogeZJAzDcNfG2J1naRxPQ5njEFA4gFQYkZvOvSoA5xJ8Rd-uqtJJFccHx8LurDhFWrUMKCmbro0Jpn16bkfLtmWH05tKAiujYehUjDgEWvM1KaL38zkxLEtaPiQzoBS8iTDLvP6-5Yoqa60rIF_7_p-V_RCyKgC9Ph4mdavvbrlmvAsZ895FKze7-hvfBBdvZTOTdmP1tgtlbQIWfLP7v8cYUJFx0WscoAkwXu_xqe7VXSeb9rbuWfjVED9fHlBQjN2fvYKz4YIcX8ci1ifP7Ffl4V016pyIcALoQhQ_XFBRI6l7vPwC7F8Rb-D80xxijWF1TBqZVMMhaMAwr0ZlRgAtNf_TnxgEYUOLsbY6nXi9uLBcuNfwD5H3e_eOz81FV55Qw"
    },
    "browserData": {
        "browserJavaEnabled": false,
        "browserJavascriptEnabled": true,
        "browserLanguage": "en-GB",
        "browserColorDepth": "30",
        "browserScreenHeight": "1117",
        "browserScreenWidth": "1728",
        "browserTimeZone": "-330",
        "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36",
        "browserHeader": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
        "ipAddress": "104.28.3.25"
    },
    "clientReferenceId": "9d4050c011ee4654adec05873299a640",
    "authFlowType": "FIDO",
    "presentationType": "AI_AGENT",
    "platformType": "WEB",
    "deviceAttestationObj": {
        "reasonCode": "DEVICE_BINDING",
        "actionToPerform": "REGISTER"
    },
    "amount": {
        "currency": "SGD",
        "total": 92.65
    },
    "paymentInstrument": {
        "type": "V_PROV_TOKEN_ID",
        "cardObj": "479518c708c3e3ccb68314501ee4c702"
    }
}

```

#### Purchase flow Code Snippet:

```purchase flow
{
    "customerId": "user_1234567",
    "sessionContext": {
        "secureToken": "ezAwMX06AAQzMjBBFiiXZwZg5CJCDDEtGk78VkcfHs84K3R0joy0jKYRkE2Dy1CfK_VQ7aXmwmR1uGvAj5NmslIpjOv540DKJYdbU_zJYGZACnLYfaDAW-ZwFh8tkUrdTd4J8GnR9akU9hKZ9cLGIbQVyyY4nFs4U44EPD47i3ZNahU81c1v6WQOwzuSHw2iBQmOo40RmnRv9z5m6mj0UXiW5zGU9h_JuNJJ9NwZsece4Q0kLpv_RJKKQjRVh_0qdu5z_UuTyCNSrp27pTBldWoKwGpLcEmgOqHaPg0qgwAIwDSYS3A_EGjwyOZsnnhp09ssr1eiMYBhLL1VRhQ0noQPDcyaFctly3qfuQkMKEB-7_ii5z7n1AwwnpIFKozqY6XbYeGbhszPInzdV_-EuBgcIDrQI3UQRl_L9dc6I020kXJ9wioESfqsJeWwETT0aOi8Tf5UelPmmIouywmEAgZwOZbiN2EV7IQdmWoJSdvZ-ji9MuX8kIAshet2Epow1ZhgYbUVZX0A42jTTlwEMA3mgHGZ6hGj4ZRNfnLZ9vdJMNzZlhOI0quqmXZZQQH647G6I4rRmL6HzoRCrivWhjuyI77LNFSyujm3m3xlaRmoyJRYRjBG6hBmMDKQf0e24xvtZydK3JEUv_UMizb8Bmc0MYXFJptedA6-A3B_KxRw4IQFSYikZKOgnVtS9xiiHwLwY-KiNEJt7tCQFphibVL1esHr-jRM_UhVDkHoGwgex3Ywdk2ROj2nY0G1l1fZFLOxoRFG9tJrokF3tN3b4aOQvaYowKPLGcbybTNR6I2WmzLeUYd851ezHX-w3PeM2tEHPZUX8OS83DplrWzakVlcFG6kYHOlbs-fCedi8NM80JF1D1wNRoW_C3teaO0_AIvniPChIfn2yAvG_8FvmdVmVchRZMNWy-5zPKJkhxG-3QRTR3aaWlAlet1NBIPOpM_SlhbrA7-zrfIKfw_j7-VPsGupP9wIR3rboYwHf_U"
    },
    "browserData": {
        "browserJavaEnabled": false,
        "browserJavascriptEnabled": true,
        "browserLanguage": "en-GB",
        "browserColorDepth": "30",
        "browserScreenHeight": "1117",
        "browserScreenWidth": "1728",
        "browserTimeZone": "-330",
        "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36",
        "browserHeader": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
        "ipAddress": "104.28.3.64"
    },
    "clientReferenceId": "59be839efa384557b5f0a2d13705df17",
    "authFlowType": "FIDO",
    "presentationType": "AI_AGENT",
    "platformType": "WEB",
    "shouldOpenAuthViaPopup": true,
    "deviceAttestationObj": {
        "reasonCode": "PAYMENT",
        "actionToPerform": "AUTHENTICATE"
    },
    "amount": {
        "currency": "SGD",
        "total": 92.65
    },
    "paymentInstrument": {
        "type": "V_PROV_TOKEN_ID",
        "cardObj": "f66fec32e629a987f83b1ac078f06a02"
    }
}

```

### Response body:

#### New card flow:
```plaintext
{
    "errorMessage": null,
    "status": "SUCCESS",
    "payload": {
        "stepUpResponse": {
            "availableStepUpMethod": [
                {
                    "value": "**PSMS",
                    "requestPayload": null,
                    "platformType": null,
                    "subMethod": null,
                    "identifier": "bvksaj=",
                    "method": "OTPSMS",
                    "source": null,
                    "appID": null,
                    "intentURL": null,
                    "appPlatform": null,
                    "appURL": null
                },
                {
                    "value": "OTPEMAIL",
                    "requestPayload": null,
                    "platformType": null,
                    "subMethod": null,
                    "identifier": "bvksaj==",
                    "method": "OTPEMAIL",
                    "source": null,
                    "appID": null,
                    "intentURL": null,
                    "appPlatform": null,
                    "appURL": null
                },
                {
                    "value": "1800123456",
                    "requestPayload": null,
                    "platformType": null,
                    "subMethod": null,
                    "identifier": "bvksaj==",
                    "method": "CUSTOMERSERVICE",
                    "source": null,
                    "appID": null,
                    "intentURL": null,
                    "appPlatform": null,
                    "appURL": null
                },
                {
                    "value": "Verify Online with Bank",
                    "requestPayload": "",
                    "platformType": "WEB",
                    "subMethod": "THREE-DS",
                    "identifier": "bvksaj==",
                    "method": "APP-TO-APP",
                    "source": "https://www.isa.sandbox.com",
                    "appID": null,
                    "intentURL": null,
                    "appPlatform": null,
                    "appURL": null
                }
            ],
            "otpInfo": null,
            "deviceBindingStatus": "CHALLENGED",
            "stepUpMethod": null
        },
        "vProvisionedTokenId": "bvksaj=bvksaj=bvksaj="
    },
    "errorCode": null
}

```

#### Device Binding Flow:
```plaintext
{
    "errorMessage": null,
    "status": "SUCCESS",
    "payload": {
        "actionToBePerformed": "REGISTER",
        "authPreferencesEnabled": {
            "responseType": "code",
            "responseMode": "com_visa_web_message"
        },
        "platformType": "WEB",
        "payload": "xxxxx.xxxx.-xxxxx",
        "identifier": "c3d04cbeffc063260f501b3dbc0b2b01",
        "endpoint": "xxxxxxx"
    },
    "errorCode": null
}

```

#### Purchase Flow:
```plaintext
{
    "errorMessage": null,
    "status": "SUCCESS",
    "payload": {
        "actionToBePerformed": "AUTHENTICATE",
        "authPreferencesEnabled": {
            "responseType": "code",
            "responseMode": "com_visa_web_message"
        },
        "platformType": "WEB",
        "payload": "xxxx.xxxxx.xxxx-xxxx",
        "identifier": "xxxxxx",
        "endpoint": "xxxxxxxxxxxx=="
    },
    "errorCode": null
}

```

#### Error response:
```plaintext
{
    "error": true,
    "error_message": "Access Denied",
    "user_message": "Access Denied",
    "error_info": {
        "code": "UNAUTHORIZED",
        "category": "USER_ERROR",
        "href": "NA",
        "request_id": "46231085-a366-4279-91af-843a2dfa6e8b",
        "user_message": "Unauthorized.",
        "developer_message": "Invalid merchant ID."
    }
}

```

## Body Parameters:
### Parameters:

#### customerId:
- Description: Customerid used during the transaction
- Value: value
- Tags: String, Mandatory

#### sessionContext:
- Description: This has the session token received from VISA to be passed for passkey craetion
- Tags: String, Mandatory

#### browserData:
- Description: This key contains the browser data which is used by VISA to determine if passkey flow is eligible for the device or not
- Tags: String, Mandatory

#### clientReferenceId:
- Description: This is a session identifier for VISA to track the session over the course of the transaction
- Tags: String, Mandatory

#### authFlowType:
- Description: To identify that this flow is going through the passkey flowExample value: FIDO
- Tags: ENUM, Mandatory

#### presentationType:
- Description: Type of token that will be generated at VISA tokenization system

Example value: AI_AGENT
- Tags: ENUM, Mandatory

#### amount:
- Description: Amount along with currency is passed here
- Value:
  - **Currency**:
    - Description: Currency of the transaction
    - Tags: String, Mandatory
  - **Total**:
    - Description: Transaction amount
    - Tags: String, Mandatory
- Tags: JSON, Mandatory

#### paymentInstrument:
- Description: This contains the temp token that is used by Juspay backend to communicate with VISA
- Value:
  - **Type**:
    - Description: Type of payment instrument used by Juspay backendExample: CARD_TOKEN
    - Tags: ENUM, Mandatory
  - **CardObj**:
    - Description: Value of the type. It can be a tokenid or Juspay temp tokenExample: ctkn_cyq8CfH5yQEPxux8
    - Tags: String, Mandatory
- Tags: JSON, Mandatory
## API Responses:
### 200:

#### errorMessage:

#### status:
- Value: Example value: SUCCESS
- Tags: String, Mandatory

#### payload:
- Value:
  - **StepUpResponse**:
    - Value:
      - **AvailableStepUpMethod**:
        - Tags: Array
      - **OtpInfo**:
      - **DeviceBindingStatus**:
        - Value: CHALLENGED
        - Tags: String
      - **StepUpMethod**:
    - Tags: Object
  - **VProvisionedTokenId**:
    - Value: Example: sbdjkvnsdjknvcsd91899
    - Tags: String
- Tags: Object, Conditional

#### errorCode:

#### actionToBePerformed:
- Description: Tells whether it is a bind or purchase flow
- Tags: ENUM, Conditional

#### authPreferencesEnabled:
- Value:
  - **ResponseType**:
    - Value: code
    - Tags: String
  - **ResponseMode**:
    - Value: com_visa_web_message
    - Tags: String
- Tags: JSON, Conditional

#### platformType:
- Description: Which platform this transaction is being done in Example: WEB/MOBILE_WEB
- Tags: ENUM, Conditional
### 401:

#### error:
- Value: true
- Tags: Boolean

#### error_message:
- Value: Access Denied
- Tags: String

#### user_message:
- Value: Access Denied
- Tags: String

#### error_info:
- Value:
  - **Code**:
    - Value: UNAUTHORIZED
    - Tags: String
  - **Category**:
    - Value: USER_ERROR
    - Tags: String
  - **Href**:
    - Value: NA
    - Tags: String
  - **Request_id**:
    - Value: 46231085-a366-4279-91af-843a2dfa6e8b
    - Tags: String
  - **User_message**:
    - Value: Unauthorized.
    - Tags: String
  - **Developer_message**:
    - Value: Invalid merchant ID.
    - Tags: String
- Tags: Object


---

## See Also

- [Authentication using client auth token](https://juspay.io/in/docs/api-reference/docs/visa-agentic-transactions/authentication-using-client-auth-token)
- [Trigger OTP](https://juspay.io/in/docs/api-reference/docs/visa-agentic-transactions/trigger-otp)
