---
title: Load Token
slug: load-token
createdAt: 2023-09-22T04:41:57.775Z
---

:::ApiMethodV2
```json
{
  "name": "Load",
  "method": "PATCH",
  "url": "https://secure.paydocker.com/{version}/token/{partnerid}/{randomkey}/load",
  "description": "",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "PBpX6fSk5Q_3UamH2coOC",
        "language": "json",
        "code": "{\n    \"share_secret\":\"string\",\n    \"token_event\": \"string\",\n    \"source_id\": \"string\",\n    \"load_amount\": \"string\",\n    \"token_id\": \"string\",\n    \"check_in\": \"string\",\n    \"check_out\": \"string\",\n    \"room_count\": \"number\"\n}",
        "customLabel": ""
      },
      {
        "id": "R9v1nVxBnBQOgtYL5MmHU",
        "language": "curl",
        "code": "curl --location -g --request PATCH 'https://secure.paydocker.com/{version}/token/{partnerid}/{randomkey}/load' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\"share_secret\":\"string\",\"token_event\":\"string\",\"source_id\":\"string\",\"load_amount\":\"string\",\"token_id\":\"string\"}'",
        "customLabel": ""
      },
      {
        "id": "Ci4fzw_0rj-WDo7jFu3fv",
        "language": "nodejs",
        "code": "var request = require('request');\nvar options = {\n   'method': 'PATCH',\n   'url': 'https://secure.paydocker.com/{version}/token/{partnerid}/{randomkey}/load',\n   'headers': {\n      'Accept': 'application/json',\n      'Content-Type': 'application/json'\n   },\n   body: JSON.stringify({\n      \"share_secret\": \"string\",\n      \"token_event\": \"string\",\n      \"source_id\": \"string\",\n      \"load_amount\": \"string\",\n      \"token_id\": \"string\"\n   })\n\n};\nrequest(options, function (error, response) {\n   if (error) throw new Error(error);\n   console.log(response.body);\n});\n",
        "customLabel": ""
      },
      {
        "id": "Pi8XVclTMLGF7ZB9H075M",
        "language": "javascript",
        "code": "var myHeaders = new Headers();\nmyHeaders.append(\"Accept\", \"application/json\");\nmyHeaders.append(\"Content-Type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"share_secret\": \"string\",\n   \"token_event\": \"string\",\n   \"source_id\": \"string\",\n   \"load_amount\": \"string\",\n   \"token_id\": \"string\"\n});\n\nvar requestOptions = {\n   method: 'PATCH',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://secure.paydocker.com/{version}/token/{partnerid}/{randomkey}/load\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "customLabel": ""
      },
      {
        "id": "Jw53d3Edu0cUvPAJF7udf",
        "language": "python",
        "code": "import requests\nimport json\n\nurl = \"https://secure.paydocker.com/{version}/token/{partnerid}/{randomkey}/load\"\n\npayload = json.dumps({\n   \"share_secret\": \"string\",\n   \"token_event\": \"string\",\n   \"source_id\": \"string\",\n   \"load_amount\": \"string\",\n   \"token_id\": \"string\"\n})\nheaders = {\n   'Accept': 'application/json',\n   'Content-Type': 'application/json'\n}\n\nresponse = requests.request(\"PATCH\", url, headers=headers, data=payload)\n\nprint(response.text)\n",
        "customLabel": ""
      },
      {
        "id": "cwX4rNEWUsXXsqhHIXgZb",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://secure.paydocker.com/{version}/token/{partnerid}/{randomkey}/load\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Patch.new(url)\nrequest[\"Accept\"] = \"application/json\"\nrequest[\"Content-Type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"share_secret\": \"string\",\n   \"token_event\": \"string\",\n   \"source_id\": \"string\",\n   \"load_amount\": \"string\",\n   \"token_id\": \"string\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "PBpX6fSk5Q_3UamH2coOC"
  },
  "results": {
    "languages": [
      {
        "id": "SB4GKpmBkXSgTn2WHkUXI",
        "language": "200",
        "customLabel": "",
        "code": "{\n   \"success\": true,\n   \"message\": \"Token Load Success\",\n   \"token_id\": \"34322345677898765\",\n   \"transaction_id\": \"34322345677898765\",\n   \"fee_amount\": \"100.50\"\n\n}\n"
      },
      {
        "id": "o-fyLruWgSQx-NXmcFyyr",
        "language": "405",
        "customLabel": "",
        "code": "{\n  \"success\": \"false\",\n  \"errors\": {\n    \"code\": \"405\",\n    \"message\": \"Method Not Allowed\"\n  }\n}"
      },
      {
        "id": "06n9OI_nLuEiDCIu4aCiH",
        "language": "428",
        "code": "{\n  \"success\": \"false\",\n  \"errors\": {\n    \"code\": \"428\",\n    \"message\": \"Token ID doesn't match\"\n  }\n}",
        "customLabel": ""
      },
      {
        "id": "94-iov4-KGuK_hEnNuS2w",
        "language": "429",
        "code": "{\n  \"success\": \"false\",\n  \"errors\": {\n    \"code\": \"429\",\n    \"message\": \"Token ID already deleted\"\n  }\n}",
        "customLabel": ""
      },
      {
        "id": "mRdg5EwESxst3RxVNPVIS",
        "language": "403",
        "code": "{\n  \"success\": \"false\",\n  \"errors\": {\n    \"code\": \"403\",\n    \"message\": \"IP Not Allowed\"\n  }\n}",
        "customLabel": ""
      },
      {
        "id": "PDgu2iI7-xT_Hloqm_-Rm",
        "language": "406",
        "code": "{\n  \"success\": \"false\",\n  \"errors\": {\n    \"code\": \"406\",\n    \"message\": \"Enpoint Bad Format\"\n  }\n}",
        "customLabel": ""
      },
      {
        "id": "jcO6-L1wJt9MqOR808i88",
        "language": "408",
        "code": "{\n  \"success\": \"false\",\n  \"errors\": {\n    \"code\": \"408\",\n    \"message\": \"Endpoint Suspended\"\n  }\n}",
        "customLabel": ""
      },
      {
        "id": "jy12i148xkC0T7VakpvSA",
        "language": "409",
        "code": "{\n  \"success\": \"false\",\n  \"errors\": {\n    \"code\": \"409\",\n    \"message\": \"Event Not Allowed\"\n  }\n}",
        "customLabel": ""
      },
      {
        "id": "3SsSF2CA_DS_1LByexOyJ",
        "language": "410",
        "code": "{\n  \"success\": \"false\",\n  \"errors\": {\n    \"code\": \"410\",\n    \"message\": \"Invalid Secret Key\"\n  }\n}",
        "customLabel": ""
      },
      {
        "id": "MbLneB_a_5-1v4uLFdj3t",
        "language": "411",
        "code": "{\n  \"success\": \"false\",\n  \"errors\": {\n    \"code\": \"411\",\n    \"message\": \"Invalid Balance ID\"\n  }\n}",
        "customLabel": ""
      },
      {
        "id": "d9cvJdpmNdG2fyYB2m7qk",
        "language": "412",
        "code": "{\n  \"success\": \"false\",\n  \"errors\": {\n    \"code\": \"412\",\n    \"message\": \"Balance ID is Inactive\"\n  }\n}",
        "customLabel": ""
      },
      {
        "id": "kABsgIAqO_aNf37gZEfr3",
        "language": "415",
        "code": "{\n  \"success\": \"false\",\n  \"errors\": {\n    \"code\": \"415\",\n    \"message\": \"Invalid Load Amount\"\n  }\n}",
        "customLabel": ""
      },
      {
        "id": "Sc6zsud7MeRdwCmrXvLM0",
        "language": "424",
        "code": "{\n  \"success\": \"false\",\n  \"errors\": {\n    \"code\": \"425\",\n    \"message\": \"Available Balance Exceeded\"\n  }\n}",
        "customLabel": ""
      },
      {
        "id": "2RP_M3o1hG-sAp3zAfomW",
        "language": "500",
        "code": "{\n  \"success\": \"false\",\n  \"errors\": {\n    \"code\": \"500\",\n    \"message\": \"Internal Server Error\"\n  }\n}",
        "customLabel": ""
      },
      {
        "id": "6RFs5fcFyPa_Pf-xk3yGJ",
        "language": "502",
        "code": "{\n  \"success\": \"false\",\n  \"errors\": {\n    \"code\": \"502\",\n    \"message\": \"Bad Gateway\"\n  }\n}",
        "customLabel": ""
      },
      {
        "id": "10sv--5mM7WOvVJTWkd1N",
        "language": "503",
        "code": "{\n  \"success\": \"false\",\n  \"errors\": {\n    \"code\": \"503\",\n    \"message\": \"Service Unavailable\"\n  }\n}",
        "customLabel": ""
      },
      {
        "id": "If1mXzcz_9ghrYbnrm3YO",
        "language": "504",
        "code": "{\n  \"success\": \"false\",\n  \"errors\": {\n    \"code\": \"504\",\n    \"message\": \"Gateway Timeout\"\n  }\n}",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "If1mXzcz_9ghrYbnrm3YO"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "name": "share_secret",
        "kind": "required",
        "type": "string",
        "description": "Test mode secret keys and live mode secret keys are available in your PayDocker account under Integration menu.\n\nDon't share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.",
        "children": []
      },
      {
        "name": "token_event",
        "kind": "required",
        "type": "string",
        "description": "Used to identify the action connected to the token and the allowed action for this request would be \"load\".",
        "children": []
      },
      {
        "name": "source_id",
        "kind": "required",
        "type": "string",
        "description": "Your PayDocker Account ID assigned upon account creation (e.g. PDR1). It is case sensitive.",
        "children": []
      },
      {
        "name": "load_amount",
        "kind": "required",
        "type": "string",
        "description": "The sum added by the partner to the token, which the recipient can then collect. \n\nThe amount value supports up to twelwe digits (e.g. a value of 9,999,999,999.99) divided by decimal.",
        "children": []
      },
      {
        "name": "token_id",
        "kind": "required",
        "type": "string",
        "description": "The unique identifier associated with the token that the user is requesting a modification for. (e.g. 2908926013012565)",
        "children": []
      },
      {
        "name": "check_in",
        "kind": "required",
        "type": "string",
        "description": "The format is YYYY-MM-DD, e.g. 2023-12-21 \n\nSelectable date range up to 2 years before token creation day to up to 2 years  in the future. ",
        "children": []
      },
      {
        "name": "check_out",
        "kind": "required",
        "type": "string",
        "description": "The format is YYYY-MM-DD, e.g. 2023-12-21\n\nSelectable date range is same or greater than check-in date, up to 90 days in the future.",
        "children": []
      },
      {
        "name": "room_count",
        "kind": "required",
        "type": "Number",
        "description": "Accepted value from 1 to 999",
        "children": []
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::

