# Get card tokens Gets token information given a card ID in the path. **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": "Card lifecycle", "description": "Card lifecycle endpoints" } ], "components": { "parameters": { "CardIDpath": { "name": "cardId", "in": "path", "schema": { "type": "string" }, "description": "Pismo card ID", "required": true } }, "schemas": { "AccountID": { "type": "number", "description": "Pismo account ID", "example": 8675309 }, "CardID": { "type": "number", "description": "Card ID", "example": 6743052 }, "ErrorObject": { "type": "object", "description": "Standard error object", "properties": { "error_code": { "type": "string", "description": "Error code" }, "message": { "type": "string", "description": "Error message" } } }, "OrgID": { "type": "string", "description": "Pismo organiztion/tenant ID", "example": "TN-ddce7e50-0485-49ec-a910-866dff0bfd0f" }, "PaymentAppInstanceID": { "type": "string", "description": "Payment app instance ID" }, "ProgramID": { "type": "string", "description": "Pismo program ID", "example": "8675" }, "TokenID": { "type": "string", "description": "Pismo token ID", "example": "412" }, "TokenInfoCardResponse": { "type": "object", "properties": { "tokens": { "type": "array", "items": { "type": "object", "properties": { "token": { "$ref": "#/components/schemas/TokenObject" }, "token_id": { "$ref": "#/components/schemas/TokenID" }, "card_id": { "$ref": "#/components/schemas/CardID" }, "wallet_id": { "$ref": "#/components/schemas/WalletID" }, "account_id": { "$ref": "#/components/schemas/AccountID" }, "program_id": { "$ref": "#/components/schemas/ProgramID" }, "org_id": { "$ref": "#/components/schemas/OrgID" }, "payment_app_instance_id": { "$ref": "#/components/schemas/PaymentAppInstanceID" }, "tracking_id": { "$ref": "#/components/schemas/TrackingID" }, "status": { "$ref": "#/components/schemas/TokenStatus" } } } }, "network_data": { "type": "object" } } }, "TokenObject": { "type": "object", "properties": { "key": { "type": "object", "properties": { "token_ref": { "type": "string", "description": "Identifies the token on the network.", "example": "PISMOMOCK000007767550841" }, "pan_ref": { "type": "string", "description": "PAN reference - identifies the card on the network.", "example": "V-2271272911360823654091" }, "payment_network": { "type": "string", "description": "Payment network - `vts` (VISA) or `mdes` (Mastercard)", "enum": [ "vts", "mdes" ], "example": "mdes" } } } } }, "TokenStatus": { "type": "string", "description": "Token status", "enum": [ "ACTIVE", "SUSPENDED", "DEACTIVATED", "INACTIVE" ], "example": "ACTIVE" }, "TrackingID": { "type": "string", "description": "Tracking ID" }, "WalletID": { "type": "string", "description": "Wallet ID. Identifies the wallet (Samsung Pay, Google Pay, and so on) on the network.", "example": "ANDROID_PAY" } }, "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": { "parameters": [ { "$ref": "#/components/parameters/CardIDpath" } ], "get": { "summary": "Get card tokens", "description": "Gets token information given a card ID in the path.\n\n**Notes**: \n\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": "get-card-token-info", "tags": [ "Card lifecycle" ], "parameters": [ { "$ref": "#/components/parameters/CardIDpath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TokenInfoCardResponse" }, "examples": { "visa": { "summary": "Example Visa response", "value": { "tokens": [ { "key": { "token_ref": "DNITHE302414169033123456", "pan_ref": "V-3024135706614877123456", "payment_network": "vts" }, "token_id": "101178", "card_id": 71298, "wallet_id": "40000000045", "account_id": 127020000, "program_id": "10000", "org_id": "TN-542d1ef4-ed10-4be2-a4e1-4ac00000000", "payment_app_instance_id": "PISMOMOCKK3XvRHPjIDWFZErHEDytVg2MPJ6P7OM4JUq", "tracking_id": "D0000203850882", "status": "ACTIVE", "updated_at": "2024-05-10T16:40:20-03:00" }, { "key": { "token_ref": "DNITHE3024141600000000", "pan_ref": "V-3024135706600000000000", "payment_network": "vts" }, "token_id": "101000000", "card_id": 71200000, "wallet_id": "40010075338", "account_id": 1270000, "program_id": "10000", "org_id": "TN-542d1ef4-ed10-4be2-a4e1-400000000", "payment_app_instance_id": "", "tracking_id": "", "status": "ACTIVE" }, { "key": { "token_ref": "DNITHE30241416000000000", "pan_ref": "V-30241357066148777000000", "payment_network": "vts" }, "token_id": "1011", "card_id": 7129, "wallet_id": "40000000044", "account_id": 12701, "program_id": "10000", "org_id": "TN-542d1ef4-ed10-4be2-a4e1-40000000000", "payment_app_instance_id": "", "tracking_id": "", "status": "ACTIVE" }, { "key": { "token_ref": "DNITHE3024141700000000", "pan_ref": "V-3024135706614000000000", "payment_network": "vts" }, "token_id": "1011", "card_id": 7125, "wallet_id": "40010075001", "account_id": 12750000, "program_id": "100000,", "org_id": "TN-542d1ef4-ed10-4be2-a4e1-00000000", "payment_app_instance_id": "", "tracking_id": "", "status": "DEACTIVATED" } ], "network_data": { "tokenDetails": [ { "tokenRequestorID": 40000000045, "tokenReferenceID": "DNITHE30241416900000000", "panReferenceID": "V-3024135706614800000000", "entityOfLastAction": "TOKEN_REQUESTOR", "walletAccountEmailAddressHash": "CE62283F46849994E08CADB975A95565C14F86FEE9792907B13A700000000", "clientWalletAccountID": "40000000045", "panSource": "KEY_ENTERED", "tokenType": "CARD_ON_FILE", "tokenStatus": "ACTIVE", "lastFourOfPAN": "6893" }, { "tokenRequestorID": 40010075338, "tokenReferenceID": "DNITHE30241416900000000", "panReferenceID": "V-3024135706614800000000", "entityOfLastAction": "TOKEN_REQUESTOR", "walletAccountEmailAddressHash": "CE62283F46849994E08CADB975A95565C14F86FEE9792907B1300000000", "clientWalletAccountID": "PM123", "panSource": "KEY_ENTERED", "tokenType": "ECOMMERCE", "tokenStatus": "ACTIVE", "lastFourOfPAN": "6893" }, { "tokenRequestorID": 40000000044, "tokenReferenceID": "DNITHE30241416900000000", "panReferenceID": "V-3024135706614800000000", "entityOfLastAction": "TOKEN_REQUESTOR", "walletAccountEmailAddressHash": "CE62283F46849994E08CADB975A95565C14F86FEE9792907B13A000000008", "clientWalletAccountID": "Muj00000000", "panSource": "KEY_ENTERED", "tokenType": "ECOMMERCE", "tokenStatus": "ACTIVE", "lastFourOfPAN": "6893" } ] } } }, "mastercard": { "summary": "Example Mastercard response", "value": { "tokens": [ { "key": { "token_ref": "DSHRMC1BR0000000481138760dec4cf8a00000000", "pan_ref": "FSHRMC1BR0000000c790c134701d4ba48c9d00000000" }, "payment_network": "mdes", "token_id\"": 10117, "card_id": 9024, "wallet_id": "216", "account_id": 18, "program_id": "9000", "org_id": "TN-d9abe1c7-f6b4-4b0a-b796-00000000", "payment_app_instance_id": "jHfrTg8qRRS8ZK3XvRHPjIDWFZErHEDytV00000000", "tracking_id": "D0000203850882", "status": "ACTIVE" } ], "network_data": { "SearchResponse": { "Accounts": { "Account": { "AccountPanSuffix\"": "3733", "ExpirationDate\"": "0729", "Tokens": { "Token": [ { "AccountPanSequenceNumber": "000", "CorrelationId": "D00000000000", "CurrentStatusCode": "D", "CurrentStatusDateTime": "2024-07-01T15:52:39-05:00", "CurrentStatusDescription": "Deleted", "Device": { "DeviceType": "21" }, "DigitizationRequestDateTime": "2024-07-01T15:18:09-05:00", "ExpirationDate": "0827", "FinalTokenizationDecision": "A", "LastCommentId": "676521782", "PaymentAppInstanceId\"": "jHfrTg8qRRS8ZK3XvRHPjIDWFZErHEDytVg2MP00000000", "PrimaryAccountNumberUniqueReference": "FSHRMC1BR0000000c790c13470100000000", "ProvisioningStatusCode": "S", "ProvisioningStatusDescription": "Provisioning successful", "Source": "ACCOUNT_ADDED_VIA_APPLICATION", "StorageTechnology": "D", "Suspenders": {}, "TokenActivatedDateTime": "2024-07-01T15:18:31-05:00", "TokenDeletedFromConsumerApp": "false", "TokenRequestorId": "50120834693", "TokenRequestorName": "GOOGLE", "TokenSuffix": "5740", "TokenType": "C", "TokenUniqueReference": "DSHRMC1BR0000000481138760dec4cf800000000", "WalletId": "216" } ] } } } } } } } } } } }, "400": { "$ref": "#/components/responses/400BadRequest" }, "401": { "$ref": "#/components/responses/401Unauthorized" }, "500": { "$ref": "#/components/responses/500InternalServerError" } } } } } } ```