{"_id":"5bd2a498d0932e005cf42e0d","project":"59f79e3c584eb200345ceafc","version":{"_id":"5ba178b00a916500030c6a21","project":"59f79e3c584eb200345ceafc","__v":24,"forked_from":"59f79e3c584eb200345ceaff","createdAt":"2015-09-17T03:47:20.956Z","releaseDate":"2015-09-17T03:47:20.956Z","categories":["5ba178b00a916500030c69a2","5ba178b00a916500030c69a3","5ba178b00a916500030c69a4","5ba178b00a916500030c69a5","5ba178b00a916500030c69a6","5ba178b00a916500030c69a7","5ba178b00a916500030c69a8","5ba178b00a916500030c69a9","5ba178b00a916500030c69aa","5ba178b00a916500030c69ab","5ba178b00a916500030c69ac","5afb6888212c690003ae3d3b","5ba178b00a916500030c69ad","5ba178b00a916500030c69ae","5ba2dcbc99f53f0003b97e2c","5babd73fa0ab3e0003ead030","5bb4038be7222e000334dd97","5bb55954478c1300031a44c2","5bb665a1607307000327c81e","5bb6f90229a7fb0003a0650d","5bb7f9bc29a7fb0003a07ac1","5bba58bd7ba7710003bd901d","5bba6dac7ba7710003bd908d","5bba6e257ba7710003bd9090","5bbac87810189c0003e619ea","5bbb9d02b5862c00036266b2","5bbbadb6219c3e000376c2de","5bc417751d1b0000182bf7f6","5bc59e3b2a5b4f0044db5b97","5bc7bbce2262cc0041f6eff2","5bce6a3580a7250031199f34","5bcfac2c4082510019f2d91b","5bcfac3757bed90030e45d68","5bcfac45d305bc0049941539","5bd2a43548bb6f00289c8fad","5bd3a42a026ebe001f66259e","5bd9d5afffe003005b02f97b","5becb7ee85c6b300557662b6"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":false,"codename":"","version_clean":"3.2.0","version":"3.2"},"category":{"_id":"5bd2a43548bb6f00289c8fad","project":"59f79e3c584eb200345ceafc","version":"5ba178b00a916500030c6a21","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2018-10-26T05:20:53.985Z","from_sync":false,"order":6,"slug":"card-processing","title":"Card Processing"},"user":"5557e76e512c300d007730d1","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-10-26T05:22:32.541Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"After you [Create a User](https://docs.synapsefi.com/v3.2/docs/create-a-user-1) and [OAuth the user](https://docs.synapsefi.com/v3.2/docs/oauth-the-user), you are ready to link a card.\n\nWe recommend using our [Interchange UI](https://docs.synapsefi.com/v3.2/docs/interchange-ui) to link a card, rather than building your own UI.\n\n##API Endpoint\nhttps://uat-api.synapsefi.com/v3.1/users/:user_id/nodes\n\n##PATH PARAMETER\n[block:html]\n{\n  \"html\": \"<div class=\\\"api-manager\\\"> <div class=\\\"param-table\\\"> <div class=\\\"table\\\"> <div class=\\\"tr\\\"> <div class=\\\"td param\\\"> <strong>user_id <span class=\\\"colon\\\">:</span> </strong> <div class=\\\"required\\\">required</div></div><div class=\\\"td\\\"> <strong class=\\\"param-type\\\">string</strong> <div marked=\\\"\\\" class=\\\"ng-isolate-scope\\\"> <p>The user ID of the user you wish to add the INTERCHANGE-US node under</p></div></div></div></div></div></div>\"\n}\n[/block]\n##BODY PARAMETER\n[block:html]\n{\n  \"html\": \"<div class=\\\"api-manager\\\"> <div class=\\\"param-table\\\"><div class=\\\"table\\\"> <div class=\\\"tr\\\"> <div class=\\\"td param\\\"> <strong>type <span class=\\\"colon\\\">:</span> </strong> <div class=\\\"required\\\">required</div></div><div class=\\\"td\\\"> <strong class=\\\"param-type\\\">string</strong> <div marked=\\\"\\\" class=\\\"ng-isolate-scope\\\"> <p>Type of node you wish to add (this is <code>INTERCHANGE-US</code></p></div></div></div><div class=\\\"tr\\\"> <div class=\\\"td param\\\"> <strong><span class=\\\"text-muted\\\">info.</span>nickname <span class=\\\"colon\\\">:</span> </strong> <div class=\\\"required\\\">required</div></div><div class=\\\"td\\\"> <strong class=\\\"param-type\\\">string</strong> <div marked=\\\"\\\" class=\\\"ng-isolate-scope\\\"> <p>Nickname for the node. It is very important to assign a nickname to the node for <code>INTERCHANGE-US</code>, because you can never retrieve the <code>card_number</code> back from the API</p></div></div></div><div class=\\\"tr\\\"> <div class=\\\"td param\\\"> <strong><span class=\\\"text-muted\\\">info.</span>card_number <span class=\\\"colon\\\">:</span> </strong> <div class=\\\"required\\\">required</div></div><div class=\\\"td\\\"> <strong class=\\\"param-type\\\">string</strong> <div marked=\\\"\\\" class=\\\"ng-isolate-scope\\\"> <p>Encrypted card number</p></div></div></div><div class=\\\"tr\\\"> <div class=\\\"td param\\\"> <strong><span class=\\\"text-muted\\\">info.</span>exp_date <span class=\\\"colon\\\">:</span> </strong> <div class=\\\"required\\\">required</div></div><div class=\\\"td\\\"> <strong class=\\\"param-type\\\">string</strong> <div marked=\\\"\\\" class=\\\"ng-isolate-scope\\\"> <p>Encrypted expiration date of the card <code>YYYYMM</code></p></div></div></div><div class=\\\"tr\\\"> <div class=\\\"td param\\\"> <strong><span class=\\\"text-muted\\\">info.</span>document_id <span class=\\\"colon\\\">:</span> </strong> <div class=\\\"required\\\">required</div></div><div class=\\\"td\\\"> <strong class=\\\"param-type\\\">string</strong> <div marked=\\\"\\\" class=\\\"ng-isolate-scope\\\"> <p>Document ID of user's base document that the card is associated with</p></div></div></div><div class=\\\"tr\\\"> <div class=\\\"td param\\\"> <strong><span class=\\\"text-muted\\\">extra.</span>supp_id <span class=\\\"colon\\\">:</span> </strong></div><div class=\\\"td\\\"> <strong class=\\\"param-type\\\">string</strong> <div marked=\\\"\\\" class=\\\"ng-isolate-scope\\\"> <p>Any ID you wish to register to the node</p></div></div></div><div class=\\\"tr\\\"> <div class=\\\"td param\\\"> <strong><span class=\\\"text-muted\\\">extra.</span>note <span class=\\\"colon\\\">:</span> </strong> </div><div class=\\\"td\\\"> <strong class=\\\"param-type\\\">string</strong> <div marked=\\\"\\\" class=\\\"ng-isolate-scope\\\"> <p>Memo tagged with the node</p></div></div></div><div class=\\\"tr\\\"> <div class=\\\"td param\\\"> <strong>is_active <span class=\\\"colon\\\">:</span> </strong></div><div class=\\\"td\\\"> <strong class=\\\"param-type\\\">string</strong> <div marked=\\\"\\\" class=\\\"ng-isolate-scope\\\"> <p>If the node is indexed or marked deleted.</p></div></div></div></div></div></div>\"\n}\n[/block]\n##EXAMPLE REQUEST\nYou will only need the card number and expiration date to link a card.  The CVV and billing address are not needed.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /v3.1/users/594e0fa2838454002ea317a0/nodes HTTP/1.1\\nHost: uat-api.synapsefi.com\\nX-SP-USER-IP: 127.0.0.1\\nX-SP-USER: oauth_auVIbQ8WXC0pnLU9ivEs4tcHDejqFJlwoNrZ3fO1|e83cf6ddcf778e37bfe3d48fc78a6502062fc\\nContent-Type: application/json\\n\\n{\\n  \\\"type\\\": \\\"INTERCHANGE-US\\\",\\n  \\\"info\\\": {\\n    \\\"nickname\\\": \\\"My Debit Card\\\",\\n    \\\"card_number\\\": \\\"Zoo8g2vBUjt7TwmEpRW8f6eQT3AOEEYePw2LkoxD+mO9lOT5OemHlGwgamgLGUbrmWu3DPwnEr2IqDy5YMFVgvQWP3w9nLOFzFFSW43auDgsVAqZScoRf8nI+6/B9KvOEV4XI8JeyXT+O+y3p3RtbiXGmYQNJ56Hy3hs2E5O+yn+3fpLfJQpVvNc38V+aE21VEsJuXFFNtS/8r4jJ6Dx/etTEaE/rtcEUEbwLLHFHjPiOWaHWZPuhXFLtyYrR9zG8FWSJVFwNTG/mEpv2O7We1iCB+9WoEKqdHyGwjjBcVgkUlU5huJIXv9xj53RGNvmHkDFTqgrlHpKkb0E/Ot0Zg==\\\",\\n    \\\"exp_date\\\": \\\"ctA4Zj1CP0WCiMefPYsyewVbIHNilfwA09X9NSCyWxft4WGwFZmZkhsBJh51QL751/iFkUHbd09ZpDYjS86PqyNPZ5LkBueGHDIghLwWyzH1l99RiIs8urOW9c4g3L1USD+kzzRAqG1DBkW47FAX6AhPSi3YgQd94ery1H+asaqDrP79ayzoJ+nRXeEqe83FIgNUk/J5+EcAz3JYnoBmp1sfz7a4zHkvk0eKCxQWLETdqvONyCZyXdC/4CkaCxJ/87VsN3i4+ToULtSluRv8xr1NpRhzipKiEKTYW1nvNDAaJQezTVP/+GxmTmQfnfpVNDpJbXjNrOTej1HgMFpg4w==\\\",\\n    \\\"document_id\\\": \\\"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8\\\"\\n  }\\n}\",\n      \"language\": \"http\"\n    }\n  ]\n}\n[/block]\n##EXAMPLE RESPONSE\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"error_code\\\": \\\"0\\\",\\n    \\\"http_code\\\": \\\"200\\\",\\n    \\\"limit\\\": 20,\\n    \\\"node_count\\\": 1,\\n    \\\"nodes\\\": [\\n        {\\n            \\\"_id\\\": \\\"594e21fc4d1d62002f17e37d\\\",\\n            \\\"_links\\\": {\\n                \\\"self\\\": {\\n                    \\\"href\\\": \\\"https://uat-api.synapsefi.com/v3.1/users/594e0fa2838454002ea317a0/nodes/594e21fc4d1d62002f17e37d\\\"\\n                }\\n            },\\n            \\\"allowed\\\": \\\"CREDIT-AND-DEBIT\\\",\\n            \\\"client\\\": {\\n                \\\"id\\\": \\\"589acd9ecb3cd400fa75ac06\\\",\\n                \\\"name\\\": \\\"SynapseFI\\\"\\n            },\\n            \\\"extra\\\": {\\n                \\\"other\\\": {},\\n                \\\"supp_id\\\": \\\"ABC124\\\"\\n            },\\n            \\\"info\\\": {\\n                \\\"nickname\\\": \\\"Bank of America Debit Card\\\",\\n                \\\"card_hash\\\": \\\"5d20f6c392348ed604241bee015af14519d47cc1cb61c31a256973a8d75cf939\\\",\\n                \\\"document_id\\\": \\\"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8\\\",\\n                \\\"is_international\\\": false,\\n                \\\"network\\\": \\\"VISA\\\",\\n                \\\"type\\\":\\\"DEBIT\\\"\\n            },\\n            \\\"is_active\\\": true,\\n            \\\"timeline\\\": [\\n                {\\n                    \\\"date\\\": 1498292731835,\\n                    \\\"note\\\": \\\"Node created.\\\"\\n                }\\n            ],\\n            \\\"type\\\": \\\"INTERCHANGE-US\\\",\\n            \\\"user_id\\\": \\\"594e0fa2838454002ea317a0\\\"\\n        }\\n    ],\\n    \\\"page_count\\\": 1,\\n    \\\"success\\\": true\\n}\",\n      \"language\": \"json\",\n      \"name\": \"200 Okay\"\n    }\n  ]\n}\n[/block]\n**Verifying the Card**\nUpon linking a card, a 1¢ transaction will be debited from the card to verify the card. The 1¢ transaction will reflect as canceled on the user's statement within 1-2 business days.\n\n**Node Status**\nView all Node Statuses [here.](https://docs.synapsefi.com/v3.2/docs/card-processing-intro#section-node-permissions) \n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"It is very important to assign a nickname to the INTERCHANGE-US node, because you can never retrieve the card_number back from the API.\",\n  \"title\": \"Always Assign a Nickname\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Subscribe to Webhooks\",\n  \"body\": \"We recommend that you [subscribe to webhooks](https://docs.synapsefi.com/v3.2/docs/subscribe-to-webhooks) to stay updated on the status of nodes.\"\n}\n[/block]\n**Testing in Sandbox: Sample Card Numbers**\nFollowing are the sample card numbers that you can use to test out your `INTERCHANGE-US` implementation.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Card Number\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Network\",\n    \"h-3\": \"Permission\",\n    \"0-0\": \"9401100999999992\",\n    \"1-0\": \"9401101999999990\",\n    \"2-0\": \"9401110999999991\",\n    \"3-0\": \"9401113999999995\",\n    \"4-0\": \"9401200999999990\",\n    \"5-0\": \"9401201999999998\",\n    \"6-0\": \"9401210999999999\",\n    \"7-0\": \"9401211999999997\",\n    \"8-0\": \"9401300999999998\",\n    \"9-0\": \"9401301999999996\",\n    \"10-0\": \"9401310999999997\",\n    \"11-0\": \"9401311999999995\",\n    \"12-0\": \"9021100999999992\",\n    \"13-0\": \"9021101999999990\",\n    \"14-0\": \"9021110999999991\",\n    \"15-0\": \"9021111999999999\",\n    \"16-0\": \"9021200999999990\",\n    \"17-0\": \"9021201999999998\",\n    \"18-0\": \"9021210999999999\",\n    \"19-0\": \"9021211999999997\",\n    \"20-0\": \"9021300999999998\",\n    \"21-0\": \"9021301999999996\",\n    \"22-0\": \"9021310999999997\",\n    \"23-0\": \"9021311999999995\",\n    \"24-0\": \"9501100999999991\",\n    \"25-0\": \"9501101999999999\",\n    \"26-0\": \"9501110999999990\",\n    \"27-0\": \"9501111999999998\",\n    \"28-0\": \"9501200999999999\",\n    \"29-0\": \"9501201999999997\",\n    \"30-0\": \"9501210999999998\",\n    \"31-0\": \"9501211999999996\",\n    \"32-0\": \"9501300999999997\",\n    \"33-0\": \"9501301999999995\",\n    \"34-0\": \"9501310999999996\",\n    \"35-0\": \"9501311999999994\",\n    \"0-3\": \"NONE (which means both credits and debits have been disabled by cardholder. So adding this card would fail.)\",\n    \"1-3\": \"CREDIT\",\n    \"2-3\": \"DEBIT\",\n    \"3-3\": \"CREDIT-AND-DEBIT\",\n    \"4-3\": \"NONE (which means both credits and debits have been disabled by cardholder. So adding this card would fail.)\",\n    \"8-3\": \"NONE (which means both credits and debits have been disabled by cardholder. So adding this card would fail.)\",\n    \"12-3\": \"NONE (which means both credits and debits have been disabled by cardholder. So adding this card would fail.)\",\n    \"16-3\": \"NONE (which means both credits and debits have been disabled by cardholder. So adding this card would fail.)\",\n    \"20-3\": \"NONE (which means both credits and debits have been disabled by cardholder. So adding this card would fail.)\",\n    \"24-3\": \"NONE (which means both credits and debits have been disabled by cardholder. So adding this card would fail.)\",\n    \"28-3\": \"NONE (which means both credits and debits have been disabled by cardholder. So adding this card would fail.)\",\n    \"32-3\": \"NONE (which means both credits and debits have been disabled by cardholder. So adding this card would fail.)\",\n    \"5-3\": \"CREDIT\",\n    \"9-3\": \"CREDIT\",\n    \"13-3\": \"CREDIT\",\n    \"17-3\": \"CREDIT\",\n    \"21-3\": \"CREDIT\",\n    \"25-3\": \"CREDIT\",\n    \"29-3\": \"CREDIT\",\n    \"33-3\": \"CREDIT\",\n    \"6-3\": \"DEBIT\",\n    \"10-3\": \"DEBIT\",\n    \"14-3\": \"DEBIT\",\n    \"18-3\": \"DEBIT\",\n    \"22-3\": \"DEBIT\",\n    \"26-3\": \"DEBIT\",\n    \"30-3\": \"DEBIT\",\n    \"34-3\": \"DEBIT\",\n    \"7-3\": \"CREDIT-AND-DEBIT\",\n    \"11-3\": \"CREDIT-AND-DEBIT\",\n    \"15-3\": \"CREDIT-AND-DEBIT\",\n    \"19-3\": \"CREDIT-AND-DEBIT\",\n    \"23-3\": \"CREDIT-AND-DEBIT\",\n    \"27-3\": \"CREDIT-AND-DEBIT\",\n    \"31-3\": \"CREDIT-AND-DEBIT\",\n    \"35-3\": \"CREDIT-AND-DEBIT\",\n    \"0-2\": \"VISA\",\n    \"1-2\": \"VISA\",\n    \"2-2\": \"VISA\",\n    \"3-2\": \"VISA\",\n    \"4-2\": \"VISA\",\n    \"5-2\": \"VISA\",\n    \"6-2\": \"VISA\",\n    \"7-2\": \"VISA\",\n    \"8-2\": \"VISA\",\n    \"9-2\": \"VISA\",\n    \"10-2\": \"VISA\",\n    \"11-2\": \"VISA\",\n    \"12-2\": \"DISCOVER\",\n    \"13-2\": \"DISCOVER\",\n    \"14-2\": \"DISCOVER\",\n    \"15-2\": \"DISCOVER\",\n    \"16-2\": \"DISCOVER\",\n    \"17-2\": \"DISCOVER\",\n    \"18-2\": \"DISCOVER\",\n    \"19-2\": \"DISCOVER\",\n    \"20-2\": \"DISCOVER\",\n    \"21-2\": \"DISCOVER\",\n    \"22-2\": \"DISCOVER\",\n    \"23-2\": \"DISCOVER\",\n    \"24-2\": \"MASTERCARD\",\n    \"25-2\": \"MASTERCARD\",\n    \"26-2\": \"MASTERCARD\",\n    \"27-2\": \"MASTERCARD\",\n    \"28-2\": \"MASTERCARD\",\n    \"29-2\": \"MASTERCARD\",\n    \"30-2\": \"MASTERCARD\",\n    \"31-2\": \"MASTERCARD\",\n    \"32-2\": \"MASTERCARD\",\n    \"33-2\": \"MASTERCARD\",\n    \"34-2\": \"MASTERCARD\",\n    \"35-2\": \"MASTERCARD\",\n    \"0-1\": \"DEBIT\",\n    \"1-1\": \"DEBIT\",\n    \"2-1\": \"DEBIT\",\n    \"3-1\": \"DEBIT\",\n    \"4-1\": \"CREDIT\",\n    \"5-1\": \"CREDIT\",\n    \"6-1\": \"CREDIT\",\n    \"7-1\": \"CREDIT\",\n    \"8-1\": \"PREPAID\",\n    \"9-1\": \"PREPAID\",\n    \"10-1\": \"PREPAID\",\n    \"11-1\": \"PREPAID\",\n    \"12-1\": \"DEBIT\",\n    \"13-1\": \"DEBIT\",\n    \"14-1\": \"DEBIT\",\n    \"15-1\": \"DEBIT\",\n    \"16-1\": \"CREDIT\",\n    \"17-1\": \"CREDIT\",\n    \"18-1\": \"CREDIT\",\n    \"19-1\": \"CREDIT\",\n    \"20-1\": \"PREPAID\",\n    \"21-1\": \"PREPAID\",\n    \"22-1\": \"PREPAID\",\n    \"23-1\": \"PREPAID\",\n    \"24-1\": \"DEBIT\",\n    \"25-1\": \"DEBIT\",\n    \"26-1\": \"DEBIT\",\n    \"27-1\": \"DEBIT\",\n    \"28-1\": \"CREDIT\",\n    \"29-1\": \"CREDIT\",\n    \"30-1\": \"CREDIT\",\n    \"31-1\": \"CREDIT\",\n    \"32-1\": \"PREPAID\",\n    \"33-1\": \"PREPAID\",\n    \"34-1\": \"PREPAID\",\n    \"35-1\": \"PREPAID\"\n  },\n  \"cols\": 4,\n  \"rows\": 36\n}\n[/block]\n##Encrypting Data\nPlease encrypt the `card_number` and `exp_date` on the client's device using our public key provided below.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"-----BEGIN PUBLIC KEY-----\\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzxVLeRTf77kmG/42SdjjtRfaI/7GN4UoUBfxzN80gCyrjK+tHYJR7DKefC47fNyA2dGU7x3tu1wQRKOkjschbC3ZWF1mCqccUiHRPiGhH9VBsxLbAUCFAKOPZcBDCT7IhUdd6S23e99ewkb0c6pRk28u+kz+7ZB7d6Z/S+Em316zs0HqEnEaoUNFXtdTyW3EPuaqo0+p9daICRC44VbrTlzc+Y1A/CsiOcCCl4ske8scu/fWg0K3nybfn7IdO2smkzRwwGOc4uexBMnAkAyl0eQrqXZO4vis6ktmLFV4NpYsd0U2vvmuXFoA9XBcJHdbAww/TGwHq5RJ3505QSEK8QIDAQAB\\n-----END PUBLIC KEY-----\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n[JSencrypt](https://github.com/travist/jsencrypt) is an easy to use library to use for this purpose, the implementation would look something like this:\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"// Encrypt with the public key...\\nvar encrypt = new JSEncrypt();\\nencrypt.setPublicKey($('#pubkey').val());\\nvar encryptedCardNumber = encrypt.encrypt($('#card_number').val());\\nvar encryptedExpDate = encrypt.encrypt($('#exp_date').val());\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Please make sure you are using PKCS1_v1_5 padding for encryption.\",\n  \"title\": \"Padding\"\n}\n[/block]","excerpt":"Link a credit or debit card","slug":"link-a-card","type":"basic","title":"Link a Card"}

Link a Card

Link a credit or debit card

After you [Create a User](https://docs.synapsefi.com/v3.2/docs/create-a-user-1) and [OAuth the user](https://docs.synapsefi.com/v3.2/docs/oauth-the-user), you are ready to link a card. We recommend using our [Interchange UI](https://docs.synapsefi.com/v3.2/docs/interchange-ui) to link a card, rather than building your own UI. ##API Endpoint https://uat-api.synapsefi.com/v3.1/users/:user_id/nodes ##PATH PARAMETER [block:html] { "html": "<div class=\"api-manager\"> <div class=\"param-table\"> <div class=\"table\"> <div class=\"tr\"> <div class=\"td param\"> <strong>user_id <span class=\"colon\">:</span> </strong> <div class=\"required\">required</div></div><div class=\"td\"> <strong class=\"param-type\">string</strong> <div marked=\"\" class=\"ng-isolate-scope\"> <p>The user ID of the user you wish to add the INTERCHANGE-US node under</p></div></div></div></div></div></div>" } [/block] ##BODY PARAMETER [block:html] { "html": "<div class=\"api-manager\"> <div class=\"param-table\"><div class=\"table\"> <div class=\"tr\"> <div class=\"td param\"> <strong>type <span class=\"colon\">:</span> </strong> <div class=\"required\">required</div></div><div class=\"td\"> <strong class=\"param-type\">string</strong> <div marked=\"\" class=\"ng-isolate-scope\"> <p>Type of node you wish to add (this is <code>INTERCHANGE-US</code></p></div></div></div><div class=\"tr\"> <div class=\"td param\"> <strong><span class=\"text-muted\">info.</span>nickname <span class=\"colon\">:</span> </strong> <div class=\"required\">required</div></div><div class=\"td\"> <strong class=\"param-type\">string</strong> <div marked=\"\" class=\"ng-isolate-scope\"> <p>Nickname for the node. It is very important to assign a nickname to the node for <code>INTERCHANGE-US</code>, because you can never retrieve the <code>card_number</code> back from the API</p></div></div></div><div class=\"tr\"> <div class=\"td param\"> <strong><span class=\"text-muted\">info.</span>card_number <span class=\"colon\">:</span> </strong> <div class=\"required\">required</div></div><div class=\"td\"> <strong class=\"param-type\">string</strong> <div marked=\"\" class=\"ng-isolate-scope\"> <p>Encrypted card number</p></div></div></div><div class=\"tr\"> <div class=\"td param\"> <strong><span class=\"text-muted\">info.</span>exp_date <span class=\"colon\">:</span> </strong> <div class=\"required\">required</div></div><div class=\"td\"> <strong class=\"param-type\">string</strong> <div marked=\"\" class=\"ng-isolate-scope\"> <p>Encrypted expiration date of the card <code>YYYYMM</code></p></div></div></div><div class=\"tr\"> <div class=\"td param\"> <strong><span class=\"text-muted\">info.</span>document_id <span class=\"colon\">:</span> </strong> <div class=\"required\">required</div></div><div class=\"td\"> <strong class=\"param-type\">string</strong> <div marked=\"\" class=\"ng-isolate-scope\"> <p>Document ID of user's base document that the card is associated with</p></div></div></div><div class=\"tr\"> <div class=\"td param\"> <strong><span class=\"text-muted\">extra.</span>supp_id <span class=\"colon\">:</span> </strong></div><div class=\"td\"> <strong class=\"param-type\">string</strong> <div marked=\"\" class=\"ng-isolate-scope\"> <p>Any ID you wish to register to the node</p></div></div></div><div class=\"tr\"> <div class=\"td param\"> <strong><span class=\"text-muted\">extra.</span>note <span class=\"colon\">:</span> </strong> </div><div class=\"td\"> <strong class=\"param-type\">string</strong> <div marked=\"\" class=\"ng-isolate-scope\"> <p>Memo tagged with the node</p></div></div></div><div class=\"tr\"> <div class=\"td param\"> <strong>is_active <span class=\"colon\">:</span> </strong></div><div class=\"td\"> <strong class=\"param-type\">string</strong> <div marked=\"\" class=\"ng-isolate-scope\"> <p>If the node is indexed or marked deleted.</p></div></div></div></div></div></div>" } [/block] ##EXAMPLE REQUEST You will only need the card number and expiration date to link a card. The CVV and billing address are not needed. [block:code] { "codes": [ { "code": "POST /v3.1/users/594e0fa2838454002ea317a0/nodes HTTP/1.1\nHost: uat-api.synapsefi.com\nX-SP-USER-IP: 127.0.0.1\nX-SP-USER: oauth_auVIbQ8WXC0pnLU9ivEs4tcHDejqFJlwoNrZ3fO1|e83cf6ddcf778e37bfe3d48fc78a6502062fc\nContent-Type: application/json\n\n{\n \"type\": \"INTERCHANGE-US\",\n \"info\": {\n \"nickname\": \"My Debit Card\",\n \"card_number\": \"Zoo8g2vBUjt7TwmEpRW8f6eQT3AOEEYePw2LkoxD+mO9lOT5OemHlGwgamgLGUbrmWu3DPwnEr2IqDy5YMFVgvQWP3w9nLOFzFFSW43auDgsVAqZScoRf8nI+6/B9KvOEV4XI8JeyXT+O+y3p3RtbiXGmYQNJ56Hy3hs2E5O+yn+3fpLfJQpVvNc38V+aE21VEsJuXFFNtS/8r4jJ6Dx/etTEaE/rtcEUEbwLLHFHjPiOWaHWZPuhXFLtyYrR9zG8FWSJVFwNTG/mEpv2O7We1iCB+9WoEKqdHyGwjjBcVgkUlU5huJIXv9xj53RGNvmHkDFTqgrlHpKkb0E/Ot0Zg==\",\n \"exp_date\": \"ctA4Zj1CP0WCiMefPYsyewVbIHNilfwA09X9NSCyWxft4WGwFZmZkhsBJh51QL751/iFkUHbd09ZpDYjS86PqyNPZ5LkBueGHDIghLwWyzH1l99RiIs8urOW9c4g3L1USD+kzzRAqG1DBkW47FAX6AhPSi3YgQd94ery1H+asaqDrP79ayzoJ+nRXeEqe83FIgNUk/J5+EcAz3JYnoBmp1sfz7a4zHkvk0eKCxQWLETdqvONyCZyXdC/4CkaCxJ/87VsN3i4+ToULtSluRv8xr1NpRhzipKiEKTYW1nvNDAaJQezTVP/+GxmTmQfnfpVNDpJbXjNrOTej1HgMFpg4w==\",\n \"document_id\": \"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8\"\n }\n}", "language": "http" } ] } [/block] ##EXAMPLE RESPONSE [block:code] { "codes": [ { "code": "{\n \"error_code\": \"0\",\n \"http_code\": \"200\",\n \"limit\": 20,\n \"node_count\": 1,\n \"nodes\": [\n {\n \"_id\": \"594e21fc4d1d62002f17e37d\",\n \"_links\": {\n \"self\": {\n \"href\": \"https://uat-api.synapsefi.com/v3.1/users/594e0fa2838454002ea317a0/nodes/594e21fc4d1d62002f17e37d\"\n }\n },\n \"allowed\": \"CREDIT-AND-DEBIT\",\n \"client\": {\n \"id\": \"589acd9ecb3cd400fa75ac06\",\n \"name\": \"SynapseFI\"\n },\n \"extra\": {\n \"other\": {},\n \"supp_id\": \"ABC124\"\n },\n \"info\": {\n \"nickname\": \"Bank of America Debit Card\",\n \"card_hash\": \"5d20f6c392348ed604241bee015af14519d47cc1cb61c31a256973a8d75cf939\",\n \"document_id\": \"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8\",\n \"is_international\": false,\n \"network\": \"VISA\",\n \"type\":\"DEBIT\"\n },\n \"is_active\": true,\n \"timeline\": [\n {\n \"date\": 1498292731835,\n \"note\": \"Node created.\"\n }\n ],\n \"type\": \"INTERCHANGE-US\",\n \"user_id\": \"594e0fa2838454002ea317a0\"\n }\n ],\n \"page_count\": 1,\n \"success\": true\n}", "language": "json", "name": "200 Okay" } ] } [/block] **Verifying the Card** Upon linking a card, a 1¢ transaction will be debited from the card to verify the card. The 1¢ transaction will reflect as canceled on the user's statement within 1-2 business days. **Node Status** View all Node Statuses [here.](https://docs.synapsefi.com/v3.2/docs/card-processing-intro#section-node-permissions) [block:callout] { "type": "warning", "body": "It is very important to assign a nickname to the INTERCHANGE-US node, because you can never retrieve the card_number back from the API.", "title": "Always Assign a Nickname" } [/block] [block:callout] { "type": "info", "title": "Subscribe to Webhooks", "body": "We recommend that you [subscribe to webhooks](https://docs.synapsefi.com/v3.2/docs/subscribe-to-webhooks) to stay updated on the status of nodes." } [/block] **Testing in Sandbox: Sample Card Numbers** Following are the sample card numbers that you can use to test out your `INTERCHANGE-US` implementation. [block:parameters] { "data": { "h-0": "Card Number", "h-1": "Type", "h-2": "Network", "h-3": "Permission", "0-0": "9401100999999992", "1-0": "9401101999999990", "2-0": "9401110999999991", "3-0": "9401113999999995", "4-0": "9401200999999990", "5-0": "9401201999999998", "6-0": "9401210999999999", "7-0": "9401211999999997", "8-0": "9401300999999998", "9-0": "9401301999999996", "10-0": "9401310999999997", "11-0": "9401311999999995", "12-0": "9021100999999992", "13-0": "9021101999999990", "14-0": "9021110999999991", "15-0": "9021111999999999", "16-0": "9021200999999990", "17-0": "9021201999999998", "18-0": "9021210999999999", "19-0": "9021211999999997", "20-0": "9021300999999998", "21-0": "9021301999999996", "22-0": "9021310999999997", "23-0": "9021311999999995", "24-0": "9501100999999991", "25-0": "9501101999999999", "26-0": "9501110999999990", "27-0": "9501111999999998", "28-0": "9501200999999999", "29-0": "9501201999999997", "30-0": "9501210999999998", "31-0": "9501211999999996", "32-0": "9501300999999997", "33-0": "9501301999999995", "34-0": "9501310999999996", "35-0": "9501311999999994", "0-3": "NONE (which means both credits and debits have been disabled by cardholder. So adding this card would fail.)", "1-3": "CREDIT", "2-3": "DEBIT", "3-3": "CREDIT-AND-DEBIT", "4-3": "NONE (which means both credits and debits have been disabled by cardholder. So adding this card would fail.)", "8-3": "NONE (which means both credits and debits have been disabled by cardholder. So adding this card would fail.)", "12-3": "NONE (which means both credits and debits have been disabled by cardholder. So adding this card would fail.)", "16-3": "NONE (which means both credits and debits have been disabled by cardholder. So adding this card would fail.)", "20-3": "NONE (which means both credits and debits have been disabled by cardholder. So adding this card would fail.)", "24-3": "NONE (which means both credits and debits have been disabled by cardholder. So adding this card would fail.)", "28-3": "NONE (which means both credits and debits have been disabled by cardholder. So adding this card would fail.)", "32-3": "NONE (which means both credits and debits have been disabled by cardholder. So adding this card would fail.)", "5-3": "CREDIT", "9-3": "CREDIT", "13-3": "CREDIT", "17-3": "CREDIT", "21-3": "CREDIT", "25-3": "CREDIT", "29-3": "CREDIT", "33-3": "CREDIT", "6-3": "DEBIT", "10-3": "DEBIT", "14-3": "DEBIT", "18-3": "DEBIT", "22-3": "DEBIT", "26-3": "DEBIT", "30-3": "DEBIT", "34-3": "DEBIT", "7-3": "CREDIT-AND-DEBIT", "11-3": "CREDIT-AND-DEBIT", "15-3": "CREDIT-AND-DEBIT", "19-3": "CREDIT-AND-DEBIT", "23-3": "CREDIT-AND-DEBIT", "27-3": "CREDIT-AND-DEBIT", "31-3": "CREDIT-AND-DEBIT", "35-3": "CREDIT-AND-DEBIT", "0-2": "VISA", "1-2": "VISA", "2-2": "VISA", "3-2": "VISA", "4-2": "VISA", "5-2": "VISA", "6-2": "VISA", "7-2": "VISA", "8-2": "VISA", "9-2": "VISA", "10-2": "VISA", "11-2": "VISA", "12-2": "DISCOVER", "13-2": "DISCOVER", "14-2": "DISCOVER", "15-2": "DISCOVER", "16-2": "DISCOVER", "17-2": "DISCOVER", "18-2": "DISCOVER", "19-2": "DISCOVER", "20-2": "DISCOVER", "21-2": "DISCOVER", "22-2": "DISCOVER", "23-2": "DISCOVER", "24-2": "MASTERCARD", "25-2": "MASTERCARD", "26-2": "MASTERCARD", "27-2": "MASTERCARD", "28-2": "MASTERCARD", "29-2": "MASTERCARD", "30-2": "MASTERCARD", "31-2": "MASTERCARD", "32-2": "MASTERCARD", "33-2": "MASTERCARD", "34-2": "MASTERCARD", "35-2": "MASTERCARD", "0-1": "DEBIT", "1-1": "DEBIT", "2-1": "DEBIT", "3-1": "DEBIT", "4-1": "CREDIT", "5-1": "CREDIT", "6-1": "CREDIT", "7-1": "CREDIT", "8-1": "PREPAID", "9-1": "PREPAID", "10-1": "PREPAID", "11-1": "PREPAID", "12-1": "DEBIT", "13-1": "DEBIT", "14-1": "DEBIT", "15-1": "DEBIT", "16-1": "CREDIT", "17-1": "CREDIT", "18-1": "CREDIT", "19-1": "CREDIT", "20-1": "PREPAID", "21-1": "PREPAID", "22-1": "PREPAID", "23-1": "PREPAID", "24-1": "DEBIT", "25-1": "DEBIT", "26-1": "DEBIT", "27-1": "DEBIT", "28-1": "CREDIT", "29-1": "CREDIT", "30-1": "CREDIT", "31-1": "CREDIT", "32-1": "PREPAID", "33-1": "PREPAID", "34-1": "PREPAID", "35-1": "PREPAID" }, "cols": 4, "rows": 36 } [/block] ##Encrypting Data Please encrypt the `card_number` and `exp_date` on the client's device using our public key provided below. [block:code] { "codes": [ { "code": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzxVLeRTf77kmG/42SdjjtRfaI/7GN4UoUBfxzN80gCyrjK+tHYJR7DKefC47fNyA2dGU7x3tu1wQRKOkjschbC3ZWF1mCqccUiHRPiGhH9VBsxLbAUCFAKOPZcBDCT7IhUdd6S23e99ewkb0c6pRk28u+kz+7ZB7d6Z/S+Em316zs0HqEnEaoUNFXtdTyW3EPuaqo0+p9daICRC44VbrTlzc+Y1A/CsiOcCCl4ske8scu/fWg0K3nybfn7IdO2smkzRwwGOc4uexBMnAkAyl0eQrqXZO4vis6ktmLFV4NpYsd0U2vvmuXFoA9XBcJHdbAww/TGwHq5RJ3505QSEK8QIDAQAB\n-----END PUBLIC KEY-----", "language": "text" } ] } [/block] [JSencrypt](https://github.com/travist/jsencrypt) is an easy to use library to use for this purpose, the implementation would look something like this: [block:code] { "codes": [ { "code": "// Encrypt with the public key...\nvar encrypt = new JSEncrypt();\nencrypt.setPublicKey($('#pubkey').val());\nvar encryptedCardNumber = encrypt.encrypt($('#card_number').val());\nvar encryptedExpDate = encrypt.encrypt($('#exp_date').val());", "language": "javascript" } ] } [/block] [block:callout] { "type": "info", "body": "Please make sure you are using PKCS1_v1_5 padding for encryption.", "title": "Padding" } [/block]