{"_id":"5b9eea62607b190003a37681","project":"59f79e3c584eb200345ceafc","version":{"_id":"59f79e3c584eb200345ceaff","project":"59f79e3c584eb200345ceafc","__v":6,"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"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"3.1.0","version":"3.1"},"category":{"_id":"5b9ed89212362100036b5a1c","project":"59f79e3c584eb200345ceafc","version":"59f79e3c584eb200345ceaff","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2018-09-16T22:26:26.400Z","from_sync":false,"order":6,"slug":"loans","title":"Loans"},"user":"54e4044e8ef7552300409dcb","__v":22,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-09-16T23:42:26.242Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"method":"post","examples":{"codes":[]},"results":{"codes":[]},"settings":"","auth":"required","params":[{"_id":"5b9eea62607b190003a37683","ref":"","in":"body","required":false,"desc":"Supply `LOAN-US`","default":"","type":"string","name":"type"},{"_id":"5b9eea62607b190003a37682","ref":"","in":"body","required":false,"desc":"","default":"","type":"string","name":"info.nickname"}],"url":"/v3.1/users/:user_id/nodes"},"isReference":false,"order":1,"body":"Applying for a loan is a `POST` API call for the [Node Resources](doc:node-resources).\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /v3.1/users/5b9ee70e04707a0067a724d5/nodes HTTP/1.1\\nHost: uat-api.synapsefi.com\\nX-SP-USER-IP: 255.127.79.76\\nX-SP-USER: oauth_F0rsnYzBpfZkNh91aERc5d|e83cf6ddcf778e37bfe3d48fc78a6502062fc\\nContent-Type: application/json\\nCache-Control: no-cache\\n\\n{\\n  \\\"type\\\": \\\"LOAN-US\\\",\\n  \\\"info\\\": {\\n    \\\"nickname\\\":\\\"For a Tesla Model X\\\",\\n    \\\"credit_limit\\\":{\\n    \\t\\\"amount\\\":500.2,\\n    \\t\\\"currency\\\":\\\"USD\\\"\\n    },\\n    \\\"payment_node_id\\\":\\\"5bb4ea879a835600b57fb1c2\\\",\\n    \\\"disbursement_node_id\\\":\\\"5bb4ea879a835600b57fb1c2\\\",\\n    \\\"document_id\\\":\\\"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee68\\\",\\n    \\\"schedule\\\":\\\"MONTHLY\\\",\\n    \\\"next_payment\\\":30,\\n    \\\"installment_amount\\\":100.2\\n  },\\n  \\\"extra\\\":{\\n  \\t\\\"supp_id\\\":\\\"xx123c\\\"\\n  }\\n}\",\n      \"language\": \"http\"\n    },\n    {\n      \"code\": \"curl -X POST \\\\\\n  https://uat-api.synapsefi.com/v3.1/users/5b9ee70e04707a0067a724d5/nodes \\\\\\n  -H 'Cache-Control: no-cache' \\\\\\n  -H 'Content-Type: application/json' \\\\\\n  -H 'Postman-Token: 3b49cae6-15e4-4065-90c4-06324dbd7993' \\\\\\n  -H 'X-SP-USER: oauth_F0rsnYzBpfZkNh91a|e83cf6ddcf778e37bfe3d48fc78a6502062fc' \\\\\\n  -H 'X-SP-USER-IP: 255.127.79.76' \\\\\\n  -d '{\\n  \\\"type\\\": \\\"LOAN-US\\\",\\n  \\\"info\\\": {\\n    \\\"nickname\\\":\\\"For a Tesla Model X\\\",\\n    \\\"credit_limit\\\":{\\n    \\t\\\"amount\\\":500.2,\\n    \\t\\\"currency\\\":\\\"USD\\\"\\n    },\\n    \\\"payment_node_id\\\":\\\"5bb4ea879a835600b57fb1c2\\\",\\n    \\\"disbursement_node_id\\\":\\\"5bb4ea879a835600b57fb1c2\\\",\\n    \\\"document_id\\\":\\\"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee68\\\",\\n    \\\"schedule\\\":\\\"MONTHLY\\\",\\n    \\\"next_payment\\\":30,\\n    \\\"installment_amount\\\":100.2\\n  },\\n  \\\"extra\\\":{\\n  \\t\\\"supp_id\\\":\\\"xx123c\\\"\\n  }\\n}'\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\nResponses:\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\\\": \\\"5b9ee73fc54d7b005984ae84\\\",\\n            \\\"_links\\\": {\\n                \\\"self\\\": {\\n                    \\\"href\\\": \\\"https://qa-api.synapsefi.com/v3.1/users/5b9ee70e04707a0067a724d5/nodes/5b9ee73fc54d7b005984ae84\\\"\\n                }\\n            },\\n            \\\"allowed\\\": \\\"CREDIT\\\",\\n            \\\"client\\\": {\\n                \\\"id\\\": \\\"589acd9ecb3cd400fa75ac06\\\",\\n                \\\"name\\\": \\\"SynapseFI\\\"\\n            },\\n            \\\"extra\\\": {\\n                \\\"note\\\": null,\\n                \\\"other\\\": {},\\n                \\\"supp_id\\\": \\\"\\\"\\n            },\\n            \\\"info\\\": {\\n                \\\"agreements\\\": [\\n                    {\\n                        \\\"type\\\": \\\"LOAN_AGREEMENT\\\",\\n                        \\\"url\\\": \\\"todo\\\"\\n                    }\\n                ],\\n                \\\"balance\\\": {\\n                    \\\"amount\\\": 0,\\n                    \\\"currency\\\": \\\"USD\\\"\\n                },\\n                \\\"credit_limit\\\": {\\n                    \\\"amount\\\": 500,\\n                    \\\"currency\\\": \\\"USD\\\"\\n                },\\n                \\\"disbursement_node_id\\\": \\\"5b9ee73420b3aa006311c472\\\",\\n                \\\"document_id\\\": \\\"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee68\\\",\\n                \\\"interest\\\": {\\n                    \\\"accrued\\\": 0,\\n                    \\\"apr\\\": 30,\\n                    \\\"cap\\\": 200\\n                },\\n                \\\"name_on_account\\\": \\\" \\\",\\n                \\\"next_payment\\\": 1539732543180,\\n                \\\"nickname\\\": \\\"For a Tesla Model X\\\",\\n                \\\"payment_node_id\\\": \\\"5b9ee73420b3aa006311c472\\\",\\n                \\\"schedule\\\": \\\"MONTHLY\\\",\\n              \\t\\\"installment_amount\\\":20.10\\n            },\\n            \\\"is_active\\\": true,\\n            \\\"timeline\\\": [\\n                {\\n                    \\\"date\\\": 1537140542848,\\n                    \\\"note\\\": \\\"Node created.\\\"\\n                }\\n            ],\\n            \\\"type\\\": \\\"LOAN-US\\\",\\n            \\\"user_id\\\": \\\"5b9ee70e04707a0067a724d5\\\"\\n        }\\n    ],\\n    \\\"page_count\\\": 1,\\n    \\\"success\\\": true\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Approved\"\n    },\n    {\n      \"code\": \"{\\n    \\\"error_code\\\": \\\"0\\\",\\n    \\\"http_code\\\": \\\"200\\\",\\n    \\\"limit\\\": 20,\\n    \\\"node_count\\\": 1,\\n    \\\"nodes\\\": [\\n        {\\n            \\\"_id\\\": \\\"5b9eeac2c54d7b005a84ae84\\\",\\n            \\\"_links\\\": {\\n                \\\"self\\\": {\\n                    \\\"href\\\": \\\"https://qa-api.synapsefi.com/v3.1/users/5b9ee70e04707a0067a724d5/nodes/5b9eeac2c54d7b005a84ae84\\\"\\n                }\\n            },\\n            \\\"allowed\\\": \\\"REJECTED\\\",\\n            \\\"client\\\": {\\n                \\\"id\\\": \\\"589acd9ecb3cd400fa75ac06\\\",\\n                \\\"name\\\": \\\"SynapseFI\\\"\\n            },\\n            \\\"extra\\\": {\\n                \\\"note\\\": \\\"Loan rejected because you are over the limit of loans we currently allow. The limit is 3\\\",\\n                \\\"other\\\": {},\\n                \\\"supp_id\\\": \\\"\\\"\\n            },\\n            \\\"info\\\": {\\n                \\\"agreements\\\": [\\n                    {\\n                        \\\"type\\\": \\\"ADVERSE_ACTION\\\",\\n                        \\\"url\\\": \\\"todo\\\"\\n                    }\\n                ],\\n                \\\"balance\\\": {\\n                    \\\"amount\\\": 0,\\n                    \\\"currency\\\": \\\"USD\\\"\\n                },\\n                \\\"credit_limit\\\": {\\n                    \\\"amount\\\": 0,\\n                    \\\"currency\\\": \\\"USD\\\"\\n                },\\n                \\\"disbursement_node_id\\\": \\\"5b9ee73420b3aa006311c472\\\",\\n                \\\"document_id\\\": \\\"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8\\\",\\n                \\\"interest\\\": {\\n                    \\\"accrued\\\": 0,\\n                    \\\"apr\\\": 0,\\n                    \\\"cap\\\": 0\\n                },\\n                \\\"name_on_account\\\": \\\" \\\",\\n                \\\"next_payment\\\": null,\\n                \\\"nickname\\\": \\\"For a Tesla Model X\\\",\\n                \\\"payment_node_id\\\": \\\"5b9ee73420b3aa006311c472\\\",\\n                \\\"schedule\\\": \\\"MONTHLY\\\",\\n              \\t\\\"installment_amount\\\":0\\n            },\\n            \\\"is_active\\\": true,\\n            \\\"timeline\\\": [\\n                {\\n                    \\\"date\\\": 1537141442471,\\n                    \\\"note\\\": \\\"Node created.\\\"\\n                }\\n            ],\\n            \\\"type\\\": \\\"LOAN-US\\\",\\n            \\\"user_id\\\": \\\"5b9ee70e04707a0067a724d5\\\"\\n        }\\n    ],\\n    \\\"page_count\\\": 1,\\n    \\\"success\\\": true\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Rejected\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Variable APRs\"\n}\n[/block]\nYou can also specify the APR when you create a loan object. Any APR below what has been approved by us will work as a valid input. All you would need to do is add `info.interest.apr` in %.\n\nExample:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /v3.1/users/5b9ee70e04707a0067a724d5/nodes HTTP/1.1\\nHost: uat-api.synapsefi.com\\nX-SP-USER-IP: 255.127.79.76\\nX-SP-USER: oauth_F0rsnYzBpfZkNh91aERc5d|e83cf6ddcf778e37bfe3d48fc78a6502062fc\\nContent-Type: application/json\\nCache-Control: no-cache\\n\\n{\\n  \\\"type\\\": \\\"LOAN-US\\\",\\n  \\\"info\\\": {\\n    \\\"nickname\\\":\\\"For a Tesla Model X\\\",\\n    \\\"credit_limit\\\":{\\n    \\t\\\"amount\\\":500.2,\\n    \\t\\\"currency\\\":\\\"USD\\\"\\n    },\\n    \\\"interest\\\": {\\n    \\t\\\"apr\\\": 10\\n    },\\n    \\\"payment_node_id\\\":\\\"5bb4ea879a835600b57fb1c2\\\",\\n    \\\"disbursement_node_id\\\":\\\"5bb4ea879a835600b57fb1c2\\\",\\n    \\\"document_id\\\":\\\"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee68\\\",\\n    \\\"schedule\\\":\\\"MONTHLY\\\",\\n    \\\"next_payment\\\":30,\\n    \\\"installment_amount\\\":100.2\\n  },\\n  \\\"extra\\\":{\\n  \\t\\\"supp_id\\\":\\\"xx123c\\\"\\n  }\\n}\",\n      \"language\": \"http\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Revolving Line vs One-time\"\n}\n[/block]\nCurrently this configuration is on our side instead of at the API level. That gives us better control over what loan programs you are approved for. So at the API level, creating one of the other type of loan looks the same, only following things will change:\n\n1. `allowed` -- In case of one-time loan, allowed is set to `CREDIT` because you cannot draw from this line again, all you can do is pay back the loan. While in case of a revolving line the allowed will be `CREDIT-AND-DEBIT`. So in that case the end user will be able to pull funds from the loan account up to the  `credit_limit.amount`. To be able to draw against the line, all you would need to do is [Create a Transaction](doc:create-transaction) from the loan node to the destination node.\n\n2. In case of revolving line, we will not automatically create the loan disbursement, you would need to [Create a Transaction] to draw against the approved line. \n\n3. Since in case of a revolving line we do not send out the disbursements, there is no need to supply a value to `disbursement_node_id`.\n\nCurrently everything else is exactly the same.\n[block:api-header]\n{\n  \"title\": \"Installment amount and Number of payments\"\n}\n[/block]\nYou only need to supply either `installment_amount` or `num_payments`. We calculate one from the other. The idea being you can either create an experience where the end user either picks the amount they wish to pay in each installment or pick the timeframe of the loan.","excerpt":"","slug":"apply-for-a-loan","type":"basic","title":"Apply for a loan"}
Applying for a loan is a `POST` API call for the [Node Resources](doc:node-resources). [block:code] { "codes": [ { "code": "POST /v3.1/users/5b9ee70e04707a0067a724d5/nodes HTTP/1.1\nHost: uat-api.synapsefi.com\nX-SP-USER-IP: 255.127.79.76\nX-SP-USER: oauth_F0rsnYzBpfZkNh91aERc5d|e83cf6ddcf778e37bfe3d48fc78a6502062fc\nContent-Type: application/json\nCache-Control: no-cache\n\n{\n \"type\": \"LOAN-US\",\n \"info\": {\n \"nickname\":\"For a Tesla Model X\",\n \"credit_limit\":{\n \t\"amount\":500.2,\n \t\"currency\":\"USD\"\n },\n \"payment_node_id\":\"5bb4ea879a835600b57fb1c2\",\n \"disbursement_node_id\":\"5bb4ea879a835600b57fb1c2\",\n \"document_id\":\"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee68\",\n \"schedule\":\"MONTHLY\",\n \"next_payment\":30,\n \"installment_amount\":100.2\n },\n \"extra\":{\n \t\"supp_id\":\"xx123c\"\n }\n}", "language": "http" }, { "code": "curl -X POST \\\n https://uat-api.synapsefi.com/v3.1/users/5b9ee70e04707a0067a724d5/nodes \\\n -H 'Cache-Control: no-cache' \\\n -H 'Content-Type: application/json' \\\n -H 'Postman-Token: 3b49cae6-15e4-4065-90c4-06324dbd7993' \\\n -H 'X-SP-USER: oauth_F0rsnYzBpfZkNh91a|e83cf6ddcf778e37bfe3d48fc78a6502062fc' \\\n -H 'X-SP-USER-IP: 255.127.79.76' \\\n -d '{\n \"type\": \"LOAN-US\",\n \"info\": {\n \"nickname\":\"For a Tesla Model X\",\n \"credit_limit\":{\n \t\"amount\":500.2,\n \t\"currency\":\"USD\"\n },\n \"payment_node_id\":\"5bb4ea879a835600b57fb1c2\",\n \"disbursement_node_id\":\"5bb4ea879a835600b57fb1c2\",\n \"document_id\":\"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee68\",\n \"schedule\":\"MONTHLY\",\n \"next_payment\":30,\n \"installment_amount\":100.2\n },\n \"extra\":{\n \t\"supp_id\":\"xx123c\"\n }\n}'", "language": "curl" } ] } [/block] Responses: [block:code] { "codes": [ { "code": "{\n \"error_code\": \"0\",\n \"http_code\": \"200\",\n \"limit\": 20,\n \"node_count\": 1,\n \"nodes\": [\n {\n \"_id\": \"5b9ee73fc54d7b005984ae84\",\n \"_links\": {\n \"self\": {\n \"href\": \"https://qa-api.synapsefi.com/v3.1/users/5b9ee70e04707a0067a724d5/nodes/5b9ee73fc54d7b005984ae84\"\n }\n },\n \"allowed\": \"CREDIT\",\n \"client\": {\n \"id\": \"589acd9ecb3cd400fa75ac06\",\n \"name\": \"SynapseFI\"\n },\n \"extra\": {\n \"note\": null,\n \"other\": {},\n \"supp_id\": \"\"\n },\n \"info\": {\n \"agreements\": [\n {\n \"type\": \"LOAN_AGREEMENT\",\n \"url\": \"todo\"\n }\n ],\n \"balance\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"credit_limit\": {\n \"amount\": 500,\n \"currency\": \"USD\"\n },\n \"disbursement_node_id\": \"5b9ee73420b3aa006311c472\",\n \"document_id\": \"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee68\",\n \"interest\": {\n \"accrued\": 0,\n \"apr\": 30,\n \"cap\": 200\n },\n \"name_on_account\": \" \",\n \"next_payment\": 1539732543180,\n \"nickname\": \"For a Tesla Model X\",\n \"payment_node_id\": \"5b9ee73420b3aa006311c472\",\n \"schedule\": \"MONTHLY\",\n \t\"installment_amount\":20.10\n },\n \"is_active\": true,\n \"timeline\": [\n {\n \"date\": 1537140542848,\n \"note\": \"Node created.\"\n }\n ],\n \"type\": \"LOAN-US\",\n \"user_id\": \"5b9ee70e04707a0067a724d5\"\n }\n ],\n \"page_count\": 1,\n \"success\": true\n}", "language": "json", "name": "Approved" }, { "code": "{\n \"error_code\": \"0\",\n \"http_code\": \"200\",\n \"limit\": 20,\n \"node_count\": 1,\n \"nodes\": [\n {\n \"_id\": \"5b9eeac2c54d7b005a84ae84\",\n \"_links\": {\n \"self\": {\n \"href\": \"https://qa-api.synapsefi.com/v3.1/users/5b9ee70e04707a0067a724d5/nodes/5b9eeac2c54d7b005a84ae84\"\n }\n },\n \"allowed\": \"REJECTED\",\n \"client\": {\n \"id\": \"589acd9ecb3cd400fa75ac06\",\n \"name\": \"SynapseFI\"\n },\n \"extra\": {\n \"note\": \"Loan rejected because you are over the limit of loans we currently allow. The limit is 3\",\n \"other\": {},\n \"supp_id\": \"\"\n },\n \"info\": {\n \"agreements\": [\n {\n \"type\": \"ADVERSE_ACTION\",\n \"url\": \"todo\"\n }\n ],\n \"balance\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"credit_limit\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"disbursement_node_id\": \"5b9ee73420b3aa006311c472\",\n \"document_id\": \"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8\",\n \"interest\": {\n \"accrued\": 0,\n \"apr\": 0,\n \"cap\": 0\n },\n \"name_on_account\": \" \",\n \"next_payment\": null,\n \"nickname\": \"For a Tesla Model X\",\n \"payment_node_id\": \"5b9ee73420b3aa006311c472\",\n \"schedule\": \"MONTHLY\",\n \t\"installment_amount\":0\n },\n \"is_active\": true,\n \"timeline\": [\n {\n \"date\": 1537141442471,\n \"note\": \"Node created.\"\n }\n ],\n \"type\": \"LOAN-US\",\n \"user_id\": \"5b9ee70e04707a0067a724d5\"\n }\n ],\n \"page_count\": 1,\n \"success\": true\n}", "language": "json", "name": "Rejected" } ] } [/block] [block:api-header] { "title": "Variable APRs" } [/block] You can also specify the APR when you create a loan object. Any APR below what has been approved by us will work as a valid input. All you would need to do is add `info.interest.apr` in %. Example: [block:code] { "codes": [ { "code": "POST /v3.1/users/5b9ee70e04707a0067a724d5/nodes HTTP/1.1\nHost: uat-api.synapsefi.com\nX-SP-USER-IP: 255.127.79.76\nX-SP-USER: oauth_F0rsnYzBpfZkNh91aERc5d|e83cf6ddcf778e37bfe3d48fc78a6502062fc\nContent-Type: application/json\nCache-Control: no-cache\n\n{\n \"type\": \"LOAN-US\",\n \"info\": {\n \"nickname\":\"For a Tesla Model X\",\n \"credit_limit\":{\n \t\"amount\":500.2,\n \t\"currency\":\"USD\"\n },\n \"interest\": {\n \t\"apr\": 10\n },\n \"payment_node_id\":\"5bb4ea879a835600b57fb1c2\",\n \"disbursement_node_id\":\"5bb4ea879a835600b57fb1c2\",\n \"document_id\":\"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee68\",\n \"schedule\":\"MONTHLY\",\n \"next_payment\":30,\n \"installment_amount\":100.2\n },\n \"extra\":{\n \t\"supp_id\":\"xx123c\"\n }\n}", "language": "http" } ] } [/block] [block:api-header] { "title": "Revolving Line vs One-time" } [/block] Currently this configuration is on our side instead of at the API level. That gives us better control over what loan programs you are approved for. So at the API level, creating one of the other type of loan looks the same, only following things will change: 1. `allowed` -- In case of one-time loan, allowed is set to `CREDIT` because you cannot draw from this line again, all you can do is pay back the loan. While in case of a revolving line the allowed will be `CREDIT-AND-DEBIT`. So in that case the end user will be able to pull funds from the loan account up to the `credit_limit.amount`. To be able to draw against the line, all you would need to do is [Create a Transaction](doc:create-transaction) from the loan node to the destination node. 2. In case of revolving line, we will not automatically create the loan disbursement, you would need to [Create a Transaction] to draw against the approved line. 3. Since in case of a revolving line we do not send out the disbursements, there is no need to supply a value to `disbursement_node_id`. Currently everything else is exactly the same. [block:api-header] { "title": "Installment amount and Number of payments" } [/block] You only need to supply either `installment_amount` or `num_payments`. We calculate one from the other. The idea being you can either create an experience where the end user either picks the amount they wish to pay in each installment or pick the timeframe of the loan.