{"_id":"57e463f300c8680e00fae6d0","user":"54e4044e8ef7552300409dcb","version":{"_id":"55fa37c88065a10d004e5bb6","project":"54e405191e51932d006abc39","__v":11,"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","5915e54f7c2c552d008b8549","59499fcd64b5f5002690bbc1","59c451b7772699001c0f1df1","59c9b42dec84880010c1f348"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"REST V3","version_clean":"3.1.0","version":"3.1"},"category":{"_id":"59499fcd64b5f5002690bbc1","project":"54e405191e51932d006abc39","version":"55fa37c88065a10d004e5bb6","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-06-20T22:21:01.625Z","from_sync":false,"order":2,"slug":"quickstart-flows","title":"Quickstart Flows"},"parentDoc":null,"__v":1,"project":"54e405191e51932d006abc39","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-09-22T23:06:27.762Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"Onboarding users (KYC) and payment flows are customized for every platform. We recommend contacting us before you start developing against our APIs. But if you are curious and still want to test out our APIs, this common flow can help.\n\nThe P2P flow is ideal for applications that wish to send funds between two users registered in their system. This flow will show you how to create users, add KYC, add external accounts, add a Synapse account and make transfers.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/5a92ce8-Untitled_Diagram_12.png\",\n        \"Untitled Diagram (12).png\",\n        501,\n        61,\n        \"#191919\"\n      ],\n      \"border\": false,\n      \"sizing\": \"smart\",\n      \"caption\": \"\"\n    }\n  ]\n}\n[/block]\n## 1. Create User A Account and Add KYC\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -X POST https://uat-api.synapsefi.com/v3.1/users -H 'content-type: application/json' -H 'x-sp-gateway: client_id_5p7x3zfEglJOGcR2beTCyNAKtLnVSFBXh6vdos4k|client_secret_nP213c0wuyWIdKZRXmjHTDC0FxNBkvLoVYfi6glt' -H 'x-sp-user: |e83cf6ddcf778e37bfe3d48fc78a6502062fc1030449628c699ef3c4ffa6f9a2000b8acc3c4c0addd8013285bb52c89e5267b628ca02fa84a6d71fe186b7cd5d' -H 'x-sp-user-ip: 127.0.0.1' \\n  -d '{\\n  \\\"logins\\\": [\\n    {\\n      \\\"email\\\": \\\"test:::at:::synapsepay.com\\\"\\n    }\\n  ],\\n  \\\"phone_numbers\\\": [\\n    \\\"901.111.1111\\\",\\n    \\\"test@synapsepay.com\\\"\\n  ],\\n  \\\"legal_names\\\": [\\n    \\\"Test User\\\"\\n  ],\\n  \\\"documents\\\":[{\\n        \\\"email\\\":\\\"test@synapsepay.com\\\",\\n        \\\"phone_number\\\":\\\"901.111.1111\\\",\\n        \\\"ip\\\":\\\"::1\\\",\\n        \\\"name\\\":\\\"Test User\\\",\\n        \\\"alias\\\":\\\"Test\\\",\\n        \\\"entity_type\\\":\\\"M\\\",\\n        \\\"entity_scope\\\":\\\"Arts & Entertainment\\\",\\n        \\\"day\\\":2,\\n        \\\"month\\\":5,\\n        \\\"year\\\":1989,\\n        \\\"address_street\\\":\\\"1 Market St\\\",\\n        \\\"address_city\\\":\\\"SF\\\",\\n        \\\"address_subdivision\\\":\\\"CA\\\",\\n        \\\"address_postal_code\\\":\\\"94114\\\",\\n        \\\"address_country_code\\\":\\\"US\\\",\\n        \\\"virtual_docs\\\":[{\\n            \\\"document_value\\\":\\\"2222\\\",\\n            \\\"document_type\\\":\\\"SSN\\\"\\n        }]\\n    }],\\n  \\\"extra\\\": {\\n    \\\"supp_id\\\": \\\"122eddfgbeafrfvbbb\\\",\\n    \\\"cip_tag\\\":1,\\n    \\\"is_business\\\": false\\n  }\\n}'\",\n      \"language\": \"curl\"\n    },\n    {\n      \"code\": \"{\\n    \\\"_id\\\": \\\"59499bc6838454002fd0c096\\\",\\n    \\\"_links\\\": {\\n        \\\"self\\\": {\\n            \\\"href\\\": \\\"https://uat-api.synapsefi.com/v3.1/users/59499bc6838454002fd0c096\\\"\\n        }\\n    },\\n    \\\"client\\\": {\\n        \\\"id\\\": \\\"5949989f23dbf000229bdbaf\\\",\\n        \\\"name\\\": \\\"Test Platform\\\"\\n    },\\n    \\\"doc_status\\\": {\\n        \\\"physical_doc\\\": \\\"MISSING|INVALID\\\",\\n        \\\"virtual_doc\\\": \\\"MISSING|INVALID\\\"\\n    },\\n    \\\"documents\\\": [\\n        {\\n            \\\"id\\\": \\\"dcd19da5fb2470984d0e316fb5551269e65c109730b0b45b32a8bb1eb83d6a72\\\",\\n            \\\"name\\\": \\\"Test User\\\",\\n            \\\"permission_scope\\\": \\\"UNVERIFIED\\\",\\n            \\\"physical_docs\\\": [],\\n            \\\"social_docs\\\": [\\n                {\\n                    \\\"document_type\\\": \\\"IP\\\",\\n                    \\\"id\\\": \\\"28d9177b22c127d9a51d8903893864accf6e553ac326704a4c0d585eaad2516a\\\",\\n                    \\\"last_updated\\\": 1497996229732,\\n                    \\\"status\\\": \\\"SUBMITTED|VALID\\\"\\n                },\\n                {\\n                    \\\"document_type\\\": \\\"PHONE_NUMBER\\\",\\n                    \\\"id\\\": \\\"fda60784d6375bc44edafaaeae149626c4c13dcb92e85a2a7a00eec2cdfd2b6f\\\",\\n                    \\\"last_updated\\\": 1497996229222,\\n                    \\\"status\\\": \\\"SUBMITTED|VALID\\\"\\n                },\\n                {\\n                    \\\"document_type\\\": \\\"EMAIL\\\",\\n                    \\\"id\\\": \\\"b886811ff9cbc150065c65eb5295951ac624e3a63e57d5e016cfddc03904f46b\\\",\\n                    \\\"last_updated\\\": 1497996228710,\\n                    \\\"status\\\": \\\"SUBMITTED|VALID\\\"\\n                }\\n            ],\\n            \\\"virtual_docs\\\": [\\n                {\\n                    \\\"document_type\\\": \\\"SSN\\\",\\n                    \\\"id\\\": \\\"ee596c2896dddc19b76c07a184fe7d3cf5a04b8e94b9108190cac7890739017f\\\",\\n                    \\\"last_updated\\\": 1497996228195,\\n                    \\\"status\\\": \\\"SUBMITTED|VALID\\\"\\n                }\\n            ]\\n        }\\n    ],\\n    \\\"emails\\\": [],\\n    \\\"extra\\\": {\\n        \\\"cip_tag\\\": 1,\\n        \\\"date_joined\\\": 1497996227163,\\n        \\\"extra_security\\\": false,\\n        \\\"is_business\\\": false,\\n        \\\"last_updated\\\": 1497996227163,\\n        \\\"public_note\\\": null,\\n        \\\"supp_id\\\": \\\"122eddfgbeafrfvbbb\\\"\\n    },\\n    \\\"is_hidden\\\": false,\\n    \\\"legal_names\\\": [\\n        \\\"Test User\\\"\\n    ],\\n    \\\"logins\\\": [\\n        {\\n            \\\"email\\\": \\\"test@synapsepay.com\\\",\\n            \\\"scope\\\": \\\"READ_AND_WRITE\\\"\\n        }\\n    ],\\n    \\\"permission\\\": \\\"UNVERIFIED\\\",\\n    \\\"phone_numbers\\\": [\\n        \\\"test@synapsepay.com\\\",\\n        \\\"901.111.1111\\\"\\n    ],\\n    \\\"photos\\\": [],\\n    \\\"refresh_token\\\": \\\"refresh_FBCt0DOU9NvcfKpe3lbr7ghisaoq2ImduPERx4nW\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Response\"\n    }\n  ]\n}\n[/block]\nIn the response, you get back an `_id` associated with user A. You should store this `_id`. In addition, the `refresh_token` is included in the response which will be used to generate OAuth access, which allows you to perform operations on behalf of the user.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"User verification is async. As of now, the user `permission` shows as `UNVERIFIED`. If you do a `GET` user after the `POST` user API call and all documents have been submitted and verified, the user will have `SEND-AND-RECEIVE` permissions. For a user to be able to send funds to the platform, their account permissions need to be `SEND-AND-RECEIVE`.\",\n  \"title\": \"Asynchronous User Verification\"\n}\n[/block]\nFor the purpose of this tutorial, we will assume for user A to be able to get `SEND-AND-RECEIVE` permissions, we need to supply SSN number.\n\n### OAuth User A\n\nIf you are using one of the Client libraries, this step is not required because the libraries automatically handle OAuth after the user is created.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -X POST https://uat-api.synapsefi.com/v3.1/oauth/59499bc6838454002fd0c096 -H 'content-type: application/json' -H 'x-sp-gateway: client_id_5p7x3zfEglJOGcR2beTCyNAKtLnVSFBXh6vdos4k|client_secret_nP213c0wuyWIdKZRXmjHTDC0FxNBkvLoVYfi6glt' -H 'x-sp-user: |e83cf6ddcf778e37bfe3d48fc78a6502062fc1030449628c699ef3c4ffa6f9a2000b8acc3c4c0addd8013285bb52c89e5267b628ca02fa84a6d71fe186b7cd5d' -H 'x-sp-user-ip: 127.0.0.1' -d '{\\n    \\\"refresh_token\\\":\\\"refresh_FBCt0DOU9NvcfKpe3lbr7ghisaoq2ImduPERx4nW\\\"\\n}'\",\n      \"language\": \"curl\"\n    },\n    {\n      \"code\": \"{\\n    \\\"client_id\\\": \\\"5949989f23dbf000229bdbaf\\\",\\n    \\\"client_name\\\": \\\"Test Platform\\\",\\n    \\\"expires_at\\\": \\\"1498007186\\\",\\n    \\\"expires_in\\\": \\\"7200\\\",\\n    \\\"oauth_key\\\": \\\"oauth_EdsiI8FOkKz1QaBGqHAxLl5Xjv4o7nCDThp0yUet\\\",\\n    \\\"refresh_expires_in\\\": 8,\\n    \\\"refresh_token\\\": \\\"refresh_FBCt0DOU9NvcfKpe3lbr7ghisaoq2ImduPERx4nW\\\",\\n    \\\"scope\\\": [\\n        \\\"USER|PATCH\\\",\\n        \\\"USER|GET\\\",\\n        \\\"NODES|POST\\\",\\n        \\\"NODES|GET\\\",\\n        \\\"NODE|GET\\\",\\n        \\\"NODE|PATCH\\\",\\n        \\\"NODE|DELETE\\\",\\n        \\\"TRANS|POST\\\",\\n        \\\"TRANS|GET\\\",\\n        \\\"TRAN|GET\\\",\\n        \\\"TRAN|PATCH\\\",\\n        \\\"TRAN|DELETE\\\"\\n    ],\\n    \\\"user_id\\\": \\\"59499bc6838454002fd0c096\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Response\"\n    }\n  ]\n}\n[/block]\nFrom the response, you need to capture the `oauth_key` to make further requests on the user's behalf.\n\n##2. Link External Account For User A\nIn this step we will allow the user to link an external bank account by using their online banking credentials.\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -X POST https://uat-api.synapsefi.com/v3.1/users/59499bc6838454002fd0c096/nodes -H 'content-type: application/json' -H 'x-sp-user: oauth_EdsiI8FOkKz1QaBGqHAxLl5Xjv4o7nCDThp0yUet|e83cf6ddcf778e37bfe3d48fc78a6502062fc1030449628c699ef3c4ffa6f9a2000b8acc3c4c0addd8013285bb52c89e5267b628ca02fa84a6d71fe186b7cd5d' -H 'x-sp-user-ip: 127.0.0.1' -d '{\\n  \\\"type\\\": \\\"ACH-US\\\",\\n  \\\"info\\\":{\\n    \\\"bank_id\\\":\\\"synapse_good\\\",\\n    \\\"bank_pw\\\":\\\"test1234\\\",\\n    \\\"bank_name\\\":\\\"fake\\\"\\n  }\\n}'\",\n      \"language\": \"curl\"\n    },\n    {\n      \"code\": \"{\\n    \\\"error_code\\\": \\\"10\\\",\\n    \\\"http_code\\\": \\\"202\\\",\\n    \\\"mfa\\\": {\\n        \\\"access_token\\\": \\\"fake_cd60680b9addc01295b34a6e3d14473e3cc65aa82d3\\\",\\n        \\\"message\\\": \\\"I heard you like questions so we put a question in your question?\\\",\\n        \\\"type\\\": \\\"question\\\"\\n    },\\n    \\\"success\\\": true\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Response\"\n    }\n  ]\n}\n[/block]\nIn most cases when a user tries to log in with their bank account, the user is challenged with an MFA response—this can be either question-based or code-based. You need to capture the `access_token` in order to continue linking the account.\n\n### Perform MFA\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -X POST https://uat-api.synapsefi.com/v3.1/users/59499bc6838454002fd0c096/nodes -H 'content-type: application/json' -H 'postman-token: fa66ac69-8835-999d-7ad2-3e9ed259a087' -H 'x-sp-user: oauth_EdsiI8FOkKz1QaBGqHAxLl5Xjv4o7nCDThp0yUet|e83cf6ddcf778e37bfe3d48fc78a6502062fc1030449628c699ef3c4ffa6f9a2000b8acc3c4c0addd8013285bb52c89e5267b628ca02fa84a6d71fe186b7cd5d' -H 'x-sp-user-ip: 127.0.0.1' \\n-d '{\\n \\\"access_token\\\":\\\"fake_cd60680b9addc01295b34a6e3d14473e3cc65aa82d3\\\",\\n \\\"mfa_answer\\\":\\\"test_answer\\\"\\n}'\",\n      \"language\": \"curl\"\n    },\n    {\n      \"code\": \"{\\n    \\\"error_code\\\": \\\"0\\\",\\n    \\\"http_code\\\": \\\"200\\\",\\n    \\\"limit\\\": 2,\\n    \\\"node_count\\\": 2,\\n    \\\"nodes\\\": [\\n        {\\n            \\\"_id\\\": \\\"5949ae324d1d6200370ff5db\\\",\\n            \\\"_links\\\": {\\n                \\\"self\\\": {\\n                    \\\"href\\\": \\\"https://uat-api.synapsefi.com/v3.1/users/59499bc6838454002fd0c096/nodes/5949ae324d1d6200370ff5db\\\"\\n                }\\n            },\\n            \\\"allowed\\\": \\\"CREDIT-AND-DEBIT\\\",\\n            \\\"client\\\": {\\n                \\\"id\\\": \\\"5949989f23dbf000229bdbaf\\\",\\n                \\\"name\\\": \\\"Test Platform\\\"\\n            },\\n            \\\"extra\\\": {\\n                \\\"other\\\": {},\\n                \\\"supp_id\\\": \\\"\\\"\\n            },\\n            \\\"info\\\": {\\n                \\\"account_num\\\": \\\"8902\\\",\\n                \\\"address\\\": \\\"PO BOX 85139, RICHMOND, VA, US\\\",\\n                \\\"balance\\\": {\\n                    \\\"amount\\\": \\\"750.00\\\",\\n                    \\\"currency\\\": \\\"USD\\\"\\n                },\\n                \\\"bank_long_name\\\": \\\"CAPITAL ONE N.A.\\\",\\n                \\\"bank_name\\\": \\\"CAPITAL ONE N.A.\\\",\\n                \\\"class\\\": \\\"SAVINGS\\\",\\n                \\\"match_info\\\": {\\n                    \\\"email_match\\\": \\\"match\\\",\\n                    \\\"name_match\\\": \\\"match\\\",\\n                    \\\"phonenumber_match\\\": \\\"no_match\\\"\\n                },\\n                \\\"name_on_account\\\": \\\" \\\",\\n                \\\"nickname\\\": \\\"SynapsePay Test Savings Account - 8902\\\",\\n                \\\"routing_num\\\": \\\"6110\\\",\\n                \\\"type\\\": \\\"BUSINESS\\\"\\n            },\\n            \\\"is_active\\\": true,\\n            \\\"timeline\\\": [\\n                {\\n                    \\\"date\\\": 1498000945638,\\n                    \\\"note\\\": \\\"Node created.\\\"\\n                }\\n            ],\\n            \\\"type\\\": \\\"ACH-US\\\",\\n            \\\"user_id\\\": \\\"59499bc6838454002fd0c096\\\"\\n        },\\n        {\\n            ...\\n        }\\n    ],\\n    \\\"page_count\\\": 1,\\n    \\\"success\\\": true\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Response\"\n    }\n  ]\n}\n[/block]\nFrom the response, you need to capture the `_id`. Now the user A's external account is ready for transfers. Both your user and their node is created. The next step is for you to create a Synapse node for user A.\n\n##3. Create Synapse Account for User A\nIn this step we will allow the user to create a `SUBACCOUNT-US` node with Synapse.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -X POST https://uat-api.synapsefi.com/v3.1/users/59499bc6838454002fd0c096/nodes  -H 'content-type: application/json' -H 'postman-token: ac89cde7-239b-3f48-ab06-950253ae6722' -H 'x-sp-user: oauth_EdsiI8FOkKz1QaBGqHAxLl5Xjv4o7nCDThp0yUet|e83cf6ddcf778e37bfe3d48fc78a6502062fc1030449628c699ef3c4ffa6f9a2000b8acc3c4c0addd8013285bb52c89e5267b628ca02fa84a6d71fe186b7cd5d' -H 'x-sp-user-ip: 127.0.0.1' -d '{\\n  \\\"type\\\": \\\"SUBACCOUNT-US\\\",\\n  \\\"info\\\":{\\n      \\\"nickname\\\":\\\"My Account\\\"\\n  }\\n}'\",\n      \"language\": \"curl\"\n    },\n    {\n      \"code\": \"{\\n    \\\"error_code\\\": \\\"0\\\",\\n    \\\"http_code\\\": \\\"200\\\",\\n    \\\"limit\\\": 20,\\n    \\\"node_count\\\": 1,\\n    \\\"nodes\\\": [\\n        {\\n            \\\"_id\\\": \\\"5949b1334d1d62002e7af1dc\\\",\\n            \\\"_links\\\": {\\n                \\\"self\\\": {\\n                    \\\"href\\\": \\\"https://uat-api.synapsefi.com/v3.1/users/59499bc6838454002fd0c096/nodes/5949b1334d1d62002e7af1dc\\\"\\n                }\\n            },\\n            \\\"allowed\\\": \\\"CREDIT-AND-DEBIT\\\",\\n            \\\"client\\\": {\\n                \\\"id\\\": \\\"5949989f23dbf000229bdbaf\\\",\\n                \\\"name\\\": \\\"Test Platform\\\"\\n            },\\n            \\\"extra\\\": {\\n                \\\"other\\\": {},\\n                \\\"supp_id\\\": \\\"\\\"\\n            },\\n            \\\"info\\\": {\\n                \\\"balance\\\": {\\n                    \\\"amount\\\": 0,\\n                    \\\"currency\\\": \\\"USD\\\"\\n                },\\n                \\\"name_on_account\\\": \\\" \\\",\\n                \\\"nickname\\\": \\\"My Account\\\"\\n            },\\n            \\\"is_active\\\": true,\\n            \\\"timeline\\\": [\\n                {\\n                    \\\"date\\\": 1498001715653,\\n                    \\\"note\\\": \\\"Node created.\\\"\\n                }\\n            ],\\n            \\\"type\\\": \\\"SUBACCOUNT-US\\\",\\n            \\\"user_id\\\": \\\"59499bc6838454002fd0c096\\\"\\n        }\\n    ],\\n    \\\"page_count\\\": 1,\\n    \\\"success\\\": true\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Response\"\n    }\n  ]\n}\n[/block]\nFrom the response, you need to capture the `_id`. Now user A has both an external `ACH-US` node and `SUBACCOUNT-US` node attached to their user account.\n\n##4. Repeat steps 1-3 for User B\nCreate user, add KYC, link external account and create a `SUBACCOUNT-US` node for user B.\n\n##5. Create Transaction 1\nThis transaction is to fund the `SUBACCOUNT-US` node by transferring money between user A's external `ACH-US` account to their Synapse account.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -X POST https://uat-api.synapsefi.com/v3.1/users/59499bc6838454002fd0c096/nodes/5949ae324d1d6200370ff5db/trans -H 'content-type: application/json' -H 'x-sp-user: oauth_qauIiw1lgmKCh6eXVvZWf2EB0PFzMAY4LUH7ybJp|e83cf6ddcf778e37bfe3d48fc78a6502062fc1030449628c699ef3c4ffa6f9a2000b8acc3c4c0addd8013285bb52c89e5267b628ca02fa84a6d71fe186b7cd5d' -H 'x-sp-user-ip: 127.0.0.1'\\n  -d '{\\n  \\\"to\\\": {\\n    \\\"type\\\": \\\"SUBACCOUNT-US\\\",\\n    \\\"id\\\": \\\"5949b1334d1d62002e7af1dc\\\"\\n  },\\n  \\\"amount\\\": {\\n    \\\"amount\\\": 200,\\n    \\\"currency\\\": \\\"USD\\\"\\n  },\\n  \\\"extra\\\": {\\n    \\\"ip\\\": \\\"192.168.0.1\\\",\\n    \\\"note\\\": \\\"ACH to Sub\\\"\\n  }\\n}'\",\n      \"language\": \"curl\"\n    },\n    {\n      \"code\": \"{\\n    \\\"_id\\\": \\\"594b0b497658de003076ae73\\\",\\n    \\\"_links\\\": {\\n        \\\"self\\\": {\\n            \\\"href\\\": \\\"https://uat-api.synapsefi.com/v3.1/users/59499bc6838454002fd0c096/nodes/5949ae324d1d6200370ff5db/trans/594b0b497658de003076ae73\\\"\\n        }\\n    },\\n    \\\"_v\\\": 2,\\n    \\\"amount\\\": {\\n        \\\"amount\\\": 200,\\n        \\\"currency\\\": \\\"USD\\\"\\n    },\\n    \\\"client\\\": {\\n        \\\"id\\\": \\\"5949989f23dbf000229bdbaf\\\",\\n        \\\"name\\\": \\\"Test Platform\\\"\\n    },\\n    \\\"extra\\\": {\\n        \\\"created_on\\\": 1498090313161,\\n        \\\"ip\\\": \\\"192.168.0.1\\\",\\n        \\\"latlon\\\": \\\"0,0\\\",\\n        \\\"note\\\": \\\"ACH to Sub\\\",\\n        \\\"process_on\\\": 1498090313161,\\n        \\\"supp_id\\\": \\\"1122444\\\"\\n    },\\n    \\\"fees\\\": [\\n        {\\n            \\\"fee\\\": 0,\\n            \\\"note\\\": \\\"Facilitator Fee\\\",\\n            \\\"to\\\": {\\n                \\\"id\\\": \\\"None\\\"\\n            }\\n        }\\n    ],\\n    \\\"from\\\": {\\n        \\\"id\\\": \\\"5949ae324d1d6200370ff5db\\\",\\n        \\\"nickname\\\": \\\"SynapsePay Test Savings Account - 8902\\\",\\n        \\\"type\\\": \\\"ACH-US\\\",\\n        \\\"user\\\": {\\n            \\\"_id\\\": \\\"59499bc6838454002fd0c096\\\",\\n            \\\"legal_names\\\": []\\n        }\\n    },\\n    \\\"recent_status\\\": {\\n        \\\"date\\\": 1498090313161,\\n        \\\"note\\\": \\\"Transaction Created.\\\",\\n        \\\"status\\\": \\\"CREATED\\\",\\n        \\\"status_id\\\": \\\"1\\\"\\n    },\\n    \\\"timeline\\\": [\\n        {\\n            \\\"date\\\": 1498090313161,\\n            \\\"note\\\": \\\"Transaction Created.\\\",\\n            \\\"status\\\": \\\"CREATED\\\",\\n            \\\"status_id\\\": \\\"1\\\"\\n        }\\n    ],\\n    \\\"to\\\": {\\n        \\\"id\\\": \\\"5949b1334d1d62002e7af1dc\\\",\\n        \\\"nickname\\\": \\\"\\\",\\n        \\\"type\\\": \\\"SUBACCOUNT-US\\\",\\n        \\\"user\\\": {\\n            \\\"_id\\\": \\\"\\\",\\n            \\\"legal_names\\\": []\\n        }\\n    }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Response\"\n    }\n  ]\n}\n[/block]\nNow user A is ready to send funds from their `SUBACCOUNT-US` node to user B's external `ACH-US` node.\n\n##6. Create Transaction 2\n\nUser A `SUBACCOUNT-US` to User B `ACH-US`\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -X POST https://uat-api.synapsefi.com/v3.1/users/59499bc6838454002fd0c096/nodes/5949b1334d1d62002e7af1dc/trans -H 'content-type: application/json' -H 'x-sp-user: oauth_qauIiw1lgmKCh6eXVvZWf2EB0PFzMAY4LUH7ybJp|e83cf6ddcf778e37bfe3d48fc78a6502062fc1030449628c699ef3c4ffa6f9a2000b8acc3c4c0addd8013285bb52c89e5267b628ca02fa84a6d71fe186b7cd5d' -H 'x-sp-user-ip: 127.0.0.1'\\n  -d '{\\n  \\\"to\\\": {\\n    \\\"type\\\": \\\"ACH-US\\\",\\n    \\\"id\\\": \\\"594ada104d1d620037a284c0\\\"\\n  },\\n  \\\"amount\\\": {\\n    \\\"amount\\\": 100,\\n    \\\"currency\\\": \\\"USD\\\"\\n  },\\n  \\\"extra\\\": {\\n    \\\"ip\\\": \\\"192.168.0.1\\\",\\n    \\\"note\\\": \\\"User A Sub to User B ACH\\\"\\n  }\\n}'\",\n      \"language\": \"curl\"\n    },\n    {\n      \"code\": \"{\\n    \\\"_id\\\": \\\"594b12b44599e8002efb3178\\\",\\n    \\\"_links\\\": {\\n        \\\"self\\\": {\\n            \\\"href\\\": \\\"https://uat-api.synapsefi.com/v3.1/users/59499bc6838454002fd0c096/nodes/5949b1334d1d62002e7af1dc/trans/594b12b44599e8002efb3178\\\"\\n        }\\n    },\\n    \\\"_v\\\": 2,\\n    \\\"amount\\\": {\\n        \\\"amount\\\": 100,\\n        \\\"currency\\\": \\\"USD\\\"\\n    },\\n    \\\"client\\\": {\\n        \\\"id\\\": \\\"5949989f23dbf000229bdbaf\\\",\\n        \\\"name\\\": \\\"Test Platform\\\"\\n    },\\n    \\\"extra\\\": {\\n        \\\"created_on\\\": 1498092212493,\\n        \\\"ip\\\": \\\"192.168.0.1\\\",\\n        \\\"latlon\\\": \\\"0,0\\\",\\n        \\\"note\\\": \\\"User A Sub to User B ACH\\\",\\n        \\\"process_on\\\": 1498092212493,\\n        \\\"supp_id\\\": \\\"1122444\\\"\\n    },\\n    \\\"fees\\\": [\\n        {\\n            \\\"fee\\\": 0,\\n            \\\"note\\\": \\\"Facilitator Fee\\\",\\n            \\\"to\\\": {\\n                \\\"id\\\": \\\"None\\\"\\n            }\\n        }\\n    ],\\n    \\\"from\\\": {\\n        \\\"id\\\": \\\"5949b1334d1d62002e7af1dc\\\",\\n        \\\"nickname\\\": \\\"My Savings Account\\\",\\n        \\\"type\\\": \\\"SUBACCOUNT-US\\\",\\n        \\\"user\\\": {\\n            \\\"_id\\\": \\\"59499bc6838454002fd0c096\\\",\\n            \\\"legal_names\\\": []\\n        }\\n    },\\n    \\\"recent_status\\\": {\\n        \\\"date\\\": 1498092212493,\\n        \\\"note\\\": \\\"Transaction Created.\\\",\\n        \\\"status\\\": \\\"CREATED\\\",\\n        \\\"status_id\\\": \\\"1\\\"\\n    },\\n    \\\"timeline\\\": [\\n        {\\n            \\\"date\\\": 1498092212493,\\n            \\\"note\\\": \\\"Transaction Created.\\\",\\n            \\\"status\\\": \\\"CREATED\\\",\\n            \\\"status_id\\\": \\\"1\\\"\\n        }\\n    ],\\n    \\\"to\\\": {\\n        \\\"id\\\": \\\"594ada104d1d620037a284c0\\\",\\n        \\\"nickname\\\": \\\"\\\",\\n        \\\"type\\\": \\\"ACH-US\\\",\\n        \\\"user\\\": {\\n            \\\"_id\\\": \\\"\\\",\\n            \\\"legal_names\\\": []\\n        }\\n    }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Response\"\n    }\n  ]\n}\n[/block]\nNow user B has received $100 in their external bank account.\n\nThat's it! Now you have a basic P2P application working with Synapse. This is the bare bones version. If you have any questions, please [contact us](doc:contact-us) and we will be more than happy to assist.","excerpt":"Common Flow for P2P Platforms","slug":"p2p-flow","type":"basic","title":"P2P Flow"}

