{"__v":64,"_id":"55fa37ca8065a10d004e5bbd","category":{"__v":7,"_id":"55fa37ca8065a10d004e5bb7","pages":["55fa37ca8065a10d004e5bbb","55fa37ca8065a10d004e5bbc","55fa37ca8065a10d004e5bbd","55fa37ca8065a10d004e5bbe","55fa37ca8065a10d004e5bbf","55fa37ca8065a10d004e5bc0","55fa3a948065a10d004e5bd5","55fa3c3ba663c00d00773dce","55fa4b8eaba81f0d00a115e4","56733ae758c4890d00bb548a","56734f9c4b2a680d00524e09","569d8eae3dbdc20d005feee8"],"project":"54e405191e51932d006abc39","version":"55fa37c88065a10d004e5bb6","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-02-18T03:20:58.779Z","from_sync":false,"order":0,"slug":"introduction","title":"Introduction"},"parentDoc":null,"project":"54e405191e51932d006abc39","user":"54e4044e8ef7552300409dcb","version":{"__v":7,"_id":"55fa37c88065a10d004e5bb6","project":"54e405191e51932d006abc39","createdAt":"2015-09-17T03:47:20.956Z","releaseDate":"2015-09-17T03:47:20.956Z","categories":["55fa37ca8065a10d004e5bb7","55fa37ca8065a10d004e5bb8","55fa37ca8065a10d004e5bb9","55fa37ca8065a10d004e5bba","55fca6bf34ae7c0d00ab8ea0","55ff80fd9e7ccf0d000a1d93","560220af7435de0d00fabd0d","56107f21bb9d920d00303e70","563e184077681a0d00d96a02","56fafc6596ec7e0e002ac85f"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"REST V3","version_clean":"3.1.0","version":"3.1"},"updates":["55caafaf27fde72b003e982f","56071a92a4574a0d00811428","561d51a5281aec0d00eb27bb","561f5c2bca8cfb0d0058fa0f","5772a638dceb570e003a90bf"],"next":{"pages":[],"description":""},"createdAt":"2015-08-06T05:20:56.937Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":5,"body":"You can customize on boarding (KYC) & payment flows with Synapse quite a bit. So it is usually wise to [Contact us](doc:contact-us) before you start developing against our APIs. But if you are curious and still want to play around this common flow can help.\n\nUsually a common flow goes the following way:\n\n```\n1) Create a user account: Supply email, phone number & name.\n2) Add KYC Info: For business, its the EIN information. For Individuals it's the SSN Info.\n3) Link bank account: Here you can supply account & routing number or supply online banking credentials to instantly link an account.\n4) Create a transaction: Once Step 1,2 & 3 are done you can create a transaction.\n```\n\n## 1. Create Users\n\n[Create User](doc:create-a-user) objects for both the fund originator and the fund recipient.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -X POST -H \\\"Content-Type: application/json\\\" -H \\\"X-SP-GATEWAY: e3f19e4bd4022c86e7f2|11c94ba6bad74d24a0158bc707f0fc19a86dc08f\\\" -H \\\"X-SP-USER-IP: 216.3.128.12\\\" -d '{\\n  \\\"logins\\\": [\\n    {\\n      \\\"email\\\": \\\"test:::at:::test.com\\\"\\n    }\\n  ],\\n  \\\"phone_numbers\\\": [\\n    \\\"9019428167\\\"\\n  ],\\n  \\\"legal_names\\\": [\\n    \\\"Test User\\\"\\n  ],\\n  \\\"extra\\\": {\\n    \\\"supp_id\\\": \\\"5303f4ddb4e7b810bf000173\\\",\\n    \\\"note\\\": null,\\n    \\\"is_business\\\": false,\\n    \\\"cip_tag\\\":1\\n  }\\n}' \\\"https://sandbox.synapsepay.com/api/3/users\\\"\",\n      \"language\": \"curl\"\n    },\n    {\n      \"code\": \"{\\n    \\\"_id\\\": \\\"5739ea6386c27360899fd445\\\",\\n    \\\"_links\\\": {\\n        \\\"self\\\": {\\n            \\\"href\\\": \\\"https://sandbox.synapsepay.com/api/3/users/5739ea6386c27360899fd445\\\"\\n        }\\n    },\\n    \\\"client\\\": {\\n        \\\"id\\\": 844,\\n        \\\"name\\\": \\\"SynapsePay*Sandbox\\\"\\n    },\\n    \\\"doc_status\\\": {\\n        \\\"physical_doc\\\": \\\"MISSING|INVALID\\\",\\n        \\\"virtual_doc\\\": \\\"MISSING|INVALID\\\"\\n    },\\n    \\\"documents\\\": [],\\n    \\\"extra\\\": {\\n        \\\"cip_tag\\\": 1,\\n        \\\"date_joined\\\": 1463413347832,\\n        \\\"extra_security\\\": true,\\n        \\\"is_business\\\": false,\\n        \\\"supp_id\\\": \\\"5303f4ddb4e7b810bf000173\\\"\\n    },\\n    \\\"is_hidden\\\": false,\\n    \\\"legal_names\\\": [\\n        \\\"Test User\\\"\\n    ],\\n    \\\"logins\\\": [\\n        {\\n            \\\"email\\\": \\\"test@test.com\\\",\\n            \\\"scope\\\": \\\"READ_AND_WRITE\\\"\\n        }\\n    ],\\n    \\\"permission\\\": \\\"UNVERIFIED\\\",\\n    \\\"phone_numbers\\\": [\\n        \\\"9019428167\\\"\\n    ],\\n    \\\"photos\\\": [],\\n    \\\"refresh_token\\\": \\\"refresh-6281b092-a34c-4628-8dea-e02a22d4c718\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Response\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Remember\",\n  \"body\": \"Please remember to store `_id` of the user in your database.\\n\\nWe manage refresh tokens for you, so no need to store them.\\n\\nIf you do not want to use 2FA, store the fingerprint used when creating the user and supply the fingerprint when performing actions with the user. This way the system will not detect a new device and no 2FAs will be triggered.\\n\\n> A good way to do so is to pass a hashed version of your `user_pk+client_id+client_secret`. That way the value is still somewhat secret, but you won't need to store it for each unique user.\"\n}\n[/block]\n## 2. Add KYC Info\n\nYou need to add a virtual document on both sender and receiver. A list of acceptable virtual documents can be found in the [User Resources](doc:user-resources) section. A complete list of documents that we are capable of verifying as virtual documents can be found [here](#virtual-document-types).\n\nBut you only need to add the physical document on the sender, a complete list of documents that we are capable of verifying as physical documents can be found [here](#physical-document-types).\n\nIf you wish to know what virtual and physical documents really mean, [go here](#customer-identification-program-cip--know-your-cus).\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -X PATCH -H \\\"Content-Type: application/json\\\" -H \\\"X-SP-GATEWAY: e3f19e4bd4022c86e7f2|11c94ba6bad74d24a0158bc707f0fc19a86dc08f\\\" -H \\\"X-SP-USER-IP: 216.3.128.12\\\" -H \\\"X-SP-USER: oauth-35dc926a-cf4d-43f6-b69b-c145efc66dd0|e716990e50b67a1177736960b6357524b22090ccab093d068b3d7a18dbde3f4c\\\" -d '{\\n    \\\"documents\\\":[{\\n        \\\"email\\\":\\\"test@test.com\\\",\\n        \\\"phone_number\\\":\\\"901-942-8167\\\",\\n        \\\"ip\\\":\\\"12134323\\\",\\n        \\\"name\\\":\\\"Charlie Brown\\\",\\n        \\\"alias\\\":\\\"Woof Woof\\\",\\n        \\\"entity_type\\\":\\\"M\\\",\\n        \\\"entity_scope\\\":\\\"Arts & Entertainment\\\",\\n        \\\"day\\\":2,\\n        \\\"month\\\":5,\\n        \\\"year\\\":2009,\\n        \\\"address_street\\\":\\\"Some Farm\\\",\\n        \\\"address_city\\\":\\\"SF\\\",\\n        \\\"address_subdivision\\\":\\\"CA\\\",\\n        \\\"address_postal_code\\\":\\\"94114\\\",\\n        \\\"address_country_code\\\":\\\"US\\\",\\n        \\\"virtual_docs\\\":[{\\n            \\\"document_value\\\":\\\"111-111-2222\\\",\\n            \\\"document_type\\\":\\\"SSN\\\"\\n        }],\\n        \\\"physical_docs\\\":[{\\n            \\\"document_value\\\":\\\"data:text/csv;base64,SUQs==\\\",\\n            \\\"document_type\\\":\\\"GOVT_ID\\\"\\n        }],\\n        \\\"social_docs\\\":[]\\n    }]\\n}' \\\"https://sandbox.synapsepay.com/api/3/users/5739ea6386c27360899fd445\\\"\",\n      \"language\": \"curl\"\n    },\n    {\n      \"code\": \"{\\n  \\\"_id\\\": \\\"5739ea6386c27360899fd445\\\",\\n  \\\"_links\\\": {\\n    \\\"self\\\": {\\n      \\\"href\\\": \\\"https://sandbox.synapsepay.com/api/3/users/5739ea6386c27360899fd445\\\"\\n    }\\n  },\\n  \\\"client\\\": {\\n    \\\"id\\\": 844,\\n    \\\"name\\\": \\\"SynapsePay*Sandbox\\\"\\n  },\\n  \\\"doc_status\\\": {\\n    \\\"physical_doc\\\": \\\"SUBMITTED|VALID\\\",\\n    \\\"virtual_doc\\\": \\\"SUBMITTED|VALID\\\"\\n  },\\n  \\\"documents\\\": [\\n    {\\n      \\\"id\\\": \\\"ef4685f1dcf78b39a85c9d4da97652e114f3af054d43b29195978a1e4918beae\\\",\\n      \\\"name\\\": \\\"Charlie Brown\\\",\\n      \\\"permission_scope\\\": \\\"SEND|RECEIVE|5000|DAILY\\\",\\n      \\\"physical_docs\\\": [\\n        {\\n          \\\"document_type\\\": \\\"GOVT_ID\\\",\\n          \\\"id\\\": \\\"70d5a44dd55e3914870039deabb5405644016a5b56d0002ea0ec4e7952def9fd\\\",\\n          \\\"last_updated\\\": 1463413784808,\\n          \\\"status\\\": \\\"SUBMITTED|VALID\\\"\\n        }\\n      ],\\n      \\\"social_docs\\\": [\\n        {\\n          \\\"document_type\\\": \\\"EMAIL\\\",\\n          \\\"id\\\": \\\"2c45158f6431ca874bbe82f63d5905567854dde4d8b81539944e5779e5eee741\\\",\\n          \\\"last_updated\\\": 1463413785201,\\n          \\\"status\\\": \\\"SUBMITTED|VALID\\\"\\n        },\\n        {\\n          \\\"document_type\\\": \\\"PHONE_NUMBER\\\",\\n          \\\"id\\\": \\\"9dd593112385cfed22721355d279e79d33acd2c48cffe9c007b6c4acbfde826c\\\",\\n          \\\"last_updated\\\": 1463413785593,\\n          \\\"status\\\": \\\"SUBMITTED|VALID\\\"\\n        }\\n      ],\\n      \\\"virtual_docs\\\": [\\n        {\\n          \\\"document_type\\\": \\\"SSN\\\",\\n          \\\"id\\\": \\\"7cb85697d26e2c1010266fd64a22afd396167ca630a4bad21a9e8fcff865bb1c\\\",\\n          \\\"last_updated\\\": 1463413784258,\\n          \\\"status\\\": \\\"SUBMITTED|VALID\\\"\\n        }\\n      ]\\n    }\\n  ],\\n  \\\"extra\\\": {\\n    \\\"cip_tag\\\": 1,\\n    \\\"date_joined\\\": 1463413347832,\\n    \\\"extra_security\\\": true,\\n    \\\"is_business\\\": false,\\n    \\\"supp_id\\\": \\\"5303f4ddb4e7b810bf000173\\\"\\n  },\\n  \\\"is_hidden\\\": false,\\n  \\\"legal_names\\\": [\\n    \\\"Test User\\\"\\n  ],\\n  \\\"logins\\\": [\\n    {\\n      \\\"email\\\": \\\"test@test.com\\\",\\n      \\\"scope\\\": \\\"READ_AND_WRITE\\\"\\n    }\\n  ],\\n  \\\"permission\\\": \\\"SEND-AND-RECEIVE\\\",\\n  \\\"phone_numbers\\\": [\\n    \\\"9019428167\\\"\\n  ],\\n  \\\"photos\\\": [],\\n  \\\"refresh_token\\\": \\\"refresh-6281b092-a34c-4628-8dea-e02a22d4c718\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Response\"\n    }\n  ]\n}\n[/block]\n## 3. Link Bank Accounts\n\nThere are two ways to link a bank account to users: via online banking logins OR account/routing numbers. You can read more about it in [Node Resources](doc:node-resources) section.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -X POST -H \\\"Content-Type: application/json\\\" -H \\\"X-SP-GATEWAY: e3f19e4bd4022c86e7f2|11c94ba6bad74d24a0158bc707f0fc19a86dc08f\\\" -H \\\"X-SP-USER-IP: 216.3.128.12\\\" -H \\\"X-SP-USER: oauth-35dc926a-cf4d-43f6-b69b-c145efc66dd0|e716990e50b67a1177736960b6357524b22090ccab093d068b3d7a18dbde3f4c\\\" -d '{\\n    \\\"type\\\":\\\"ACH-US\\\",\\n    \\\"info\\\":{\\n      \\\"bank_id\\\":\\\"synapse_nomfa\\\",\\n      \\\"bank_pw\\\":\\\"test1234\\\",\\n      \\\"bank_name\\\":\\\"bofa\\\"\\n    }\\n}' \\\"https://sandbox.synapsepay.com/api/3/users/5739ea6386c27360899fd445/nodes\\\"\",\n      \"language\": \"curl\"\n    },\n    {\n      \"code\": \"{\\n  \\\"error_code\\\": \\\"0\\\",\\n  \\\"http_code\\\": \\\"200\\\",\\n  \\\"nodes\\\": [\\n    {\\n      \\\"_id\\\": \\\"5739eda886c2735cc02d55d1\\\",\\n      \\\"_links\\\": {\\n        \\\"self\\\": {\\n          \\\"href\\\": \\\"https://sandbox.synapsepay.com/api/3/users/5739ea6386c27360899fd445/nodes/5739eda886c2735cc02d55d1\\\"\\n        }\\n      },\\n      \\\"allowed\\\": \\\"CREDIT-AND-DEBIT\\\",\\n      \\\"extra\\\": {\\n        \\\"supp_id\\\": null\\n      },\\n      \\\"info\\\": {\\n        \\\"account_num\\\": \\\"8901\\\",\\n        \\\"balance\\\": {\\n          \\\"amount\\\": \\\"10000.00\\\",\\n          \\\"currency\\\": \\\"USD\\\"\\n        },\\n        \\\"bank_long_name\\\": \\\"ING DIRECT\\\",\\n        \\\"bank_name\\\": \\\"fake\\\",\\n        \\\"class\\\": \\\"CHECKING\\\",\\n        \\\"name_on_account\\\": \\\"Test User\\\",\\n        \\\"nickname\\\": \\\"SynapsePay Test Checking Account\\\",\\n        \\\"routing_num\\\": \\\"6110\\\",\\n        \\\"type\\\": \\\"PERSONAL\\\"\\n      },\\n      \\\"is_active\\\": true,\\n      \\\"type\\\": \\\"ACH-US\\\"\\n    },\\n    {\\n      ...\\n    },\\n    {\\n      ...\\n    }\\n  ],\\n  \\\"success\\\": true\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Response\"\n    }\n  ]\n}\n[/block]\n## 4. Create a transaction\n\nUsing the sender's oauth credentials and node id, [Create Transaction](doc:create-transaction). You \ncan learn more about transactions and their processing times under [Transaction Resources](doc:trans-resources).\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -X POST -H \\\"Content-Type: application/json\\\" -H \\\"X-SP-GATEWAY: e3f19e4bd4022c86e7f2|11c94ba6bad74d24a0158bc707f0fc19a86dc08f\\\" -H \\\"X-SP-USER-IP: 216.3.128.12\\\" -H \\\"X-SP-USER: oauth-35dc926a-cf4d-43f6-b69b-c145efc66dd0|e716990e50b67a1177736960b6357524b22090ccab093d068b3d7a18dbde3f4c\\\" -d '{\\n    \\\"to\\\":{\\n      \\\"type\\\":\\\"ACH-US\\\",\\n      \\\"id\\\":\\\"5739eda886c2735cc02d55d2\\\"\\n    },\\n    \\\"amount\\\":{\\n      \\\"amount\\\":1000,\\n      \\\"currency\\\":\\\"USD\\\"\\n    },\\n    \\\"extra\\\":{\\n      \\\"ip\\\":\\\"192.168.0.1\\\"\\n    }\\n}' \\\"https://sandbox.synapsepay.com/api/3/users/5739ea6386c27360899fd445/nodes/5739eda886c2735cc02d55d1/trans\\\"\",\n      \"language\": \"curl\"\n    },\n    {\n      \"code\": \"{\\n  \\\"_id\\\": \\\"5739edeb86c2735cc02d55d3\\\",\\n  \\\"_links\\\": {\\n    \\\"self\\\": {\\n      \\\"href\\\": \\\"https://sandbox.synapsepay.com/api/3/users/5739ea6386c27360899fd445/nodes/5739eda886c2735cc02d55d1/trans/5739edeb86c2735cc02d55d3\\\"\\n    }\\n  },\\n  \\\"amount\\\": {\\n    \\\"amount\\\": 1000,\\n    \\\"currency\\\": \\\"USD\\\"\\n  },\\n  \\\"client\\\": {\\n    \\\"id\\\": 844,\\n    \\\"name\\\": \\\"SynapsePay*Sandbox\\\"\\n  },\\n  \\\"extra\\\": {\\n    \\\"created_on\\\": 1463414250500,\\n    \\\"ip\\\": \\\"192.168.0.1\\\",\\n    \\\"latlon\\\": \\\"0,0\\\",\\n    \\\"note\\\": \\\"\\\",\\n    \\\"other\\\": {},\\n    \\\"process_on\\\": 1463414250500,\\n    \\\"supp_id\\\": \\\"\\\",\\n    \\\"webhook\\\": \\\"\\\"\\n  },\\n  \\\"fees\\\": [\\n    {\\n      \\\"fee\\\": 0.2,\\n      \\\"note\\\": \\\"Synapse Facilitator Fee\\\",\\n      \\\"to\\\": {\\n        \\\"id\\\": \\\"559339aa86c273605ccd35df\\\"\\n      }\\n    }\\n  ],\\n  \\\"from\\\": {\\n    \\\"id\\\": \\\"5739eda886c2735cc02d55d1\\\",\\n    \\\"nickname\\\": \\\"SynapsePay Test Checking Account\\\",\\n    \\\"type\\\": \\\"ACH-US\\\",\\n    \\\"user\\\": {\\n      \\\"_id\\\": \\\"5739ea6386c27360899fd445\\\",\\n      \\\"legal_names\\\": [\\n        \\\"Test User\\\"\\n      ]\\n    }\\n  },\\n  \\\"recent_status\\\": {\\n    \\\"date\\\": 1463414250499,\\n    \\\"note\\\": \\\"Transaction created\\\",\\n    \\\"status\\\": \\\"CREATED\\\",\\n    \\\"status_id\\\": \\\"1\\\"\\n  },\\n  \\\"timeline\\\": [\\n    {\\n      \\\"date\\\": 1463414250499,\\n      \\\"note\\\": \\\"Transaction created\\\",\\n      \\\"status\\\": \\\"CREATED\\\",\\n      \\\"status_id\\\": \\\"1\\\"\\n    }\\n  ],\\n  \\\"to\\\": {\\n    \\\"id\\\": \\\"5739eda886c2735cc02d55d2\\\",\\n    \\\"nickname\\\": \\\"SynapsePay Test Savings Account\\\",\\n    \\\"type\\\": \\\"ACH-US\\\",\\n    \\\"user\\\": {\\n      \\\"_id\\\": \\\"5739ea6386c27360899fd445\\\",\\n      \\\"legal_names\\\": [\\n        \\\"Test User\\\"\\n      ]\\n    }\\n  }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Response\"\n    }\n  ]\n}\n[/block]\n> The APIs are very general purpose & can be used to accommodate different use-cases (eg. ACH payments, FedWires, Automated Savings, etc.). If you need our help with mapping out an ideal flow for you, please [Contact us](doc:contact-us) and we will be happy to help.","excerpt":"Common Flow for Getting Started (includes API references)","slug":"common-flow","type":"basic","title":"Common Flow"}

Common Flow

Common Flow for Getting Started (includes API references)

You can customize on boarding (KYC) & payment flows with Synapse quite a bit. So it is usually wise to [Contact us](doc:contact-us) before you start developing against our APIs. But if you are curious and still want to play around this common flow can help. Usually a common flow goes the following way: ``` 1) Create a user account: Supply email, phone number & name. 2) Add KYC Info: For business, its the EIN information. For Individuals it's the SSN Info. 3) Link bank account: Here you can supply account & routing number or supply online banking credentials to instantly link an account. 4) Create a transaction: Once Step 1,2 & 3 are done you can create a transaction. ``` ## 1. Create Users [Create User](doc:create-a-user) objects for both the fund originator and the fund recipient. [block:code] { "codes": [ { "code": "curl -X POST -H \"Content-Type: application/json\" -H \"X-SP-GATEWAY: e3f19e4bd4022c86e7f2|11c94ba6bad74d24a0158bc707f0fc19a86dc08f\" -H \"X-SP-USER-IP: 216.3.128.12\" -d '{\n \"logins\": [\n {\n \"email\": \"test@test.com\"\n }\n ],\n \"phone_numbers\": [\n \"9019428167\"\n ],\n \"legal_names\": [\n \"Test User\"\n ],\n \"extra\": {\n \"supp_id\": \"5303f4ddb4e7b810bf000173\",\n \"note\": null,\n \"is_business\": false,\n \"cip_tag\":1\n }\n}' \"https://sandbox.synapsepay.com/api/3/users\"", "language": "curl" }, { "code": "{\n \"_id\": \"5739ea6386c27360899fd445\",\n \"_links\": {\n \"self\": {\n \"href\": \"https://sandbox.synapsepay.com/api/3/users/5739ea6386c27360899fd445\"\n }\n },\n \"client\": {\n \"id\": 844,\n \"name\": \"SynapsePay*Sandbox\"\n },\n \"doc_status\": {\n \"physical_doc\": \"MISSING|INVALID\",\n \"virtual_doc\": \"MISSING|INVALID\"\n },\n \"documents\": [],\n \"extra\": {\n \"cip_tag\": 1,\n \"date_joined\": 1463413347832,\n \"extra_security\": true,\n \"is_business\": false,\n \"supp_id\": \"5303f4ddb4e7b810bf000173\"\n },\n \"is_hidden\": false,\n \"legal_names\": [\n \"Test User\"\n ],\n \"logins\": [\n {\n \"email\": \"test@test.com\",\n \"scope\": \"READ_AND_WRITE\"\n }\n ],\n \"permission\": \"UNVERIFIED\",\n \"phone_numbers\": [\n \"9019428167\"\n ],\n \"photos\": [],\n \"refresh_token\": \"refresh-6281b092-a34c-4628-8dea-e02a22d4c718\"\n}", "language": "json", "name": "Response" } ] } [/block] [block:callout] { "type": "info", "title": "Remember", "body": "Please remember to store `_id` of the user in your database.\n\nWe manage refresh tokens for you, so no need to store them.\n\nIf you do not want to use 2FA, store the fingerprint used when creating the user and supply the fingerprint when performing actions with the user. This way the system will not detect a new device and no 2FAs will be triggered.\n\n> A good way to do so is to pass a hashed version of your `user_pk+client_id+client_secret`. That way the value is still somewhat secret, but you won't need to store it for each unique user." } [/block] ## 2. Add KYC Info You need to add a virtual document on both sender and receiver. A list of acceptable virtual documents can be found in the [User Resources](doc:user-resources) section. A complete list of documents that we are capable of verifying as virtual documents can be found [here](#virtual-document-types). But you only need to add the physical document on the sender, a complete list of documents that we are capable of verifying as physical documents can be found [here](#physical-document-types). If you wish to know what virtual and physical documents really mean, [go here](#customer-identification-program-cip--know-your-cus). [block:code] { "codes": [ { "code": "curl -X PATCH -H \"Content-Type: application/json\" -H \"X-SP-GATEWAY: e3f19e4bd4022c86e7f2|11c94ba6bad74d24a0158bc707f0fc19a86dc08f\" -H \"X-SP-USER-IP: 216.3.128.12\" -H \"X-SP-USER: oauth-35dc926a-cf4d-43f6-b69b-c145efc66dd0|e716990e50b67a1177736960b6357524b22090ccab093d068b3d7a18dbde3f4c\" -d '{\n \"documents\":[{\n \"email\":\"test@test.com\",\n \"phone_number\":\"901-942-8167\",\n \"ip\":\"12134323\",\n \"name\":\"Charlie Brown\",\n \"alias\":\"Woof Woof\",\n \"entity_type\":\"M\",\n \"entity_scope\":\"Arts & Entertainment\",\n \"day\":2,\n \"month\":5,\n \"year\":2009,\n \"address_street\":\"Some Farm\",\n \"address_city\":\"SF\",\n \"address_subdivision\":\"CA\",\n \"address_postal_code\":\"94114\",\n \"address_country_code\":\"US\",\n \"virtual_docs\":[{\n \"document_value\":\"111-111-2222\",\n \"document_type\":\"SSN\"\n }],\n \"physical_docs\":[{\n \"document_value\":\"data:text/csv;base64,SUQs==\",\n \"document_type\":\"GOVT_ID\"\n }],\n \"social_docs\":[]\n }]\n}' \"https://sandbox.synapsepay.com/api/3/users/5739ea6386c27360899fd445\"", "language": "curl" }, { "code": "{\n \"_id\": \"5739ea6386c27360899fd445\",\n \"_links\": {\n \"self\": {\n \"href\": \"https://sandbox.synapsepay.com/api/3/users/5739ea6386c27360899fd445\"\n }\n },\n \"client\": {\n \"id\": 844,\n \"name\": \"SynapsePay*Sandbox\"\n },\n \"doc_status\": {\n \"physical_doc\": \"SUBMITTED|VALID\",\n \"virtual_doc\": \"SUBMITTED|VALID\"\n },\n \"documents\": [\n {\n \"id\": \"ef4685f1dcf78b39a85c9d4da97652e114f3af054d43b29195978a1e4918beae\",\n \"name\": \"Charlie Brown\",\n \"permission_scope\": \"SEND|RECEIVE|5000|DAILY\",\n \"physical_docs\": [\n {\n \"document_type\": \"GOVT_ID\",\n \"id\": \"70d5a44dd55e3914870039deabb5405644016a5b56d0002ea0ec4e7952def9fd\",\n \"last_updated\": 1463413784808,\n \"status\": \"SUBMITTED|VALID\"\n }\n ],\n \"social_docs\": [\n {\n \"document_type\": \"EMAIL\",\n \"id\": \"2c45158f6431ca874bbe82f63d5905567854dde4d8b81539944e5779e5eee741\",\n \"last_updated\": 1463413785201,\n \"status\": \"SUBMITTED|VALID\"\n },\n {\n \"document_type\": \"PHONE_NUMBER\",\n \"id\": \"9dd593112385cfed22721355d279e79d33acd2c48cffe9c007b6c4acbfde826c\",\n \"last_updated\": 1463413785593,\n \"status\": \"SUBMITTED|VALID\"\n }\n ],\n \"virtual_docs\": [\n {\n \"document_type\": \"SSN\",\n \"id\": \"7cb85697d26e2c1010266fd64a22afd396167ca630a4bad21a9e8fcff865bb1c\",\n \"last_updated\": 1463413784258,\n \"status\": \"SUBMITTED|VALID\"\n }\n ]\n }\n ],\n \"extra\": {\n \"cip_tag\": 1,\n \"date_joined\": 1463413347832,\n \"extra_security\": true,\n \"is_business\": false,\n \"supp_id\": \"5303f4ddb4e7b810bf000173\"\n },\n \"is_hidden\": false,\n \"legal_names\": [\n \"Test User\"\n ],\n \"logins\": [\n {\n \"email\": \"test@test.com\",\n \"scope\": \"READ_AND_WRITE\"\n }\n ],\n \"permission\": \"SEND-AND-RECEIVE\",\n \"phone_numbers\": [\n \"9019428167\"\n ],\n \"photos\": [],\n \"refresh_token\": \"refresh-6281b092-a34c-4628-8dea-e02a22d4c718\"\n}", "language": "json", "name": "Response" } ] } [/block] ## 3. Link Bank Accounts There are two ways to link a bank account to users: via online banking logins OR account/routing numbers. You can read more about it in [Node Resources](doc:node-resources) section. [block:code] { "codes": [ { "code": "curl -X POST -H \"Content-Type: application/json\" -H \"X-SP-GATEWAY: e3f19e4bd4022c86e7f2|11c94ba6bad74d24a0158bc707f0fc19a86dc08f\" -H \"X-SP-USER-IP: 216.3.128.12\" -H \"X-SP-USER: oauth-35dc926a-cf4d-43f6-b69b-c145efc66dd0|e716990e50b67a1177736960b6357524b22090ccab093d068b3d7a18dbde3f4c\" -d '{\n \"type\":\"ACH-US\",\n \"info\":{\n \"bank_id\":\"synapse_nomfa\",\n \"bank_pw\":\"test1234\",\n \"bank_name\":\"bofa\"\n }\n}' \"https://sandbox.synapsepay.com/api/3/users/5739ea6386c27360899fd445/nodes\"", "language": "curl" }, { "code": "{\n \"error_code\": \"0\",\n \"http_code\": \"200\",\n \"nodes\": [\n {\n \"_id\": \"5739eda886c2735cc02d55d1\",\n \"_links\": {\n \"self\": {\n \"href\": \"https://sandbox.synapsepay.com/api/3/users/5739ea6386c27360899fd445/nodes/5739eda886c2735cc02d55d1\"\n }\n },\n \"allowed\": \"CREDIT-AND-DEBIT\",\n \"extra\": {\n \"supp_id\": null\n },\n \"info\": {\n \"account_num\": \"8901\",\n \"balance\": {\n \"amount\": \"10000.00\",\n \"currency\": \"USD\"\n },\n \"bank_long_name\": \"ING DIRECT\",\n \"bank_name\": \"fake\",\n \"class\": \"CHECKING\",\n \"name_on_account\": \"Test User\",\n \"nickname\": \"SynapsePay Test Checking Account\",\n \"routing_num\": \"6110\",\n \"type\": \"PERSONAL\"\n },\n \"is_active\": true,\n \"type\": \"ACH-US\"\n },\n {\n ...\n },\n {\n ...\n }\n ],\n \"success\": true\n}", "language": "json", "name": "Response" } ] } [/block] ## 4. Create a transaction Using the sender's oauth credentials and node id, [Create Transaction](doc:create-transaction). You can learn more about transactions and their processing times under [Transaction Resources](doc:trans-resources). [block:code] { "codes": [ { "code": "curl -X POST -H \"Content-Type: application/json\" -H \"X-SP-GATEWAY: e3f19e4bd4022c86e7f2|11c94ba6bad74d24a0158bc707f0fc19a86dc08f\" -H \"X-SP-USER-IP: 216.3.128.12\" -H \"X-SP-USER: oauth-35dc926a-cf4d-43f6-b69b-c145efc66dd0|e716990e50b67a1177736960b6357524b22090ccab093d068b3d7a18dbde3f4c\" -d '{\n \"to\":{\n \"type\":\"ACH-US\",\n \"id\":\"5739eda886c2735cc02d55d2\"\n },\n \"amount\":{\n \"amount\":1000,\n \"currency\":\"USD\"\n },\n \"extra\":{\n \"ip\":\"192.168.0.1\"\n }\n}' \"https://sandbox.synapsepay.com/api/3/users/5739ea6386c27360899fd445/nodes/5739eda886c2735cc02d55d1/trans\"", "language": "curl" }, { "code": "{\n \"_id\": \"5739edeb86c2735cc02d55d3\",\n \"_links\": {\n \"self\": {\n \"href\": \"https://sandbox.synapsepay.com/api/3/users/5739ea6386c27360899fd445/nodes/5739eda886c2735cc02d55d1/trans/5739edeb86c2735cc02d55d3\"\n }\n },\n \"amount\": {\n \"amount\": 1000,\n \"currency\": \"USD\"\n },\n \"client\": {\n \"id\": 844,\n \"name\": \"SynapsePay*Sandbox\"\n },\n \"extra\": {\n \"created_on\": 1463414250500,\n \"ip\": \"192.168.0.1\",\n \"latlon\": \"0,0\",\n \"note\": \"\",\n \"other\": {},\n \"process_on\": 1463414250500,\n \"supp_id\": \"\",\n \"webhook\": \"\"\n },\n \"fees\": [\n {\n \"fee\": 0.2,\n \"note\": \"Synapse Facilitator Fee\",\n \"to\": {\n \"id\": \"559339aa86c273605ccd35df\"\n }\n }\n ],\n \"from\": {\n \"id\": \"5739eda886c2735cc02d55d1\",\n \"nickname\": \"SynapsePay Test Checking Account\",\n \"type\": \"ACH-US\",\n \"user\": {\n \"_id\": \"5739ea6386c27360899fd445\",\n \"legal_names\": [\n \"Test User\"\n ]\n }\n },\n \"recent_status\": {\n \"date\": 1463414250499,\n \"note\": \"Transaction created\",\n \"status\": \"CREATED\",\n \"status_id\": \"1\"\n },\n \"timeline\": [\n {\n \"date\": 1463414250499,\n \"note\": \"Transaction created\",\n \"status\": \"CREATED\",\n \"status_id\": \"1\"\n }\n ],\n \"to\": {\n \"id\": \"5739eda886c2735cc02d55d2\",\n \"nickname\": \"SynapsePay Test Savings Account\",\n \"type\": \"ACH-US\",\n \"user\": {\n \"_id\": \"5739ea6386c27360899fd445\",\n \"legal_names\": [\n \"Test User\"\n ]\n }\n }\n}", "language": "json", "name": "Response" } ] } [/block] > The APIs are very general purpose & can be used to accommodate different use-cases (eg. ACH payments, FedWires, Automated Savings, etc.). If you need our help with mapping out an ideal flow for you, please [Contact us](doc:contact-us) and we will be happy to help.