{"_id":"5a6ab53ced3ead001e3e99dc","project":"59f79e3c584eb200345ceafc","version":{"_id":"59f79e3c584eb200345ceaff","project":"59f79e3c584eb200345ceafc","__v":8,"createdAt":"2015-09-17T03:47:20.956Z","releaseDate":"2015-09-17T03:47:20.956Z","categories":["59f79e3c584eb200345ceb3a","59f79e3c584eb200345ceb3b","59f79e3c584eb200345ceb3c","59f79e3c584eb200345ceb3d","59f79e3c584eb200345ceb3e","59f79e3c584eb200345ceb3f","59f79e3c584eb200345ceb45","59f79e3c584eb200345ceb46","59f79e3c584eb200345ceb48","59f79e3c584eb200345ceb49","5aa21b60c0bda0002d1568b6","5afb6888212c690003ae3d3b","5b4bdcd3737d1800031d2293","5b9ed89212362100036b5a1c","5bb29bec77c22500034757ea","5bb29bfe77c22500034757ec","5bc8fa8063924c00186c5ded","5bc8fe9fa472190014a6b103"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"3.1.0","version":"3.1"},"category":{"_id":"59f79e3c584eb200345ceb3c","version":"59f79e3c584eb200345ceaff","project":"59f79e3c584eb200345ceafc","__v":0,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-09-19T00:05:19.904Z","from_sync":false,"order":5,"slug":"nodes","title":"Nodes"},"user":"54e4044e8ef7552300409dcb","githubsync":"","__v":30,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-01-26T04:57:32.513Z","link_external":false,"link_url":"","sync_unique":"","hidden":true,"api":{"method":"post","results":{"codes":[{"language":"json","status":200,"name":"","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\": \"My Debit Card\",\n                \"document_id\": \"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8\",\n                \"card_type\": \"VIRTUAL\",\n                \"balance\": {\n                    \"amount\": 589.78,\n                    \"currency\": \"USD\"\n                },\n                \"preferences\": {\n                    \"allow_foreign_transactions\": false,\n                    \"atm_withdrawal_limit\": 1000,\n                    \"max_pin_attempts\": 3,\n                    \"pos_withdrawal_limit\": 1000,\n                    \"security_alerts\": true\n                }\n            },\n            \"is_active\": true,\n            \"timeline\": [\n                {\n                    \"date\": 1498292731835,\n                    \"note\": \"Node created.\"\n                }\n            ],\n            \"type\": \"CARD-US\",\n            \"user_id\": \"594e0fa2838454002ea317a0\"\n        }\n    ],\n    \"page_count\": 1,\n    \"success\": true\n}"}]},"settings":"","examples":{"codes":[{"name":"","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\": \"CARD-US\",\n  \"info\": {\n    \"nickname\": \"My Debit Card\",\n    \"document_id\": \"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8\",\n    \"card_type\": \"VIRTUAL\"\n  }\n}","language":"http"}]},"auth":"required","params":[{"_id":"58fe931a59079e190092fa48","ref":"","in":"path","required":true,"desc":"The user ID of the user you wish to add the CARD-US node under","default":"","type":"string","name":"user_id"},{"_id":"5573b11e91ce6e190023b76a","ref":"","in":"body","required":true,"desc":"Type of node you wish to add","default":"","type":"string","name":"type"},{"_id":"55fa4d6f764f5021009506c9","ref":"","in":"body","required":true,"desc":"Nickname associated with the node","default":"","type":"string","name":"info.nickname"},{"_id":"5a6ab53ced3ead001e3e99de","ref":"","in":"body","required":true,"desc":"Document ID of user's base document that the card is associated with","default":"","type":"string","name":"info.document_id"},{"_id":"5a6ab53ced3ead001e3e99dd","ref":"","in":"body","required":true,"desc":"`PHYSICAL` or `VIRTUAL`","default":"","type":"string","name":"info.card_type"},{"_id":"55fa3f2a17b9d00d00969ea3","ref":"","in":"body","required":false,"desc":"Any ID you wish to register to the node","default":"","type":"string","name":"extra.supp_id"},{"_id":"594e65af283bee0035df6b56","ref":"","in":"body","required":false,"desc":"If the node is indexed or marked deleted.","default":"","type":"boolean","name":"is_active"},{"_id":"5b5958fd5ee61e0003e8ad0d","ref":"","in":"body","required":false,"desc":"If you have multiple card arts, this field can be used to specify which card art to use","default":"","type":"string","name":"card_style_id"}],"url":"/v3.1/users/:user_id/nodes"},"isReference":true,"order":11,"body":"[block:api-header]\n{\n  \"title\": \"\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Viewing Card Number\",\n  \"body\": \"To be able to view the `card_number`, `cvc` and `exp` you need to do [GET Node](doc:node) with `full_dehydrate=yes`. We would not recommend doing this unless you are PCI compliant. Even if you are not storing card information, card information being transmitted during a [GET] User call. \\n\\nWe recommend using our [UI as a Service](doc:issuing-public-key) component for this use case, so that you can redirect users there for viewing card details.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Physical Cards\",\n  \"body\": \"Physical cards will be mailed to the address specified in the document corresponding to the `document_id` supplied in the API call.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Foreign Transactions\",\n  \"body\": \"If you anticipate cards being used outside of US, please make sure `preferences.allow_foreign_transactions` is set to `true`. You would need to [PATCH Node](doc:update-info) for that.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Debit Card Testing\",\n  \"body\": \"How to test virtual cards:\\n1. Fund the card (https://docs.synapsefi.com/docs/create-transaction)\\n2. Attempt a transaction online with an international processor\\n3. Patch the card’s `preferences.allow_foreign_transactions` to `true`\\n4. Attempt a NSF transaction (transact at an amount higher than the available balance of the card)\\n5. Set `preferences.pos_withdrawal_limit` on a patch call to $10. Try a transaction above $10 and a transaction below $10\\n6. Patch the card’s body parameter `allowed` to `INACTIVE` and attempt a transaction\\n7. Patch the card’s body parameter `allowed` back to `CREDIT-AND-DEBIT` and attempt a transaction\\n8. Un-fund the card (https://docs.synapsefi.com/docs/create-transaction)\\n\\nHow to test physical cards:\\n1. Fund the card (https://docs.synapsefi.com/docs/create-transaction)\\n2. Attempt a transaction online with an international processor\\n3. Patch the card’s `preferences.allow_foreign_transactions` to `true`\\n4. Attempt an ATM transaction with random PIN numbers\\n5. Patch the card’s `preferences.card_pin` to a card pin of your choice\\n6. Try an ATM transaction and a POS transaction (at a store and online, both pinless and with a pin)\\n7. Patch the card’s `preferences.atm_withdrawal_limit` to $20. Try a $40 withdrawal, a $20 withdrawal and a cash deposit of any amount\\n8. Patch the card’s `preferences.max_pin_attempts` to 1 and try a terminal POS or ATM transaction using the pin twice\\n9. Patch the card’s `preferences.pos_withdrawal_limit` on a patch call to $10. Try a transaction above $10 and a transaction below $10\\n10. Patch the card’s `preferences.allow_foreign_transactions`\\n11. Un-fund the card (https://docs.synapsefi.com/docs/create-transaction)\\n\\n**Replicate any use cases that an end user might have. The goal is to prevent all possible error outcomes for a smooth user experience.**\"\n}\n[/block]","excerpt":"Create a Debit Card","slug":"debit-cards","type":"endpoint","title":"Debit Cards"}

postDebit Cards

Create a Debit Card

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

user_id:
required
string
The user ID of the user you wish to add the CARD-US node under

Body Params

type:
required
string
Type of node you wish to add
info.nickname:
required
string
Nickname associated with the node
info.document_id:
required
string
Document ID of user's base document that the card is associated with
info.card_type:
required
string
`PHYSICAL` or `VIRTUAL`
extra.supp_id:
string
Any ID you wish to register to the node
is_active:
boolean
If the node is indexed or marked deleted.
card_style_id:
string
If you have multiple card arts, this field can be used to specify which card art to use

Examples


Result Format


Documentation

[block:api-header] { "title": "" } [/block] [block:callout] { "type": "info", "title": "Viewing Card Number", "body": "To be able to view the `card_number`, `cvc` and `exp` you need to do [GET Node](doc:node) with `full_dehydrate=yes`. We would not recommend doing this unless you are PCI compliant. Even if you are not storing card information, card information being transmitted during a [GET] User call. \n\nWe recommend using our [UI as a Service](doc:issuing-public-key) component for this use case, so that you can redirect users there for viewing card details." } [/block] [block:callout] { "type": "info", "title": "Physical Cards", "body": "Physical cards will be mailed to the address specified in the document corresponding to the `document_id` supplied in the API call." } [/block] [block:callout] { "type": "info", "title": "Foreign Transactions", "body": "If you anticipate cards being used outside of US, please make sure `preferences.allow_foreign_transactions` is set to `true`. You would need to [PATCH Node](doc:update-info) for that." } [/block] [block:callout] { "type": "info", "title": "Debit Card Testing", "body": "How to test virtual cards:\n1. Fund the card (https://docs.synapsefi.com/docs/create-transaction)\n2. Attempt a transaction online with an international processor\n3. Patch the card’s `preferences.allow_foreign_transactions` to `true`\n4. Attempt a NSF transaction (transact at an amount higher than the available balance of the card)\n5. Set `preferences.pos_withdrawal_limit` on a patch call to $10. Try a transaction above $10 and a transaction below $10\n6. Patch the card’s body parameter `allowed` to `INACTIVE` and attempt a transaction\n7. Patch the card’s body parameter `allowed` back to `CREDIT-AND-DEBIT` and attempt a transaction\n8. Un-fund the card (https://docs.synapsefi.com/docs/create-transaction)\n\nHow to test physical cards:\n1. Fund the card (https://docs.synapsefi.com/docs/create-transaction)\n2. Attempt a transaction online with an international processor\n3. Patch the card’s `preferences.allow_foreign_transactions` to `true`\n4. Attempt an ATM transaction with random PIN numbers\n5. Patch the card’s `preferences.card_pin` to a card pin of your choice\n6. Try an ATM transaction and a POS transaction (at a store and online, both pinless and with a pin)\n7. Patch the card’s `preferences.atm_withdrawal_limit` to $20. Try a $40 withdrawal, a $20 withdrawal and a cash deposit of any amount\n8. Patch the card’s `preferences.max_pin_attempts` to 1 and try a terminal POS or ATM transaction using the pin twice\n9. Patch the card’s `preferences.pos_withdrawal_limit` on a patch call to $10. Try a transaction above $10 and a transaction below $10\n10. Patch the card’s `preferences.allow_foreign_transactions`\n11. Un-fund the card (https://docs.synapsefi.com/docs/create-transaction)\n\n**Replicate any use cases that an end user might have. The goal is to prevent all possible error outcomes for a smooth user experience.**" } [/block]