---
title: Detokenize
slug: reference/detokenize
docTags: 
createdAt: 2026-08-23T06:01:06.452Z
---

{
  "id": "kHRp7exoRHXl7C7T40GF6",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://pci-tokenization-sandbox.checkouttools.com/v1/tokenization/detokenize",
    "servers": [
      {
        "url": "https://pci-tokenization-sandbox.checkouttools.com/v1/tokenization/detokenize"
      }
    ],
    "name": "Detokenize",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "TokenOrAliasPayload",
          "schema": [
            {
              "name": "token",
              "kind": "optional",
              "type": "string",
              "description": ""
            },
            {
              "name": "tokenAlias",
              "kind": "optional",
              "type": "object",
              "description": "",
              "example": "",
              "schema": [
                {
                  "name": "key",
                  "kind": "required",
                  "type": "string",
                  "description": ""
                },
                {
                  "name": "value",
                  "kind": "required",
                  "type": "string",
                  "description": ""
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/TokenOrAliasPayload",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "http",
          "name": "http",
          "kind": "optional",
          "type": "http",
          "description": "<p>site_id</p><div></div><p></p>",
          "scheme": "basic"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Default Response",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "FullPaymentMethodWithCVV",
            "schema": [
              {
                "name": "cardNumber",
                "kind": "required",
                "type": "string",
                "description": "",
                "minLength": 10,
                "maxLength": 19
              },
              {
                "name": "extra",
                "kind": "optional",
                "type": "map",
                "description": "",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "tokenAliases",
                "kind": "optional",
                "type": "map",
                "description": "",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "customerId",
                "kind": "optional",
                "type": "object",
                "description": "",
                "complexType": "anyOf",
                "complexItems": [],
                "schema": []
              },
              {
                "name": "expirationMonth",
                "kind": "required",
                "type": "integer",
                "description": "",
                "minimum": 1,
                "maximum": 12
              },
              {
                "name": "expirationYear",
                "kind": "required",
                "type": "integer",
                "description": "",
                "minimum": 2000,
                "maximum": 2125
              },
              {
                "name": "cardHolderName",
                "kind": "required",
                "type": "string",
                "description": "",
                "minLength": 1,
                "maxLength": 100
              },
              {
                "name": "cvc",
                "kind": "optional",
                "type": "object",
                "description": "",
                "complexType": "anyOf",
                "complexItems": [],
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/FullPaymentMethodWithCVV",
            "complexItems": [
              {
                "name": "object",
                "schema": [
                  {
                    "name": "cardNumber",
                    "kind": "required",
                    "type": "string",
                    "description": "",
                    "minLength": 10,
                    "maxLength": 19
                  },
                  {
                    "name": "extra",
                    "kind": "optional",
                    "type": "map",
                    "description": "",
                    "example": "",
                    "customType": "map<string, string>",
                    "schema": []
                  },
                  {
                    "name": "tokenAliases",
                    "kind": "optional",
                    "type": "map",
                    "description": "",
                    "example": "",
                    "customType": "map<string, string>",
                    "schema": []
                  },
                  {
                    "name": "customerId",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "complexType": "anyOf",
                    "complexItems": [],
                    "schema": []
                  },
                  {
                    "name": "expirationMonth",
                    "kind": "required",
                    "type": "integer",
                    "description": "",
                    "minimum": 1,
                    "maximum": 12
                  },
                  {
                    "name": "expirationYear",
                    "kind": "required",
                    "type": "integer",
                    "description": "",
                    "minimum": 2000,
                    "maximum": 2125
                  },
                  {
                    "name": "cardHolderName",
                    "kind": "required",
                    "type": "string",
                    "description": "",
                    "minLength": 1,
                    "maxLength": 100
                  }
                ],
                "modelRef": "#/components/schemas/FullPaymentMethodNoCVV",
                "customType": "FullPaymentMethodNoCVV"
              },
              {
                "name": "object",
                "schema": [
                  {
                    "name": "cvc",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "complexType": "anyOf",
                    "complexItems": [],
                    "schema": []
                  }
                ]
              }
            ],
            "complexType": "allOf",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Default Response",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "TokenizationErrorResponse",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/TokenizationErrorResponse",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "IfdDhPvNG9PmPWcalWpRF",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://pci-tokenization-sandbox.checkouttools.com/v1/tokenization/detokenize \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"tokenAlias\": {\n     \"key\": \"\",\n     \"value\": \"\"\n     }\n     }'"
        },
        {
          "id": "EN2vKnP1B8NOUuc8UdhZh",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"tokenAlias\": {\n      \"key\": \"\",\n      \"value\": \"\"\n   }\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://pci-tokenization-sandbox.checkouttools.com/v1/tokenization/detokenize\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "vNuwVCRiIgtLHwH7wNsXY",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://pci-tokenization-sandbox.checkouttools.com/v1/tokenization/detokenize\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"tokenAlias\": {\n      \"key\": \"\",\n      \"value\": \"\"\n   }\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "tWJJHfDvfFGOwn4sFJXlH",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://pci-tokenization-sandbox.checkouttools.com/v1/tokenization/detokenize\"\n\npayload = json.dumps({\n   \"tokenAlias\": {\n      \"key\": \"\",\n      \"value\": \"\"\n   }\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "IfdDhPvNG9PmPWcalWpRF"
    },
    "results": {
      "languages": [
        {
          "id": "sVmvOUB4BGg97qFEJYbdc",
          "language": "200",
          "code": "// Default Response\n{\n  \"cardNumber\": \"\",\n  \"extra\": \"\",\n  \"tokenAliases\": \"\",\n  \"customerId\": {},\n  \"expirationMonth\": 0,\n  \"expirationYear\": 0,\n  \"cardHolderName\": \"\",\n  \"cvc\": {}\n}"
        },
        {
          "id": "OG6jpmlxgVlHP2bk_slDQ",
          "language": "400",
          "code": "// Default Response\n{\n  \"message\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "sVmvOUB4BGg97qFEJYbdc"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}