# Bind Visa device and token Executes Visa device binding for a given token and device. Device binding establishes that a specific device belongs to a specific cardholder. Once bound, the device can be trusted more in future transactions. An issuer can use this endpoint to update the status of a specific device linked to a token. **Notes**: * This is a PCI endpoint, use the https://gw-pci.pismolabs.io/cards-tokenization environment. * This endpoint takes an account token - an access token encoded with a Pismo account ID # OpenAPI definition ```json { "openapi": "3.1.0", "info": { "title": "Card issuing - Tokenization", "description": "API endpoints for card tokenization.", "version": "1.0.0", "contact": { "name": "API Support", "url": "https://developers.pismo.io/support" }, "license": { "name": "Copyright Pismo" } }, "servers": [ { "url": "https://gw-pci.pismolabs.io/cards-tokenization", "description": "PCI API server for testing" }, { "url": "https://pci.pismolabs.io/cards-tokenization", "description": "Sandbox API server for testing" } ], "tags": [ { "name": "Token lifecycle", "description": "Token lifecycle endpoints" } ], "components": { "parameters": { "CardIDpath": { "name": "cardId", "in": "path", "schema": { "type": "string" }, "description": "Pismo card ID", "required": true }, "DeviceIDpath": { "name": "deviceId", "description": "Device ID (wallet device ID)", "in": "path", "required": true, "schema": { "type": "string" } }, "TokenIDpath": { "name": "tokenId", "in": "path", "schema": { "type": "string" }, "description": "Token ID", "required": true } }, "schemas": { "ActivationCode2": { "type": "string", "description": "Activation code **REQUIRED** when `operation_type` = `TOKEN_DEVICE_BINDING_APPROVE_CALL_CENTER`.", "maxLength": 8 }, "DeviceIndex": { "type": "integer", "description": "Visa index number for device ID.", "maxLength": 2, "example": 99 }, "ErrorObject": { "type": "object", "description": "Standard error object", "properties": { "error_code": { "type": "string", "description": "Error code" }, "message": { "type": "string", "description": "Error message" } } }, "OperatorID": { "type": "string", "description": "Client-generated ID for person or system performing the operation. This is for client monitoring and internal record-keeping.", "maxLength": 16 }, "OperationReason2": { "type": "string", "description": "Visa lifecycle operation reason.", "enum": [ "FRAUD", "LOST_CARD", "STOLEN_CARD", "LOST_DEVICE", "STOLEN_DEVICE", "CUSTOMER_REQUEST", "CLOSED", "FOUND_DEVICE" ] }, "OperationType2": { "type": "string", "description": "Visa device binding lifecycle operation type.", "enum": [ "TOKEN_DEVICE_BINDING_REMOVE", "TOKEN_DEVICE_BINDING_APPROVE", "TOKEN_DEVICE_BINDING_APPROVE_BANK_APP", "TOKEN_DEVICE_BINDING_APPROVE_CALL_CENTER" ] }, "VisaDeviceBindingRequest": { "type": "object", "required": [ "operator_id", "operation_type", "operation_reason", "device_index" ], "properties": { "operator_id": { "$ref": "#/components/schemas/OperatorID" }, "operation_type": { "$ref": "#/components/schemas/OperationType2" }, "operation_reason": { "$ref": "#/components/schemas/OperationReason2" }, "activation_code": { "$ref": "#/components/schemas/ActivationCode2" }, "device_index": { "$ref": "#/components/schemas/DeviceIndex" } } } }, "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer", "description": "Account token - token encoded with a Pismo account ID. Tokens can expire quickly, which can result in a \"**401 Unauthorized**\" error.", "bearerFormat": "JWT" } }, "responses": { "400BadRequest": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorObject" }, "examples": { "example-1": { "value": { "error_code": "ERR93836", "message": "Card profile can't be null" } } } } } }, "401Unauthorized": { "description": "Access token is missing or invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorObject" }, "examples": { "example-1": { "value": { "error_code": "ERR9786", "message": "Access token is missing or invalid" } } } } } }, "500InternalServerError": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorObject" }, "examples": { "example-1": { "value": { "error_code": "ERR5446", "message": "Internal server error" } } } } } } } }, "security": [ { "BearerAuth": [] } ], "paths": { "/v1/cards/{cardId}/network-tokens/{tokenId}/devices/{deviceId}/binding": { "post": { "summary": "Bind Visa device and token", "description": "Executes Visa device binding for a given token and device. Device binding establishes that a specific device belongs to a specific cardholder. Once bound, the device can be trusted more in future transactions. \n\nAn issuer can use this endpoint to update the status of a specific device linked to a token.\n\n**Notes**:\n * This is a PCI endpoint, use the https://gw-pci.pismolabs.io/cards-tokenization environment.\n * This endpoint takes an account token - an access token encoded with a Pismo account ID\n", "operationId": "post-run-visa-device-lifecycle", "tags": [ "Token lifecycle" ], "parameters": [ { "$ref": "#/components/parameters/CardIDpath" }, { "$ref": "#/components/parameters/TokenIDpath" }, { "$ref": "#/components/parameters/DeviceIDpath" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VisaDeviceBindingRequest" }, "examples": { "approve": { "value": { "operator_id": "123", "operation_type": "TOKEN_DEVICE_BINDING_APPROVE", "operation_reason": "FOUND_DEVICE", "activation_code": "1", "device_id": "1", "device_index": 0 } } } } } }, "responses": { "200": { "description": "Operation successfully executed.", "content": { "application/json": { "schema": { "type": "object", "properties": { "network_ack": { "type": "boolean", "description": "Was the network operation acknowledged?" } } }, "examples": { "ok": { "value": { "network_ack": true } } } } } }, "400": { "$ref": "#/components/responses/400BadRequest" }, "401": { "$ref": "#/components/responses/401Unauthorized" }, "500": { "$ref": "#/components/responses/500InternalServerError" } } } } } } ```