P2P Flow

Common Flow for P2P Platforms

Onboarding users (KYC) and payment flows are customized for every platform. We recommend contacting us before you start developing against our APIs. But if you are curious and still want to test out our APIs, this common flow can help. The P2P flow is ideal for applications that wish to send funds between two users registered in their system. This flow will show you how to create users, add KYC, add external accounts, add a Synapse account and make transfers. [block:image] { "images": [ { "image": [ "https://files.readme.io/5a92ce8-Untitled_Diagram_12.png", "Untitled Diagram (12).png", 501, 61, "#191919" ], "border": false, "sizing": "smart", "caption": "" } ] } [/block] ## 1. Create User A Account and Add KYC [block:code] { "codes": [ { "code": "curl -X POST https://uat-api.synapsefi.com/v3.1/users -H 'content-type: application/json' -H 'x-sp-gateway: client_id_5p7x3zfEglJOGcR2beTCyNAKtLnVSFBXh6vdos4k|client_secret_nP213c0wuyWIdKZRXmjHTDC0FxNBkvLoVYfi6glt' -H 'x-sp-user: |e83cf6ddcf778e37bfe3d48fc78a6502062fc1030449628c699ef3c4ffa6f9a2000b8acc3c4c0addd8013285bb52c89e5267b628ca02fa84a6d71fe186b7cd5d' -H 'x-sp-user-ip: 127.0.0.1' \n -d '{\n \"logins\": [\n {\n \"email\": \"test@synapsepay.com\"\n }\n ],\n \"phone_numbers\": [\n \"901.111.1111\",\n \"test@synapsepay.com\"\n ],\n \"legal_names\": [\n \"Test User\"\n ],\n \"documents\":[{\n \"email\":\"test@synapsepay.com\",\n \"phone_number\":\"901.111.1111\",\n \"ip\":\"::1\",\n \"name\":\"Test User\",\n \"alias\":\"Test\",\n \"entity_type\":\"M\",\n \"entity_scope\":\"Arts & Entertainment\",\n \"day\":2,\n \"month\":5,\n \"year\":1989,\n \"address_street\":\"1 Market St\",\n \"address_city\":\"SF\",\n \"address_subdivision\":\"CA\",\n \"address_postal_code\":\"94114\",\n \"address_country_code\":\"US\",\n \"virtual_docs\":[{\n \"document_value\":\"2222\",\n \"document_type\":\"SSN\"\n }]\n }],\n \"extra\": {\n \"supp_id\": \"122eddfgbeafrfvbbb\",\n \"cip_tag\":1,\n \"is_business\": false\n }\n}'", "language": "curl" }, { "code": "{\n \"_id\": \"59499bc6838454002fd0c096\",\n \"_links\": {\n \"self\": {\n \"href\": \"https://uat-api.synapsefi.com/v3.1/users/59499bc6838454002fd0c096\"\n }\n },\n \"client\": {\n \"id\": \"5949989f23dbf000229bdbaf\",\n \"name\": \"Test Platform\"\n },\n \"doc_status\": {\n \"physical_doc\": \"MISSING|INVALID\",\n \"virtual_doc\": \"MISSING|INVALID\"\n },\n \"documents\": [\n {\n \"id\": \"dcd19da5fb2470984d0e316fb5551269e65c109730b0b45b32a8bb1eb83d6a72\",\n \"name\": \"Test User\",\n \"permission_scope\": \"UNVERIFIED\",\n \"physical_docs\": [],\n \"social_docs\": [\n {\n \"document_type\": \"IP\",\n \"id\": \"28d9177b22c127d9a51d8903893864accf6e553ac326704a4c0d585eaad2516a\",\n \"last_updated\": 1497996229732,\n \"status\": \"SUBMITTED|VALID\"\n },\n {\n \"document_type\": \"PHONE_NUMBER\",\n \"id\": \"fda60784d6375bc44edafaaeae149626c4c13dcb92e85a2a7a00eec2cdfd2b6f\",\n \"last_updated\": 1497996229222,\n \"status\": \"SUBMITTED|VALID\"\n },\n {\n \"document_type\": \"EMAIL\",\n \"id\": \"b886811ff9cbc150065c65eb5295951ac624e3a63e57d5e016cfddc03904f46b\",\n \"last_updated\": 1497996228710,\n \"status\": \"SUBMITTED|VALID\"\n }\n ],\n \"virtual_docs\": [\n {\n \"document_type\": \"SSN\",\n \"id\": \"ee596c2896dddc19b76c07a184fe7d3cf5a04b8e94b9108190cac7890739017f\",\n \"last_updated\": 1497996228195,\n \"status\": \"SUBMITTED|VALID\"\n }\n ]\n }\n ],\n \"emails\": [],\n \"extra\": {\n \"cip_tag\": 1,\n \"date_joined\": 1497996227163,\n \"extra_security\": false,\n \"is_business\": false,\n \"last_updated\": 1497996227163,\n \"public_note\": null,\n \"supp_id\": \"122eddfgbeafrfvbbb\"\n },\n \"is_hidden\": false,\n \"legal_names\": [\n \"Test User\"\n ],\n \"logins\": [\n {\n \"email\": \"test@synapsepay.com\",\n \"scope\": \"READ_AND_WRITE\"\n }\n ],\n \"permission\": \"UNVERIFIED\",\n \"phone_numbers\": [\n \"test@synapsepay.com\",\n \"901.111.1111\"\n ],\n \"photos\": [],\n \"refresh_token\": \"refresh_FBCt0DOU9NvcfKpe3lbr7ghisaoq2ImduPERx4nW\"\n}", "language": "json", "name": "Response" } ] } [/block] In the response, you get back an `_id` associated with user A. You should store this `_id`. In addition, the `refresh_token` is included in the response which will be used to generate OAuth access, which allows you to perform operations on behalf of the user. [block:callout] { "type": "info", "body": "User verification is async. As of now, the user `permission` shows as `UNVERIFIED`. If you do a `GET` user after the `POST` user API call and all documents have been submitted and verified, the user will have `SEND-AND-RECEIVE` permissions. For a user to be able to send funds to the platform, their account permissions need to be `SEND-AND-RECEIVE`.", "title": "Asynchronous User Verification" } [/block] For the purpose of this tutorial, we will assume for user A to be able to get `SEND-AND-RECEIVE` permissions, we need to supply SSN number. ### OAuth User A If you are using one of the Client libraries, this step is not required because the libraries automatically handle OAuth after the user is created. [block:code] { "codes": [ { "code": "curl -X POST https://uat-api.synapsefi.com/v3.1/oauth/59499bc6838454002fd0c096 -H 'content-type: application/json' -H 'x-sp-gateway: client_id_5p7x3zfEglJOGcR2beTCyNAKtLnVSFBXh6vdos4k|client_secret_nP213c0wuyWIdKZRXmjHTDC0FxNBkvLoVYfi6glt' -H 'x-sp-user: |e83cf6ddcf778e37bfe3d48fc78a6502062fc1030449628c699ef3c4ffa6f9a2000b8acc3c4c0addd8013285bb52c89e5267b628ca02fa84a6d71fe186b7cd5d' -H 'x-sp-user-ip: 127.0.0.1' -d '{\n \"refresh_token\":\"refresh_FBCt0DOU9NvcfKpe3lbr7ghisaoq2ImduPERx4nW\"\n}'", "language": "curl" }, { "code": "{\n \"client_id\": \"5949989f23dbf000229bdbaf\",\n \"client_name\": \"Test Platform\",\n \"expires_at\": \"1498007186\",\n \"expires_in\": \"7200\",\n \"oauth_key\": \"oauth_EdsiI8FOkKz1QaBGqHAxLl5Xjv4o7nCDThp0yUet\",\n \"refresh_expires_in\": 8,\n \"refresh_token\": \"refresh_FBCt0DOU9NvcfKpe3lbr7ghisaoq2ImduPERx4nW\",\n \"scope\": [\n \"USER|PATCH\",\n \"USER|GET\",\n \"NODES|POST\",\n \"NODES|GET\",\n \"NODE|GET\",\n \"NODE|PATCH\",\n \"NODE|DELETE\",\n \"TRANS|POST\",\n \"TRANS|GET\",\n \"TRAN|GET\",\n \"TRAN|PATCH\",\n \"TRAN|DELETE\"\n ],\n \"user_id\": \"59499bc6838454002fd0c096\"\n}", "language": "json", "name": "Response" } ] } [/block] From the response, you need to capture the `oauth_key` to make further requests on the user's behalf. ##2. Link External Account For User A In this step we will allow the user to link an external bank account by using their online banking credentials. [block:code] { "codes": [ { "code": "curl -X POST https://uat-api.synapsefi.com/v3.1/users/59499bc6838454002fd0c096/nodes -H 'content-type: application/json' -H 'x-sp-user: oauth_EdsiI8FOkKz1QaBGqHAxLl5Xjv4o7nCDThp0yUet|e83cf6ddcf778e37bfe3d48fc78a6502062fc1030449628c699ef3c4ffa6f9a2000b8acc3c4c0addd8013285bb52c89e5267b628ca02fa84a6d71fe186b7cd5d' -H 'x-sp-user-ip: 127.0.0.1' -d '{\n \"type\": \"ACH-US\",\n \"info\":{\n \"bank_id\":\"synapse_good\",\n \"bank_pw\":\"test1234\",\n \"bank_name\":\"fake\"\n }\n}'", "language": "curl" }, { "code": "{\n \"error_code\": \"10\",\n \"http_code\": \"202\",\n \"mfa\": {\n \"access_token\": \"fake_cd60680b9addc01295b34a6e3d14473e3cc65aa82d3\",\n \"message\": \"I heard you like questions so we put a question in your question?\",\n \"type\": \"question\"\n },\n \"success\": true\n}", "language": "json", "name": "Response" } ] } [/block] In most cases when a user tries to log in with their bank account, the user is challenged with an MFA response—this can be either question-based or code-based. You need to capture the `access_token` in order to continue linking the account. ### Perform MFA [block:code] { "codes": [ { "code": "curl -X POST https://uat-api.synapsefi.com/v3.1/users/59499bc6838454002fd0c096/nodes -H 'content-type: application/json' -H 'postman-token: fa66ac69-8835-999d-7ad2-3e9ed259a087' -H 'x-sp-user: oauth_EdsiI8FOkKz1QaBGqHAxLl5Xjv4o7nCDThp0yUet|e83cf6ddcf778e37bfe3d48fc78a6502062fc1030449628c699ef3c4ffa6f9a2000b8acc3c4c0addd8013285bb52c89e5267b628ca02fa84a6d71fe186b7cd5d' -H 'x-sp-user-ip: 127.0.0.1' \n-d '{\n \"access_token\":\"fake_cd60680b9addc01295b34a6e3d14473e3cc65aa82d3\",\n \"mfa_answer\":\"test_answer\"\n}'", "language": "curl" }, { "code": "{\n \"error_code\": \"0\",\n \"http_code\": \"200\",\n \"limit\": 2,\n \"node_count\": 2,\n \"nodes\": [\n {\n \"_id\": \"5949ae324d1d6200370ff5db\",\n \"_links\": {\n \"self\": {\n \"href\": \"https://uat-api.synapsefi.com/v3.1/users/59499bc6838454002fd0c096/nodes/5949ae324d1d6200370ff5db\"\n }\n },\n \"allowed\": \"CREDIT-AND-DEBIT\",\n \"client\": {\n \"id\": \"5949989f23dbf000229bdbaf\",\n \"name\": \"Test Platform\"\n },\n \"extra\": {\n \"other\": {},\n \"supp_id\": \"\"\n },\n \"info\": {\n \"account_num\": \"8902\",\n \"address\": \"PO BOX 85139, RICHMOND, VA, US\",\n \"balance\": {\n \"amount\": \"750.00\",\n \"currency\": \"USD\"\n },\n \"bank_long_name\": \"CAPITAL ONE N.A.\",\n \"bank_name\": \"CAPITAL ONE N.A.\",\n \"class\": \"SAVINGS\",\n \"match_info\": {\n \"email_match\": \"match\",\n \"name_match\": \"match\",\n \"phonenumber_match\": \"no_match\"\n },\n \"name_on_account\": \" \",\n \"nickname\": \"SynapsePay Test Savings Account - 8902\",\n \"routing_num\": \"6110\",\n \"type\": \"BUSINESS\"\n },\n \"is_active\": true,\n \"timeline\": [\n {\n \"date\": 1498000945638,\n \"note\": \"Node created.\"\n }\n ],\n \"type\": \"ACH-US\",\n \"user_id\": \"59499bc6838454002fd0c096\"\n },\n {\n ...\n }\n ],\n \"page_count\": 1,\n \"success\": true\n}", "language": "json", "name": "Response" } ] } [/block] From the response, you need to capture the `_id`. Now the user A's external account is ready for transfers. Both your user and their node is created. The next step is for you to create a Synapse node for user A. ##3. Create Synapse Account for User A In this step we will allow the user to create a `SUBACCOUNT-US` node with Synapse. [block:code] { "codes": [ { "code": "curl -X POST https://uat-api.synapsefi.com/v3.1/users/59499bc6838454002fd0c096/nodes -H 'content-type: application/json' -H 'postman-token: ac89cde7-239b-3f48-ab06-950253ae6722' -H 'x-sp-user: oauth_EdsiI8FOkKz1QaBGqHAxLl5Xjv4o7nCDThp0yUet|e83cf6ddcf778e37bfe3d48fc78a6502062fc1030449628c699ef3c4ffa6f9a2000b8acc3c4c0addd8013285bb52c89e5267b628ca02fa84a6d71fe186b7cd5d' -H 'x-sp-user-ip: 127.0.0.1' -d '{\n \"type\": \"SUBACCOUNT-US\",\n \"info\":{\n \"nickname\":\"My Account\"\n }\n}'", "language": "curl" }, { "code": "{\n \"error_code\": \"0\",\n \"http_code\": \"200\",\n \"limit\": 20,\n \"node_count\": 1,\n \"nodes\": [\n {\n \"_id\": \"5949b1334d1d62002e7af1dc\",\n \"_links\": {\n \"self\": {\n \"href\": \"https://uat-api.synapsefi.com/v3.1/users/59499bc6838454002fd0c096/nodes/5949b1334d1d62002e7af1dc\"\n }\n },\n \"allowed\": \"CREDIT-AND-DEBIT\",\n \"client\": {\n \"id\": \"5949989f23dbf000229bdbaf\",\n \"name\": \"Test Platform\"\n },\n \"extra\": {\n \"other\": {},\n \"supp_id\": \"\"\n },\n \"info\": {\n \"balance\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"name_on_account\": \" \",\n \"nickname\": \"My Account\"\n },\n \"is_active\": true,\n \"timeline\": [\n {\n \"date\": 1498001715653,\n \"note\": \"Node created.\"\n }\n ],\n \"type\": \"SUBACCOUNT-US\",\n \"user_id\": \"59499bc6838454002fd0c096\"\n }\n ],\n \"page_count\": 1,\n \"success\": true\n}", "language": "json", "name": "Response" } ] } [/block] From the response, you need to capture the `_id`. Now user A has both an external `ACH-US` node and `SUBACCOUNT-US` node attached to their user account. ##4. Repeat steps 1-3 for User B Create user, add KYC, link external account and create a `SUBACCOUNT-US` node for user B. ##5. Create Transaction 1 This transaction is to fund the `SUBACCOUNT-US` node by transferring money between user A's external `ACH-US` account to their Synapse account. [block:code] { "codes": [ { "code": "curl -X POST https://uat-api.synapsefi.com/v3.1/users/59499bc6838454002fd0c096/nodes/5949ae324d1d6200370ff5db/trans -H 'content-type: application/json' -H 'x-sp-user: oauth_qauIiw1lgmKCh6eXVvZWf2EB0PFzMAY4LUH7ybJp|e83cf6ddcf778e37bfe3d48fc78a6502062fc1030449628c699ef3c4ffa6f9a2000b8acc3c4c0addd8013285bb52c89e5267b628ca02fa84a6d71fe186b7cd5d' -H 'x-sp-user-ip: 127.0.0.1'\n -d '{\n \"to\": {\n \"type\": \"SUBACCOUNT-US\",\n \"id\": \"5949b1334d1d62002e7af1dc\"\n },\n \"amount\": {\n \"amount\": 200,\n \"currency\": \"USD\"\n },\n \"extra\": {\n \"ip\": \"192.168.0.1\",\n \"note\": \"ACH to Sub\"\n }\n}'", "language": "curl" }, { "code": "{\n \"_id\": \"594b0b497658de003076ae73\",\n \"_links\": {\n \"self\": {\n \"href\": \"https://uat-api.synapsefi.com/v3.1/users/59499bc6838454002fd0c096/nodes/5949ae324d1d6200370ff5db/trans/594b0b497658de003076ae73\"\n }\n },\n \"_v\": 2,\n \"amount\": {\n \"amount\": 200,\n \"currency\": \"USD\"\n },\n \"client\": {\n \"id\": \"5949989f23dbf000229bdbaf\",\n \"name\": \"Test Platform\"\n },\n \"extra\": {\n \"created_on\": 1498090313161,\n \"ip\": \"192.168.0.1\",\n \"latlon\": \"0,0\",\n \"note\": \"ACH to Sub\",\n \"process_on\": 1498090313161,\n \"supp_id\": \"1122444\"\n },\n \"fees\": [\n {\n \"fee\": 0,\n \"note\": \"Facilitator Fee\",\n \"to\": {\n \"id\": \"None\"\n }\n }\n ],\n \"from\": {\n \"id\": \"5949ae324d1d6200370ff5db\",\n \"nickname\": \"SynapsePay Test Savings Account - 8902\",\n \"type\": \"ACH-US\",\n \"user\": {\n \"_id\": \"59499bc6838454002fd0c096\",\n \"legal_names\": []\n }\n },\n \"recent_status\": {\n \"date\": 1498090313161,\n \"note\": \"Transaction Created.\",\n \"status\": \"CREATED\",\n \"status_id\": \"1\"\n },\n \"timeline\": [\n {\n \"date\": 1498090313161,\n \"note\": \"Transaction Created.\",\n \"status\": \"CREATED\",\n \"status_id\": \"1\"\n }\n ],\n \"to\": {\n \"id\": \"5949b1334d1d62002e7af1dc\",\n \"nickname\": \"\",\n \"type\": \"SUBACCOUNT-US\",\n \"user\": {\n \"_id\": \"\",\n \"legal_names\": []\n }\n }\n}", "language": "json", "name": "Response" } ] } [/block] Now user A is ready to send funds from their `SUBACCOUNT-US` node to user B's external `ACH-US` node. ##6. Create Transaction 2 User A `SUBACCOUNT-US` to User B `ACH-US` [block:code] { "codes": [ { "code": "curl -X POST https://uat-api.synapsefi.com/v3.1/users/59499bc6838454002fd0c096/nodes/5949b1334d1d62002e7af1dc/trans -H 'content-type: application/json' -H 'x-sp-user: oauth_qauIiw1lgmKCh6eXVvZWf2EB0PFzMAY4LUH7ybJp|e83cf6ddcf778e37bfe3d48fc78a6502062fc1030449628c699ef3c4ffa6f9a2000b8acc3c4c0addd8013285bb52c89e5267b628ca02fa84a6d71fe186b7cd5d' -H 'x-sp-user-ip: 127.0.0.1'\n -d '{\n \"to\": {\n \"type\": \"ACH-US\",\n \"id\": \"594ada104d1d620037a284c0\"\n },\n \"amount\": {\n \"amount\": 100,\n \"currency\": \"USD\"\n },\n \"extra\": {\n \"ip\": \"192.168.0.1\",\n \"note\": \"User A Sub to User B ACH\"\n }\n}'", "language": "curl" }, { "code": "{\n \"_id\": \"594b12b44599e8002efb3178\",\n \"_links\": {\n \"self\": {\n \"href\": \"https://uat-api.synapsefi.com/v3.1/users/59499bc6838454002fd0c096/nodes/5949b1334d1d62002e7af1dc/trans/594b12b44599e8002efb3178\"\n }\n },\n \"_v\": 2,\n \"amount\": {\n \"amount\": 100,\n \"currency\": \"USD\"\n },\n \"client\": {\n \"id\": \"5949989f23dbf000229bdbaf\",\n \"name\": \"Test Platform\"\n },\n \"extra\": {\n \"created_on\": 1498092212493,\n \"ip\": \"192.168.0.1\",\n \"latlon\": \"0,0\",\n \"note\": \"User A Sub to User B ACH\",\n \"process_on\": 1498092212493,\n \"supp_id\": \"1122444\"\n },\n \"fees\": [\n {\n \"fee\": 0,\n \"note\": \"Facilitator Fee\",\n \"to\": {\n \"id\": \"None\"\n }\n }\n ],\n \"from\": {\n \"id\": \"5949b1334d1d62002e7af1dc\",\n \"nickname\": \"My Savings Account\",\n \"type\": \"SUBACCOUNT-US\",\n \"user\": {\n \"_id\": \"59499bc6838454002fd0c096\",\n \"legal_names\": []\n }\n },\n \"recent_status\": {\n \"date\": 1498092212493,\n \"note\": \"Transaction Created.\",\n \"status\": \"CREATED\",\n \"status_id\": \"1\"\n },\n \"timeline\": [\n {\n \"date\": 1498092212493,\n \"note\": \"Transaction Created.\",\n \"status\": \"CREATED\",\n \"status_id\": \"1\"\n }\n ],\n \"to\": {\n \"id\": \"594ada104d1d620037a284c0\",\n \"nickname\": \"\",\n \"type\": \"ACH-US\",\n \"user\": {\n \"_id\": \"\",\n \"legal_names\": []\n }\n }\n}", "language": "json", "name": "Response" } ] } [/block] Now user B has received $100 in their external bank account. That's it! Now you have a basic P2P application working with Synapse. This is the bare bones version. If you have any questions, please [contact us](doc:contact-us) and we will be more than happy to assist.