{"_id":"5b9ed95d12362100036b5a1d","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":"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":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-09-16T22:29:49.352Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"With our Loans product, developers can issue and service short-term unsecured loans. We've built the loans product on top of our [Nodes](doc:nodes) platform. So a loan is treated as a regular account with a negative balance.\n\nThis approach allows us to build a product that works for both one-time loans and also for a revolving line of credit. In the future, we will enable issuing a card number on top of these loan accounts, which would essentially turn these accounts into credit cards.\n\nThis product is currently only available on sandbox, and is in beta. Following are still todos on our side that we will be finishing in next few days:\n\n* **Repayment Transactions:** Everyday we will check if a payment is due, if it is, we will create a repayment transaction for the user.\n* **Interest accrual logic: ** Currently daily interest accrual is disabled on sandbox.\n* **Credit Checks: ** Some developers wish to issue loans based on a credit box, currently we do not have this feature enabled on sandbox.\n* **Payment due message alerts: ** Text message alerts for repayments are disabled. But when we will enable the repayment logic, this will be a part of that release as well.\n* **Email for agreements and decisioning: ** This will come with the PDF generation release.\n* **Closing Account:** With the above releases, we will also add a feature to let you close loan accounts for users.\n[block:api-header]\n{\n  \"title\": \"Types of Loans\"\n}\n[/block]\nWith Synapse you can issue two types of loans:\n\n1. ** One-time loan:** These loans are disbursed to use at the time of origination. Once the user pays the loan, the loan account is closed. A good example of this is [Affirm](https://www.affirm.com). With Affirm, consumers get a loan at the point of sale and then over the course of next few months, they pay off the loan.\n2. **Revolving line of credit:** This is like a credit card. Consumers get approved for a line they can draw against and as they pay off the line, they can draw more. This is what [Final](https://getfinal.com) was trying to do.\n\nBoth loans are considered [unsecured loans](https://www.thebalance.com/unsecured-loans-definition-and-explanation-315638), because they are not backed by anything.\n[block:api-header]\n{\n  \"title\": \"Who is the lender?\"\n}\n[/block]\nOur partner banks are the lenders. You are the guarantor of the loans. Which means if the end customer is unable to pay the loan, you will make the payments on their behalf.\n\nWith this model, you do not have to register as the lender, but you will still need to have the balance sheet to absorb any losses. When we set up your program on production, we will underwrite you and set a limit on how many loans your platform is allowed to underwrite at any given time.\n[block:api-header]\n{\n  \"title\": \"Interest On One-Time Loan\"\n}\n[/block]\nWe accrue interest daily. We will look at the balance of the loan account and based on the APR accrue interest.\n\nHowever, we do cap the APR. What that means is, for example, if an end user is approved for a $100 loan with an APR of 10% and cap of $40 dollars, then the interest will only accrue up to $40, not more.\n\nWe also do not charge end users for late payments. The APR is the only fee they have to worry about.\n[block:api-header]\n{\n  \"title\": \"Interest On Revolving Credit Loan\"\n}\n[/block]\n**Statements cycle**: always first day to the last day of each month (the statements will correspond to regular months).\n**Statements delivery**: no later than the 10th of each month.\n**Payment date**: 20th (no interest if paid on this date).\n**Interest accrual**: if not paid on the 20th of the month following the cycle, than the interests go back to the day of expenditure/credit use.\n**Payments distribution**: Partial or late payments shall offset the first expense made (in the timeline) and the interests accrued proportionally (ex.: if there is one 50 dollar payment plus $5 in interest ($55) and the user paid 11, then we will apply 10 for principal and 1 for interest, and the balance will be 40 principal and 4 interest). \n\nJust like for One-Time Loan, we cap APR on Revolving Credit Loans as well. \n\nWhat that means is, for example, if an end user has a balance of $100 loan with an APR of 10% and cap of $40 dollars, then the interest will only accrue up to $40, not more.\n\nWe also do not charge end users for late payments. The APR is the only fee they have to worry about.\n[block:api-header]\n{\n  \"title\": \"Things you can customize\"\n}\n[/block]\nFollowing things can be customized when we set up your program:\n\n* **Type of Loan:** You get to pick if you wish to provide a revolving line program or one-time loan program.\n* **Notifications:** You will be able to choose if we will send the notices and notifications to the user or you will.\n* **Repayment:** The model is by default set up to auto debt user accounts for repayment. But we can set up the program in a way where the user can push payments to the loan account instead of us debiting the funds.\n* **APR:** You get to decide the APR, but it does require our approval.\n* ** Decisioning:** You get to decide the decisioning logic, but it does require our approval.\n* ** Number of loans: ** You can decide how many loans a user is allowed to apply for at any given time.\n* **Max loan amount: ** Maximum amount per loan.\n[block:api-header]\n{\n  \"title\": \"Loan rejection reasons\"\n}\n[/block]\nFollowing are the reasons we would reject a loan:\n\n1. Loan rejected because KYC is not finished.\n2. Loan rejected because currently, we do not issue loans for your user type.\n3. Loan rejected because the loan amount is higher than what we currently allow. The limit is *your_limit*.\n4. Loan rejected because you are over the limit of loans we currently allow. The limit is *your_limit*.\n5. Loan rejected because your credit score is low. Your credit needs to be over *your_limit*.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Data Structure For One-Time Loan\"\n}\n[/block]\nFollowing are the relevant fields that you will get back in a JSON response:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"_id\\\": \\\"ID of the loan account\\\",\\n    \\\"allowed\\\": \\\"permisisons granted to the loan account\\\",\\n    \\\"extra\\\": {\\n        \\\"note\\\": \\\"If the loan was rejected, the reason will be written here in plaintext. All reasons for rejecting a loan are listed below.\\\",\\n      \\t\\\"supp_id\\\": \\\"Reference ID for the loan. We recomment supplying this ID when creating the loan, we put this in the PDF of the loan aggrement has the refrence number for the end user\\\"\\n    },\\n    \\\"info\\\": {\\n        \\\"agreements\\\": [\\n            {\\n                \\\"type\\\": \\\"Type of agreement. All types are listed below.\\\",\\n                \\\"url\\\": \\\"URL of the agreement\\\"\\n            }\\n        ],\\n        \\\"balance\\\": {\\n            \\\"amount\\\": 0,\\t//balance on the loan account. This will usually be -ve. If 0, then it means the loan has been paid off.\\n            \\\"currency\\\": \\\"USD\\\"\\n        },\\n        \\\"credit_limit\\\": {\\n            \\\"amount\\\": 0,\\t//this will denote the limit of how much money can be borrowed out of this loan account.\\n            \\\"currency\\\": \\\"USD\\\"\\n        },\\n        \\\"disbursement_node_id\\\": \\\"where the funds will be disbursed to. This node ID can either belong to the end user or can also be your own Synapse account if you are disbursing the funds by some other means.\\\",\\n        \\\"document_id\\\": \\\"KYC document ID of the user. The email and phone number associated with this document will be used to send notifications to the user.\\\",\\n      \\t\\\"installment_amount\\\": \\\"amount for each payment installment.\\\",\\n        \\\"interest\\\": {\\n            \\\"accrued\\\": 0,\\t//how much interest has accrued so far on the loan. In USD.\\n            \\\"apr\\\": 0,\\t//APR on the loan. In percentage\\n            \\\"cap\\\": 0\\t//Max interest that will be charged on the loan. In USD.\\n        },\\n        \\\"next_payment\\\": \\\"When the next payment is due. In unixtime (milliseconds)\\\",\\n        \\\"nickname\\\": \\\"We recommend putting the loan purpose here.\\\",\\n      \\t\\\"num_payments\\\": \\\"number of payments in the loan term\\\",\\n        \\\"payment_node_id\\\": \\\"Where we will collect payments from. We recommend keeping this account the same as disbursement_node_id. This can be the node of the end user or yours. Use yours if you wish to collect installemnts thorough a thirdparty.\\\",\\n        \\\"schedule\\\": \\\"Payment schedule. All schedules are listed below\\\",\\n      \\t\\\"loan_type\\\":\\\"ONE-TIME\\\"\\n    },\\n    \\\"type\\\": \\\"LOAN-US\\\",\\n    \\\"user_id\\\": \\\"ID of the user\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n## Data Type of Elements\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Element\",\n    \"h-1\": \"Data Type\",\n    \"0-0\": \"_id\",\n    \"0-1\": \"String, of type [ObjectId](https://docs.mongodb.com/manual/reference/method/ObjectId/)\",\n    \"1-0\": \"allowed\",\n    \"1-1\": \"String\",\n    \"2-0\": \"extra.note\",\n    \"2-1\": \"String\",\n    \"3-0\": \"info.agreements\",\n    \"3-1\": \"List/Array\",\n    \"4-0\": \"info.agreements.type\",\n    \"4-1\": \"String\",\n    \"5-0\": \"info.agreements.url\",\n    \"5-1\": \"String\",\n    \"6-0\": \"info.balance.amount\",\n    \"6-1\": \"Float\",\n    \"7-0\": \"info.balance.currency\",\n    \"7-1\": \"String\",\n    \"8-0\": \"info.credit_limit.amount\",\n    \"8-1\": \"Float\",\n    \"9-0\": \"info.credit_limit.currency\",\n    \"9-1\": \"String\",\n    \"10-0\": \"info.disbursement_node_id\",\n    \"10-1\": \"String, of type [ObjectId](https://docs.mongodb.com/manual/reference/method/ObjectId/)\",\n    \"11-0\": \"info.document_id\",\n    \"11-1\": \"String, derived hash\",\n    \"13-0\": \"info.interest.accured\",\n    \"13-1\": \"Float\",\n    \"14-0\": \"info.interest.apr\",\n    \"14-1\": \"Float\",\n    \"15-0\": \"info.interest.cap\",\n    \"15-1\": \"Float\",\n    \"16-0\": \"info.next_payment\",\n    \"16-1\": \"Long\",\n    \"17-0\": \"info.nickname\",\n    \"17-1\": \"String\",\n    \"19-0\": \"info.payment_node_id\",\n    \"19-1\": \"String, of type [ObjectId](https://docs.mongodb.com/manual/reference/method/ObjectId/)\",\n    \"20-0\": \"info.schedule\",\n    \"20-1\": \"String\",\n    \"22-0\": \"type\",\n    \"22-1\": \"String\",\n    \"23-0\": \"user_id\",\n    \"23-1\": \"String, of type [ObjectId](https://docs.mongodb.com/manual/reference/method/ObjectId/)\",\n    \"12-0\": \"info.installment_amount\",\n    \"12-1\": \"Float\",\n    \"18-0\": \"info.num_payments\",\n    \"18-1\": \"Integer\",\n    \"21-0\": \"info.loan_type\",\n    \"21-1\": \"String\"\n  },\n  \"cols\": 2,\n  \"rows\": 24\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Data Structure For Revolving Credit Loan\"\n}\n[/block]\nFollowing are the relevant fields that you will get back in a JSON response:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"_id\\\": \\\"ID of the loan account\\\",\\n    \\\"allowed\\\": \\\"permisisons granted to the loan account\\\",\\n    \\\"extra\\\": {\\n        \\\"note\\\": \\\"If the loan was rejected, the reason will be written here in plaintext. All reasons for rejecting a loan are listed below.\\\",\\n      \\t\\\"supp_id\\\": \\\"Reference ID for the loan. We recomment supplying this ID when creating the loan, we put this in the PDF of the loan aggrement has the refrence number for the end user\\\"\\n    },\\n    \\\"info\\\": {\\n        \\\"agreements\\\": [\\n            {\\n                \\\"type\\\": \\\"Type of agreement. All types are listed below.\\\",\\n                \\\"url\\\": \\\"URL of the agreement\\\"\\n            }\\n        ],\\n        \\\"balance\\\": {\\n            \\\"amount\\\": 0,\\t//balance on the loan account. This will usually be -ve. If 0, then it means the loan has been paid off.\\n            \\\"currency\\\": \\\"USD\\\"\\n        },\\n        \\\"credit_limit\\\": {\\n            \\\"amount\\\": 0,\\t//this will denote the limit of how much money can be borrowed out of this loan account.\\n            \\\"currency\\\": \\\"USD\\\"\\n        },\\n        \\\"document_id\\\": \\\"KYC document ID of the user. The email and phone number associated with this document will be used to send notifications to the user.\\\",\\n        \\\"interest\\\": {\\n            \\\"accrued\\\": 0,\\t//how much interest has accrued so far on the loan. In USD.\\n            \\\"apr\\\": 0,\\t//APR on the loan. In percentage\\n            \\\"cap\\\": 0\\t//Max interest that will be charged on the loan. In USD.\\n        },\\n        \\\"next_payment\\\": \\\"When the next payment is due. In unixtime (milliseconds)\\\",\\n        \\\"nickname\\\": \\\"We recommend putting the loan purpose here.\\\",\\n      \\t\\\"loan_type\\\":\\\"REVOLVING\\\"\\n    },\\n    \\\"type\\\": \\\"LOAN-US\\\",\\n    \\\"user_id\\\": \\\"ID of the user\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n## Data Type of Elements\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Element\",\n    \"h-1\": \"Data Type\",\n    \"0-0\": \"_id\",\n    \"1-0\": \"allowed\",\n    \"2-0\": \"extra.note\",\n    \"3-0\": \"info.agreements\",\n    \"4-0\": \"info.agreements.type\",\n    \"5-0\": \"info.agreements.url\",\n    \"6-0\": \"info.balance.amount\",\n    \"7-0\": \"info.balance.currency\",\n    \"8-0\": \"info.credit_limit.amount\",\n    \"9-0\": \"info.credit_limit.currency\",\n    \"10-0\": \"info.document_id\",\n    \"11-0\": \"info.interest.accured\",\n    \"12-0\": \"info.interest.apr\",\n    \"13-0\": \"info.interest.cap\",\n    \"14-0\": \"info.nickname\",\n    \"15-0\": \"info.schedule\",\n    \"16-0\": \"info.loan_type\",\n    \"17-0\": \"type\",\n    \"18-0\": \"user_id\",\n    \"0-1\": \"String, of type [ObjectId](https://docs.mongodb.com/manual/reference/method/ObjectId/)\",\n    \"1-1\": \"String\",\n    \"2-1\": \"String\",\n    \"3-1\": \"List/Array\",\n    \"4-1\": \"String\",\n    \"5-1\": \"String\",\n    \"6-1\": \"Float\",\n    \"7-1\": \"String\",\n    \"8-1\": \"Float\",\n    \"9-1\": \"String\",\n    \"10-1\": \"Float\",\n    \"11-1\": \"Float\",\n    \"12-1\": \"Float\",\n    \"13-1\": \"Float\",\n    \"14-1\": \"String\",\n    \"15-1\": \"String\",\n    \"16-1\": \"String\",\n    \"17-1\": \"String\",\n    \"18-1\": \"String, of type [ObjectId](https://docs.mongodb.com/manual/reference/method/ObjectId/)\"\n  },\n  \"cols\": 2,\n  \"rows\": 19\n}\n[/block]\n## Allowed Status\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Allowed\",\n    \"h-1\": \"Notes\",\n    \"0-0\": \"`CREDIT`\",\n    \"0-1\": \"This `allowed` type will be used for one time loans. Which means you can pay back the loan, but you cannot withdraw funds from the loan account again.\",\n    \"1-0\": \"`CREDIT-AND-DEBIT`\",\n    \"1-1\": \"This `allowed` type will be used for a revolving line. Which means you can pay back the loan and also draw funds out of the account.\",\n    \"2-0\": \"`REJECTED`\",\n    \"2-1\": \"When the loan gets rejected, a loan account will be created but with `allowed` as `REJECTED`. The loan account will have details of rejection in the `extra.notes` section and also the adverse action letter under `info.agreements`.\",\n    \"3-0\": \"`LOCKED`\",\n    \"4-0\": \"`INACTIVE`\",\n    \"4-1\": \"In case of one time loan, once the loan is paid off, the node will be set to `INACTIVE.`\",\n    \"3-1\": \"In case of a revolving line, when a loan account is closed, it will be marked as `LOCKED`.\"\n  },\n  \"cols\": 2,\n  \"rows\": 5\n}\n[/block]\n## Agreement Types\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Agreement Types\",\n    \"0-0\": \"`ADVERSE_ACTION`\",\n    \"1-0\": \"`LOAN_AGREEMENT`\",\n    \"h-1\": \"Notes\",\n    \"0-1\": \"If a loan is rejected, an adverse action letter will be issued and that will be under the `info.agreements` object.\",\n    \"1-1\": \"If a loan is approved, the approved loan \\n with all the loan details agreement will be under `info.agreements` object.\"\n  },\n  \"cols\": 2,\n  \"rows\": 2\n}\n[/block]\n## Repayment Schedules\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Schedules\",\n    \"h-1\": \"Notes\",\n    \"0-0\": \"`MONTHLY`\",\n    \"0-1\": \"Monthly loan repayment\"\n  },\n  \"cols\": 2,\n  \"rows\": 1\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`.","excerpt":"","slug":"intro-to-loans","type":"basic","title":"Intro to Loans"}
With our Loans product, developers can issue and service short-term unsecured loans. We've built the loans product on top of our [Nodes](doc:nodes) platform. So a loan is treated as a regular account with a negative balance. This approach allows us to build a product that works for both one-time loans and also for a revolving line of credit. In the future, we will enable issuing a card number on top of these loan accounts, which would essentially turn these accounts into credit cards. This product is currently only available on sandbox, and is in beta. Following are still todos on our side that we will be finishing in next few days: * **Repayment Transactions:** Everyday we will check if a payment is due, if it is, we will create a repayment transaction for the user. * **Interest accrual logic: ** Currently daily interest accrual is disabled on sandbox. * **Credit Checks: ** Some developers wish to issue loans based on a credit box, currently we do not have this feature enabled on sandbox. * **Payment due message alerts: ** Text message alerts for repayments are disabled. But when we will enable the repayment logic, this will be a part of that release as well. * **Email for agreements and decisioning: ** This will come with the PDF generation release. * **Closing Account:** With the above releases, we will also add a feature to let you close loan accounts for users. [block:api-header] { "title": "Types of Loans" } [/block] With Synapse you can issue two types of loans: 1. ** One-time loan:** These loans are disbursed to use at the time of origination. Once the user pays the loan, the loan account is closed. A good example of this is [Affirm](https://www.affirm.com). With Affirm, consumers get a loan at the point of sale and then over the course of next few months, they pay off the loan. 2. **Revolving line of credit:** This is like a credit card. Consumers get approved for a line they can draw against and as they pay off the line, they can draw more. This is what [Final](https://getfinal.com) was trying to do. Both loans are considered [unsecured loans](https://www.thebalance.com/unsecured-loans-definition-and-explanation-315638), because they are not backed by anything. [block:api-header] { "title": "Who is the lender?" } [/block] Our partner banks are the lenders. You are the guarantor of the loans. Which means if the end customer is unable to pay the loan, you will make the payments on their behalf. With this model, you do not have to register as the lender, but you will still need to have the balance sheet to absorb any losses. When we set up your program on production, we will underwrite you and set a limit on how many loans your platform is allowed to underwrite at any given time. [block:api-header] { "title": "Interest On One-Time Loan" } [/block] We accrue interest daily. We will look at the balance of the loan account and based on the APR accrue interest. However, we do cap the APR. What that means is, for example, if an end user is approved for a $100 loan with an APR of 10% and cap of $40 dollars, then the interest will only accrue up to $40, not more. We also do not charge end users for late payments. The APR is the only fee they have to worry about. [block:api-header] { "title": "Interest On Revolving Credit Loan" } [/block] **Statements cycle**: always first day to the last day of each month (the statements will correspond to regular months). **Statements delivery**: no later than the 10th of each month. **Payment date**: 20th (no interest if paid on this date). **Interest accrual**: if not paid on the 20th of the month following the cycle, than the interests go back to the day of expenditure/credit use. **Payments distribution**: Partial or late payments shall offset the first expense made (in the timeline) and the interests accrued proportionally (ex.: if there is one 50 dollar payment plus $5 in interest ($55) and the user paid 11, then we will apply 10 for principal and 1 for interest, and the balance will be 40 principal and 4 interest). Just like for One-Time Loan, we cap APR on Revolving Credit Loans as well. What that means is, for example, if an end user has a balance of $100 loan with an APR of 10% and cap of $40 dollars, then the interest will only accrue up to $40, not more. We also do not charge end users for late payments. The APR is the only fee they have to worry about. [block:api-header] { "title": "Things you can customize" } [/block] Following things can be customized when we set up your program: * **Type of Loan:** You get to pick if you wish to provide a revolving line program or one-time loan program. * **Notifications:** You will be able to choose if we will send the notices and notifications to the user or you will. * **Repayment:** The model is by default set up to auto debt user accounts for repayment. But we can set up the program in a way where the user can push payments to the loan account instead of us debiting the funds. * **APR:** You get to decide the APR, but it does require our approval. * ** Decisioning:** You get to decide the decisioning logic, but it does require our approval. * ** Number of loans: ** You can decide how many loans a user is allowed to apply for at any given time. * **Max loan amount: ** Maximum amount per loan. [block:api-header] { "title": "Loan rejection reasons" } [/block] Following are the reasons we would reject a loan: 1. Loan rejected because KYC is not finished. 2. Loan rejected because currently, we do not issue loans for your user type. 3. Loan rejected because the loan amount is higher than what we currently allow. The limit is *your_limit*. 4. Loan rejected because you are over the limit of loans we currently allow. The limit is *your_limit*. 5. Loan rejected because your credit score is low. Your credit needs to be over *your_limit*. [block:api-header] { "type": "basic", "title": "Data Structure For One-Time Loan" } [/block] Following are the relevant fields that you will get back in a JSON response: [block:code] { "codes": [ { "code": "{\n \"_id\": \"ID of the loan account\",\n \"allowed\": \"permisisons granted to the loan account\",\n \"extra\": {\n \"note\": \"If the loan was rejected, the reason will be written here in plaintext. All reasons for rejecting a loan are listed below.\",\n \t\"supp_id\": \"Reference ID for the loan. We recomment supplying this ID when creating the loan, we put this in the PDF of the loan aggrement has the refrence number for the end user\"\n },\n \"info\": {\n \"agreements\": [\n {\n \"type\": \"Type of agreement. All types are listed below.\",\n \"url\": \"URL of the agreement\"\n }\n ],\n \"balance\": {\n \"amount\": 0,\t//balance on the loan account. This will usually be -ve. If 0, then it means the loan has been paid off.\n \"currency\": \"USD\"\n },\n \"credit_limit\": {\n \"amount\": 0,\t//this will denote the limit of how much money can be borrowed out of this loan account.\n \"currency\": \"USD\"\n },\n \"disbursement_node_id\": \"where the funds will be disbursed to. This node ID can either belong to the end user or can also be your own Synapse account if you are disbursing the funds by some other means.\",\n \"document_id\": \"KYC document ID of the user. The email and phone number associated with this document will be used to send notifications to the user.\",\n \t\"installment_amount\": \"amount for each payment installment.\",\n \"interest\": {\n \"accrued\": 0,\t//how much interest has accrued so far on the loan. In USD.\n \"apr\": 0,\t//APR on the loan. In percentage\n \"cap\": 0\t//Max interest that will be charged on the loan. In USD.\n },\n \"next_payment\": \"When the next payment is due. In unixtime (milliseconds)\",\n \"nickname\": \"We recommend putting the loan purpose here.\",\n \t\"num_payments\": \"number of payments in the loan term\",\n \"payment_node_id\": \"Where we will collect payments from. We recommend keeping this account the same as disbursement_node_id. This can be the node of the end user or yours. Use yours if you wish to collect installemnts thorough a thirdparty.\",\n \"schedule\": \"Payment schedule. All schedules are listed below\",\n \t\"loan_type\":\"ONE-TIME\"\n },\n \"type\": \"LOAN-US\",\n \"user_id\": \"ID of the user\"\n}", "language": "json" } ] } [/block] ## Data Type of Elements [block:parameters] { "data": { "h-0": "Element", "h-1": "Data Type", "0-0": "_id", "0-1": "String, of type [ObjectId](https://docs.mongodb.com/manual/reference/method/ObjectId/)", "1-0": "allowed", "1-1": "String", "2-0": "extra.note", "2-1": "String", "3-0": "info.agreements", "3-1": "List/Array", "4-0": "info.agreements.type", "4-1": "String", "5-0": "info.agreements.url", "5-1": "String", "6-0": "info.balance.amount", "6-1": "Float", "7-0": "info.balance.currency", "7-1": "String", "8-0": "info.credit_limit.amount", "8-1": "Float", "9-0": "info.credit_limit.currency", "9-1": "String", "10-0": "info.disbursement_node_id", "10-1": "String, of type [ObjectId](https://docs.mongodb.com/manual/reference/method/ObjectId/)", "11-0": "info.document_id", "11-1": "String, derived hash", "13-0": "info.interest.accured", "13-1": "Float", "14-0": "info.interest.apr", "14-1": "Float", "15-0": "info.interest.cap", "15-1": "Float", "16-0": "info.next_payment", "16-1": "Long", "17-0": "info.nickname", "17-1": "String", "19-0": "info.payment_node_id", "19-1": "String, of type [ObjectId](https://docs.mongodb.com/manual/reference/method/ObjectId/)", "20-0": "info.schedule", "20-1": "String", "22-0": "type", "22-1": "String", "23-0": "user_id", "23-1": "String, of type [ObjectId](https://docs.mongodb.com/manual/reference/method/ObjectId/)", "12-0": "info.installment_amount", "12-1": "Float", "18-0": "info.num_payments", "18-1": "Integer", "21-0": "info.loan_type", "21-1": "String" }, "cols": 2, "rows": 24 } [/block] [block:api-header] { "title": "Data Structure For Revolving Credit Loan" } [/block] Following are the relevant fields that you will get back in a JSON response: [block:code] { "codes": [ { "code": "{\n \"_id\": \"ID of the loan account\",\n \"allowed\": \"permisisons granted to the loan account\",\n \"extra\": {\n \"note\": \"If the loan was rejected, the reason will be written here in plaintext. All reasons for rejecting a loan are listed below.\",\n \t\"supp_id\": \"Reference ID for the loan. We recomment supplying this ID when creating the loan, we put this in the PDF of the loan aggrement has the refrence number for the end user\"\n },\n \"info\": {\n \"agreements\": [\n {\n \"type\": \"Type of agreement. All types are listed below.\",\n \"url\": \"URL of the agreement\"\n }\n ],\n \"balance\": {\n \"amount\": 0,\t//balance on the loan account. This will usually be -ve. If 0, then it means the loan has been paid off.\n \"currency\": \"USD\"\n },\n \"credit_limit\": {\n \"amount\": 0,\t//this will denote the limit of how much money can be borrowed out of this loan account.\n \"currency\": \"USD\"\n },\n \"document_id\": \"KYC document ID of the user. The email and phone number associated with this document will be used to send notifications to the user.\",\n \"interest\": {\n \"accrued\": 0,\t//how much interest has accrued so far on the loan. In USD.\n \"apr\": 0,\t//APR on the loan. In percentage\n \"cap\": 0\t//Max interest that will be charged on the loan. In USD.\n },\n \"next_payment\": \"When the next payment is due. In unixtime (milliseconds)\",\n \"nickname\": \"We recommend putting the loan purpose here.\",\n \t\"loan_type\":\"REVOLVING\"\n },\n \"type\": \"LOAN-US\",\n \"user_id\": \"ID of the user\"\n}", "language": "json" } ] } [/block] ## Data Type of Elements [block:parameters] { "data": { "h-0": "Element", "h-1": "Data Type", "0-0": "_id", "1-0": "allowed", "2-0": "extra.note", "3-0": "info.agreements", "4-0": "info.agreements.type", "5-0": "info.agreements.url", "6-0": "info.balance.amount", "7-0": "info.balance.currency", "8-0": "info.credit_limit.amount", "9-0": "info.credit_limit.currency", "10-0": "info.document_id", "11-0": "info.interest.accured", "12-0": "info.interest.apr", "13-0": "info.interest.cap", "14-0": "info.nickname", "15-0": "info.schedule", "16-0": "info.loan_type", "17-0": "type", "18-0": "user_id", "0-1": "String, of type [ObjectId](https://docs.mongodb.com/manual/reference/method/ObjectId/)", "1-1": "String", "2-1": "String", "3-1": "List/Array", "4-1": "String", "5-1": "String", "6-1": "Float", "7-1": "String", "8-1": "Float", "9-1": "String", "10-1": "Float", "11-1": "Float", "12-1": "Float", "13-1": "Float", "14-1": "String", "15-1": "String", "16-1": "String", "17-1": "String", "18-1": "String, of type [ObjectId](https://docs.mongodb.com/manual/reference/method/ObjectId/)" }, "cols": 2, "rows": 19 } [/block] ## Allowed Status [block:parameters] { "data": { "h-0": "Allowed", "h-1": "Notes", "0-0": "`CREDIT`", "0-1": "This `allowed` type will be used for one time loans. Which means you can pay back the loan, but you cannot withdraw funds from the loan account again.", "1-0": "`CREDIT-AND-DEBIT`", "1-1": "This `allowed` type will be used for a revolving line. Which means you can pay back the loan and also draw funds out of the account.", "2-0": "`REJECTED`", "2-1": "When the loan gets rejected, a loan account will be created but with `allowed` as `REJECTED`. The loan account will have details of rejection in the `extra.notes` section and also the adverse action letter under `info.agreements`.", "3-0": "`LOCKED`", "4-0": "`INACTIVE`", "4-1": "In case of one time loan, once the loan is paid off, the node will be set to `INACTIVE.`", "3-1": "In case of a revolving line, when a loan account is closed, it will be marked as `LOCKED`." }, "cols": 2, "rows": 5 } [/block] ## Agreement Types [block:parameters] { "data": { "h-0": "Agreement Types", "0-0": "`ADVERSE_ACTION`", "1-0": "`LOAN_AGREEMENT`", "h-1": "Notes", "0-1": "If a loan is rejected, an adverse action letter will be issued and that will be under the `info.agreements` object.", "1-1": "If a loan is approved, the approved loan \n with all the loan details agreement will be under `info.agreements` object." }, "cols": 2, "rows": 2 } [/block] ## Repayment Schedules [block:parameters] { "data": { "h-0": "Schedules", "h-1": "Notes", "0-0": "`MONTHLY`", "0-1": "Monthly loan repayment" }, "cols": 2, "rows": 1 } [/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`.