---
updatedAt: 2026-09-23T13:19:59.000Z
agentTools:
  projectIndex: https://docs.pci-proxy.com/llms.txt
---

# Get tokenization

Retrieve tokens from Secure Fields or Mobile SDK integrations

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "PCI Proxy API Reference (Datatrans Endpoints)",
    "description": "OpenAPI Spec containing Datatrans endpoints for PCI Proxy customers",
    "contact": {
      "url": "https://docs.pci-proxy.com",
      "email": "support@pci-proxy.com"
    },
    "version": "${json.api.version}"
  },
  "servers": [
    {
      "url": "https://api.sandbox.datatrans.com",
      "description": "Sandbox"
    },
    {
      "url": "https://api.datatrans.com",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "/v1/tokenizations"
    }
  ],
  "paths": {
    "/v1/tokenizations/{tokenizationId}": {
      "post": {
        "tags": [
          "/v1/tokenizations"
        ],
        "summary": "Get tokenization",
        "description": "Retrieve tokens from Secure Fields or Mobile SDK integrations",
        "operationId": "tokenizationsGet",
        "parameters": [
          {
            "name": "tokenizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully returned tokenization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenizationGetResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenizationsResponseBase"
                }
              }
            }
          }
        },
        "security": [
          {
            "Basic": []
          }
        ],
        "x-codeSamples": [
          {
            "label": "curl",
            "source": "curl -i -X GET https://api.sandbox.datatrans.com/v1/aliases/AFBWlDuSAAEAAAGhC19o-9H94c-xAGTw \n\t--user {merchantId}:{password} \n",
            "lang": "shell"
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "CardInfo": {
        "type": "object",
        "properties": {
          "brand": {
            "type": "string",
            "description": "The brand of the credit card (e.g. VISA CREDIT)."
          },
          "coBrand": {
            "type": "string",
            "description": "The coBrand of the card"
          },
          "type": {
            "type": "string",
            "description": "The type of the card (`credit`, `debit` or `prepaid`). The property will not be present if the card type is unknown."
          },
          "usage": {
            "type": "string",
            "description": "The usage of the card (`consumer`, `corporate` or `unknown`)."
          },
          "country": {
            "type": "string",
            "description": "2 letter ISO 3166-1 alpha-2 country code."
          },
          "issuer": {
            "type": "string",
            "description": "The issuer of the card."
          },
          "accountType": {
            "type": "string",
            "enum": [
              "PAN",
              "TOKEN"
            ]
          },
          "binLength": {
            "type": "integer",
            "description": "The bin length, if known.",
            "format": "int32"
          }
        },
        "description": "The card information if the request was done with a card object"
      },
      "MultiToken": {
        "type": "object",
        "properties": {
          "cavv": {
            "type": "string"
          },
          "merchantIdentifier": {
            "type": "string"
          },
          "amount": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "NetworkTokenError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "SERVICE_NOT_ALLOWED",
              "TOKEN_PROVIDER_UNAVAILABLE",
              "MISSING_FIELD",
              "DECLINED",
              "REQUIRE_ADDITIONAL_AUTHENTICATION",
              "WAITING_ACTIVATION",
              "INTERNAL_ERROR",
              "UNKNOWN_ERROR"
            ]
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ThreeDInfo": {
        "type": "object",
        "properties": {
          "cavv": {
            "type": "string",
            "description": "The cavv of the card."
          },
          "eci": {
            "type": "string",
            "description": "The eci of the card."
          },
          "multiToken": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MultiToken"
            }
          }
        },
        "description": "The 3D information of the card."
      },
      "TokenInfo": {
        "type": "object",
        "properties": {
          "expiryMonth": {
            "maxLength": 2,
            "minLength": 2,
            "pattern": "\\d{2}",
            "type": "string",
            "description": "The expiry month of the scheme token."
          },
          "expiryYear": {
            "maxLength": 2,
            "minLength": 2,
            "pattern": "\\d{2}",
            "type": "string",
            "description": "The expiry year of the scheme token."
          },
          "status": {
            "type": "string",
            "description": "The status of the scheme token",
            "enum": [
              "INACTIVE",
              "ACTIVE",
              "SUSPENDED",
              "DELETED",
              "PENDING",
              "FAILED"
            ]
          },
          "paymentAccountReference": {
            "maxLength": 29,
            "minLength": 0,
            "type": "string",
            "description": "The Payment Account Reference of the scheme token",
            "example": "5001a9f027e5629d11e3949a0800a"
          },
          "tokenRequestorId": {
            "type": "string",
            "description": "The token requestor id"
          },
          "token": {
            "type": "string",
            "description": "Scheme token"
          },
          "reason": {
            "$ref": "#/components/schemas/NetworkTokenError"
          }
        },
        "description": "Scheme token details. This information is only available if the card behind the alias has been tokenized."
      },
      "TokenizationGetResponse": {
        "type": "object",
        "properties": {
          "paymentMethod": {
            "type": "string"
          },
          "alias": {
            "type": "string",
            "description": "The resulting alias, if requested or available.",
            "example": "AAABeCBPbiHssdexyrAAAYkaznYWAPYt",
            "externalDocs": {
              "url": "https://docs.datatrans.ch/docs/tokenization#section-token-format"
            }
          },
          "fingerprint": {
            "maxLength": 24,
            "minLength": 24,
            "pattern": "F-[A-Za-z0-9_-]{22}",
            "type": "string",
            "description": "An unique identifier of the card number. Useful to identify multiple customers' or the same customer's transactions where the same card was used.",
            "example": "F-coGuJQ55tUk8CnKGI9PX1T"
          },
          "maskedCard": {
            "type": "string"
          },
          "aliasCVV": {
            "type": "string"
          },
          "aliasIban": {
            "type": "string"
          },
          "maskedIban": {
            "type": "string"
          },
          "aliasAccountNumber": {
            "type": "string"
          },
          "maskedAccountNumber": {
            "type": "string"
          },
          "aliasBranchCode": {
            "type": "string"
          },
          "expiryYear": {
            "pattern": "\\d{2}",
            "type": "string",
            "description": "The expiry year of the card behind the alias."
          },
          "expiryMonth": {
            "pattern": "\\d{2}",
            "type": "string",
            "description": "The expiry month of the card behind the alias."
          },
          "cardInfo": {
            "$ref": "#/components/schemas/CardInfo"
          },
          "walletIndicator": {
            "type": "string",
            "enum": [
              "APL",
              "PAY",
              "C2P"
            ]
          },
          "networkToken": {
            "$ref": "#/components/schemas/TokenInfo"
          },
          "3D": {
            "$ref": "#/components/schemas/ThreeDInfo"
          },
          "last4": {
            "type": "string"
          },
          "usage": {
            "type": "string",
            "enum": [
              "SIMPLE",
              "REGISTRATION"
            ]
          }
        }
      },
      "TokenizationsError": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/TokenizationsErrorCode"
          },
          "message": {
            "type": "string",
            "description": "A human readable message indicating what went wrong."
          }
        }
      },
      "TokenizationsErrorCode": {
        "type": "string",
        "enum": [
          "BLOCKED_BY_VELOCITY_CHECKER",
          "INVALID_EXPIRATION",
          "INVALID_IBAN",
          "NOT_FOUND",
          "CLIENT_ERROR",
          "INVALID_JSON_PAYLOAD",
          "CONCURRENT_LIMIT_REACHED",
          "TOKENIZATION_NOT_FOUND",
          "COULD_NOT_DECRYPT_TOKEN",
          "BLOCKED_CARD",
          "INVALID_CVV",
          "UNKNOWN_ERROR",
          "FORBIDDEN",
          "UNRECOGNIZED_PROPERTY",
          "INVALID_STATE",
          "SERVER_ERROR",
          "UNAUTHORIZED",
          "INVALID_PROPERTY",
          "INVALID_HEADER",
          "TOKENIZATION_EXPIRED",
          "INVALID_CARD"
        ]
      },
      "TokenizationsResponseBase": {
        "type": "object",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/TokenizationsError"
          }
        }
      }
    },
    "securitySchemes": {
      "Basic": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": false
  },
  "x-tagGroups": [
    {
      "name": "Tokenizations",
      "tags": [
        "/v1/tokenizations"
      ]
    },
    {
      "name": "Vault API",
      "tags": [
        "/v1/aliases"
      ]
    },
    {
      "name": "Transactions",
      "tags": [
        "/v1/transactions"
      ]
    }
  ]
}
```