{"_id":"565d025e77f0090d00581829","category":{"_id":"55e4e0803325e60d007fbee7","version":"55de36ec9067202b00de0015","__v":16,"project":"55dd0853d2d97337001800e2","pages":["55e9e5fbbc521e2b006a0f5f","55e9f53a0b48a121002ab3c3","55e9f643b44f7b1700e4525f","55e9f689b44f7b1700e45261","55e9f6bfc62aa02f008229a3","55f8e2f2c449610d002dafdc","55f8e37e3bb4bb0d0022d0ec","55f8e63fc449610d002dafea","55f8e6e5c7ef770d00d9bdeb","56093331c5cff70d007d0137","5609396e31beb60d001b65bd","560943af6d8c440d000c7a77","565c9b98f8bc860d00684299","565c9de2f8bc860d0068429e","565c9e02c23e2f0d00383d04","565d025e77f0090d00581829"],"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-08-31T23:17:20.258Z","from_sync":false,"order":4,"slug":"tokens","title":"Tokens"},"project":"55dd0853d2d97337001800e2","version":{"_id":"55de36ec9067202b00de0015","__v":33,"project":"55dd0853d2d97337001800e2","createdAt":"2015-08-26T22:00:12.384Z","releaseDate":"2015-08-26T22:00:12.383Z","categories":["55de36ed9067202b00de0016","55de36ed9067202b00de0017","55de36ed9067202b00de0018","55df7dcd437b3f0d004ba204","55e4e014177b6e0d00333141","55e4e01fe252ac0d00303a99","55e4e05240cda60d003bad67","55e4e070177b6e0d00333142","55e4e0753325e60d007fbee6","55e4e0803325e60d007fbee7","55e4e086177b6e0d00333143","55e4e0a1177b6e0d00333144","55e4e0aa3325e60d007fbee8","55e4e0b140cda60d003bad6b","55e4e0bae252ac0d00303a9d","55e4e0c5177b6e0d00333145","55e4e0ee3325e60d007fbeea","55e4e0fae252ac0d00303a9e","55e4e100177b6e0d00333147","55f85c8ba3271b0d00498d55","56092e1ac5cff70d007d0131","564b64a3ee12850d0095866e","564b64b5791099170071e9ea","565cd0bfd18ae50d007183d8","565f5f5d6bafd40d0030a063","565f790d6bafd40d0030a09f","56611c464851190d003f9f5d","56637d5b7988ab0d00d0522e","56637d687988ab0d00d0522f","567835df6928b40d009dd650","56e59c043c29b117008dae5b","5704013559c5190e000ab646","572be252de40590e00026934","58af1bf6ebd7370f0078ba09","5cdad81d912ece0039e9a939"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"3.0.0","version":"3.0"},"githubsync":"","user":"55dd080d0efd5821000d53b3","__v":34,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-12-01T02:13:50.103Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":true,"order":0,"body":"[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"Secure\",\n  \"body\": \"Tokenizing utilizes javascript to send payment data on the client-side so that sensitive payment data never hits your backend servers.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"What is a token?\",\n  \"body\": \"A token is a secure representation of sensitive payment method details. Instead of handling the payment method directly, you can safely pass the token to your servers and request a payment.\"\n}\n[/block]\n## Request\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Card or Bank\",\n  \"body\": \"The request should contain either a \\\"card\\\" parameter or a \\\"bank\\\" parameter, but not both.\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Specification\",\n    \"0-0\": \"card\",\n    \"1-0\": \"bank\",\n    \"0-1\": \"**Type**: JSON Object\\n**Format**: [Card](doc:the-card-resource) \\n**Description**: The card that is to be tokenized\",\n    \"1-1\": \"**Type**: JSON Object\\n**Format**: [Bank](doc:the-bank-resource) \\n**Description**: The bank that is to be charged for this payment\"\n  },\n  \"cols\": 2,\n  \"rows\": 2\n}\n[/block]\n## Response\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"id\",\n    \"1-0\": \"object\",\n    \"2-0\": \"used\",\n    \"3-0\": \"reusable\",\n    \"6-0\": \"status\",\n    \"7-0\": \"created\",\n    \"8-0\": \"lastUpdated\",\n    \"4-0\": \"card\",\n    \"5-0\": \"bank\",\n    \"0-1\": \"The unique identifier for the token.\",\n    \"8-1\": \"The date the token was last updated.\",\n    \"7-1\": \"The date the token was created.\",\n    \"6-1\": \"The current status of the token. One of: \\\"created\\\", \\\"active\\\", \\\"disabled\\\"\",\n    \"1-1\": \"Will have value \\\"token\\\" indicating that the object is a token response.\",\n    \"2-1\": \"Boolean value indicating if the token has been used previously\",\n    \"3-1\": \"Boolean value indicating if the token can be used multiple times.\",\n    \"4-1\": \"Embedded [Card](doc:the-card-resource) object\",\n    \"5-1\": \"Embedded [Bank](doc:the-bank-resource) object\"\n  },\n  \"cols\": 2,\n  \"rows\": 9\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"card\\\": {..},\\n  \\\"bank\\\": {..}\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Token Request\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"object\\\": \\\"token\\\",\\n  \\\"id\\\": \\\"xyuhetyhji2ii6ivf1tdu667\\\",\\n  \\\"used\\\": false,\\n  \\\"reusable\\\": false,\\n  \\\"created\\\": \\\"2015-10-28T22:55:06.000Z\\\",\\n  \\\"lastUpdated\\\": \\\"2015-10-28T22:55:07.000Z\\\",\\n  \\\"status\\\": \\\"active\\\",\\n  \\\"card\\\": {..}\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Token Response\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"the-token-resource","type":"basic","title":"Token resource"}
[block:callout] { "type": "success", "title": "Secure", "body": "Tokenizing utilizes javascript to send payment data on the client-side so that sensitive payment data never hits your backend servers." } [/block] [block:callout] { "type": "info", "title": "What is a token?", "body": "A token is a secure representation of sensitive payment method details. Instead of handling the payment method directly, you can safely pass the token to your servers and request a payment." } [/block] ## Request [block:callout] { "type": "warning", "title": "Card or Bank", "body": "The request should contain either a \"card\" parameter or a \"bank\" parameter, but not both." } [/block] [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Specification", "0-0": "card", "1-0": "bank", "0-1": "**Type**: JSON Object\n**Format**: [Card](doc:the-card-resource) \n**Description**: The card that is to be tokenized", "1-1": "**Type**: JSON Object\n**Format**: [Bank](doc:the-bank-resource) \n**Description**: The bank that is to be charged for this payment" }, "cols": 2, "rows": 2 } [/block] ## Response [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Description", "0-0": "id", "1-0": "object", "2-0": "used", "3-0": "reusable", "6-0": "status", "7-0": "created", "8-0": "lastUpdated", "4-0": "card", "5-0": "bank", "0-1": "The unique identifier for the token.", "8-1": "The date the token was last updated.", "7-1": "The date the token was created.", "6-1": "The current status of the token. One of: \"created\", \"active\", \"disabled\"", "1-1": "Will have value \"token\" indicating that the object is a token response.", "2-1": "Boolean value indicating if the token has been used previously", "3-1": "Boolean value indicating if the token can be used multiple times.", "4-1": "Embedded [Card](doc:the-card-resource) object", "5-1": "Embedded [Bank](doc:the-bank-resource) object" }, "cols": 2, "rows": 9 } [/block] [block:code] { "codes": [ { "code": "{\n\t\"card\": {..},\n \"bank\": {..}\n}", "language": "json", "name": "Token Request" } ], "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"object\": \"token\",\n \"id\": \"xyuhetyhji2ii6ivf1tdu667\",\n \"used\": false,\n \"reusable\": false,\n \"created\": \"2015-10-28T22:55:06.000Z\",\n \"lastUpdated\": \"2015-10-28T22:55:07.000Z\",\n \"status\": \"active\",\n \"card\": {..}\n}", "language": "json", "name": "Token Response" } ], "sidebar": true } [/block]