# LSP Lending APIs
- All APIs are async
- Each API request generates a standardized Acknowledgement from the other end.
- The APIs are two way. For example LSP makes a request to lender on lender API. Lender responds to LSP on LSP's APIs. Hence, each function has 2 separate APIs. For example: Create Loan Application has 2 APIs
- CreateLoanApplicationRequest -> Request sent by LSP to the Lender
- CreateLoanApplicationResponse -> Async Response sent by Lender to LSP
- Update APIs for MSMEs to push more data as requested by Lender
- Create calls should be idempotent on the requestId field i.e. two calls to CreateLoanApplication with same requestId shouldn’t result in two applications created. Lenders are advised to return the same response as sent earlier.
- Update APIs for MSMEs to push more data as requested by Lender
| Column 1 | Column 2 | Column 3
# Table of contents
- [LSP Lending APIs](#lsp-lending-apis)
- [Table of contents](#table-of-contents)
- [High level architecture](#high-level-architecture)
- [Flow diagram](#flow-diagram)
- [Sample ack response](#sample-ack-response)
- [success](#success)
- [Failure](#failure)
- [API descriptions](#api-descriptions)
- [Domain objects](#domain-objects)
- [Security](#security)
- [API specs](#api-specs)
- [Create Loan Application](#create-loan-application)
- [Create Loan Application Request](#create-loan-application-request)
- [Create Loan Application Response](#create-loan-application-response)
- [Consent handle APIs](#consent-handle-apis)
- [Consent Handle Request](#consent-handle-request)
- [Consent handle response](#consent-handle-response)
- [Consent Status Request](#consent-status-request)
- [Consent status response](#consent-status-response)
- [Offers API](#offers-api)
- [Generate Offers API request](#generate-offers-api-request)
- [Generate Offers API Response](#generate-offers-api-response)
- [Set offer request](#set-offer-request)
- [Set offer response](#set-offer-response)
- [Offer Status Request](#offer-status-request)
- [Offer status response](#offer-status-response)
- [Offer Acceptance APIs](#offer-acceptance-apis)
- [Trigger Loan Acceptance Request](#trigger-loan-acceptance-request)
- [Trigger Loan Acceptance Response](#trigger-loan-acceptance-response)
- [Verify Loan Acceptance Request](#verify-loan-acceptance-request)
- [Verify Loan Acceptance response](#verify-loan-acceptance-response)
- [Grant loan APIs](#grant-loan-apis)
- [Grant Loan request](#grant-loan-request)
- [Grant Loan Response](#grant-loan-response)
- [Loan Summary Request](#loan-summary-request)
- [Loan summary response](#loan-summary-response)
- [Get loan request](#get-loan-request)
- [Get Loan response](#get-loan-response)
- [Loan statement request](#loan-statement-request)
- [Loan statement response](#loan-statement-response)
- [Repayments](#repayments)
- [Get Repayment Plans Request](#get-repayment-plans-request)
- [Get repayment plans response](#get-repayment-plans-response)
- [Reconcile Repayment Request](#reconcile-repayment-request)
- [Set Repayment Plan Request](#set-repayment-plan-request)
- [Set Repayment Plan Response](#set-repayment-plan-response)
- [Set Repayment Plan Status Request](#set-repayment-plan-status-request)
- [Set Repayment Plan Status Response](#set-repayment-plan-status-response)
- [Trigger Repayment Request](#trigger-repayment-request)
- [Trigger Repayment Response](#trigger-repayment-response)
- [Trigger Repayment Status Request](#trigger-repayment-status-request)
- [Trigger Repayment Status Response](#trigger-repayment-status-response)
- [Disbursement API](#disbursement-api)
- [Get Disbursement Plans Request](#get-disbursement-plans-request)
- [Get Disbursement Plans Response](#get-disbursement-plans-response)
- [Set Disbursement Plan Request](#set-disbursement-plan-request)
- [Set Disbursement Plan Response](#set-disbursement-plan-response)
- [Trigger Disbursement Request](#trigger-disbursement-request)
- [Trigger Disbursement Response](#trigger-disbursement-response)
- [Loan Dispute Management APIs](#loan-dispute-management-apis)
- [Raise Dispute Request](#raise-dispute-request)
- [Raise Dispute Response](#raise-dispute-response)
- [Dispute Status Request](#dispute-status-request)
- [Dispute Status Response](#dispute-status-response)
- [Meta APIs](#meta-apis)
- [Get Lookups Request](#get-lookups-request)
- [Get Lookups Response](#get-lookups-response)
- [Get Error Code Request](#get-error-code-request)
- [Get Error Code Response](#get-error-code-response)
- [Heartbeat](#heartbeat)
- [Non functional requirements](#non-functional-requirements)
- [Domain Object Specification](#domain-object-specification)
- [Metadata](#metadata)
- [Purpose](#purpose)
- [Borrower](#borrower)
- [Applicant](#applicant)
- [Lender](#lender)
- [ContactDetails](#contactdetails)
- [AdditionalIdentifier](#additionalidentifier)
- [Address](#address)
- [Document](#document)
- [Collateral](#collateral)
- [Valuation](#valuation)
- [Party](#party)
- [Charges](#charges)
- [ChargeDetails](#chargedetails)
- [Charges](#charges-1)
- [ChargeDetails](#chargedetails-1)
- [Loan details](#loan-details)
- [LoanAgreement](#loanagreement)
- [CreditScoreType](#creditscoretype)
- [Guarantors](#guarantors)
- [RejectionDetail](#rejectiondetail)
- [Reference](#reference)
- [actionRequired](#actionrequired)
- [Offer](#offer)
- [ChosenRepayment](#chosenrepayment)
- [Payment Method](#payment-method)
- [LoanTenure](#loantenure)
- [LoanTermsHistory](#loantermshistory)
- [Disbursement](#disbursement)
- [ChosenDisbursement](#chosendisbursement)
- [Payment](#payment)
- [Transaction](#transaction)
- [Dispute](#dispute)
- [AccountDetails](#accountdetails)
- [AccountDetailsData](#accountdetailsdata)
- [AmountType](#amounttype)
- [PaymentMethod](#paymentmethod)
- [Consent](#consent)
- [LspInfo](#lspinfo)
- [Error Codes](#error-codes)
- [CreateLoanApplicationResponse](#createloanapplicationresponse)
- [ConsentHandleResponse](#consenthandleresponse)
- [TriggerRepaymentResponse](#triggerrepaymentresponse)
- [TriggerRepaymentStatusResponse](#triggerrepaymentstatusresponse)
- [LoanSummaryResponse](#loansummaryresponse)
- [LoanStatementResponse](#loanstatementresponse)
- [GetRepaymentPlansResponse](#getrepaymentplansresponse)
- [GetDisbursementPlansResponse](#getdisbursementplansresponse)
- [RaiseDisputeRequest](#raisedisputerequest)
- [UpdateDisputeRequest](#updatedisputerequest)
## High level architecture

## Flow diagram

# Sample ack response
This is how the acknowledgement response looks for all APIs
## success
```
{
"ack": {
"err": "0",
"traceId": "e8cc6822-d4bb-4eb1-9e1b-4996fbff8acb",
"timestamp": "2018-12-06T11:39:57.153Z"
}
}
```
## Failure
```
{
"ack": {
"err": "0",
"errorCode": "MAN_ATTR_MISSING",
"traceId": "e8cc6822-d4bb-4eb1-9e1b-4996fbff8acb",
"timestamp": "2018-12-06T11:39:57.153Z"
}
}
```
# API descriptions
<table>
<tbody>
<tr>
<th>Category</th>
<th>API Name</th>
<th>Description</th>
</tr>
<tr>
<td><b>Loan application</b></td>
<td>Create loan application request</td>
<td>Creates a loan application with the lender system</td>
</tr>
<tr>
<td> </td>
<td>Create loan application response</td>
<td>Response for the create loan request API invoked by the lender</td>
</tr>
<tr>
<td> </td>
<td>Update loan application request</td>
<td>Updates an already created loan application with additional data</td>
</tr>
<tr>
<td> </td>
<td>Update loan application response</td>
<td>Response for the update loan application invoked by the lender</td>
</tr>
<tr>
<td> </td>
<td>Withdraw loan application request</td>
<td>Withdraws an already created loan request</td>
</tr>
<tr>
<td> </td>
<td>Withdraw loan application response</td>
<td>
<div class="page" title="Page 4">
<div class="section">
<div class="layoutArea">
<div class="column">
<div class="page" title="Page 4">
<div class="section">
<div class="layoutArea">
<div class="column">
<p>Response for the Withdraw Loan Application invoked by the lender</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</td>
</tr>
<tr>
<td> </td>
<td>Loan application status request</td>
<td>Request raised by the LSP to get the status of the loan application</td>
</tr>
<tr>
<td> </td>
<td>Loan application status response</td>
<td>Response provided by the lender for the status of the loan application</td>
</tr>
<tr>
<td><b>Offers</b></td>
<td>Generate offers request</td>
<td>request raised by an LSP to fetch offers for a previously raised loan application</td>
</tr>
<tr>
<td> </td>
<td>Generate offers response</td>
<td>Response provided by the Lender to LSP which includes the offers</td>
</tr>
<tr>
<td> </td>
<td>Accept Offer request</td>
<td>Request raised by LSP to accept an offer</td>
</tr>
<tr>
<td> </td>
<td>Accept Offer response</td>
<td>Response by lender as a response to offer accept request</td>
</tr>
<tr>
<td><b>Consent</b></td>
<td>Consent Handle request</td>
<td>Request raised by the LSP to Lender to trigger creation of consent requests in the AA system</td>
</tr>
<tr>
<td> </td>
<td>Consent handle response</td>
<td>Response given by lender to LSP with the ocnsent handle for the consent requests raised</td>
</tr>
<tr>
<td> </td>
<td>Consent status request</td>
<td>request raised by LSP to lender to check the consent artifacvt creation status</td>
</tr>
<tr>
<td> </td>
<td>Consent status response</td>
<td>Response sent by lender to LSP which includes the consent iDs and their statuses</td>
</tr>
<tr>
<td><b>OTP</b></td>
<td>Trigger OTP request</td>
<td>Request by LSP to lender to trigger OTP </td>
</tr>
<tr>
<td> </td>
<td>Trigger OTP response</td>
<td>Response sent by the lender for the OTP trigger request</td>
</tr>
<tr>
<td> </td>
<td>Verify OTP request</td>
<td>Request by LSP to lender to verify the OTP</td>
</tr>
<tr>
<td> </td>
<td>Verify OTP response</td>
<td>Response Lender to LSP with the status of OTP validation</td>
</tr>
<tr>
<td><b>Grant loan</b></td>
<td>Grant loan request</td>
<td>Request raised by LSP to get a loan granted for the borrower. This API creates a loan in lender's system.</td>
</tr>
<tr>
<td> </td>
<td>Grant loan response</td>
<td>Response sent by the lender to LSP once the loan has been created in the lender's system</td>
</tr>
<tr>
<td> </td>
<td>Update loan request</td>
<td>LSP to lender. Updates an already existing request</td>
</tr>
<tr>
<td> </td>
<td>Update loan response</td>
<td>Lender to LSP. Response sent after the loan has been updated.</td>
</tr>
<tr>
<td> </td>
<td>get Loan request</td>
<td>Request raised by LSP when LSP wants to get the details of the loan</td>
</tr>
<tr>
<td> </td>
<td>get loan response</td>
<td>Response sent by the Lender to convey the details of the response</td>
</tr>
<tr>
<td> </td>
<td>get Loan request</td>
<td>Request raised by LSP when LSP wants to get the details of the loan</td>
</tr>
<tr>
<td> </td>
<td>loan summary request</td>
<td>Request raised by LSP to the the current summary of the loan</td>
</tr>
<tr>
<td> </td>
<td>loan summary response</td>
<td>Response given by lender for LoanSummary Request</td>
</tr>
<tr>
<td> </td>
<td>Loan statement request</td>
<td>Request raised for getting the currentloanaccountstatement</td>
</tr>
<tr>
<td> </td>
<td>Loan statement response</td>
<td>Response giving the Loan account statement</td>
</tr>
<tr>
<td><b>Repayment</b></td>
<td>Get repayment plans request</td>
<td>Request raised by LSP to get all the repayment plans offered by the lender</td>
</tr>
<tr>
<td> </td>
<td>Get repayment plans response</td>
<td>Response given by lender to LSP listing all the repayment plans</td>
</tr>
<tr>
<td> </td>
<td>set repayment plans request</td>
<td>Request raised by LSP to get list of plans for a loan</td>
</tr>
<tr>
<td> </td>
<td>set repayment plans response</td>
<td>Response from the Lender to LSP returning the lender page url where repayment should be set</td>
</tr>
<tr>
<td> </td>
<td>trigger repayment request</td>
<td>Request by LSP to lender to trigger repayment</td>
</tr>
<tr>
<td> </td>
<td>trigger repayment response</td>
<td>Response by the Lender in response to Trigger Repayment Request</td>
</tr>
<tr>
<td><b>Disbursement</b></td>
<td>Trigger disbursement request</td>
<td>Request by LSP to lender to trigger disbursement</td>
</tr>
<tr>
<td> </td>
<td>Trigger disbursement response</td>
<td>Response by lender for trigger disbursement request</td>
</tr>
<tr>
<td> </td>
<td>set disbursement account request</td>
<td>request raised by LSP to set the disbursement account for the loan</td>
</tr>
<tr>
<td> </td>
<td>Set disbursement account response</td>
<td>response from lender to LSP to set disbursement plan request</td>
</tr>
<tr>
<td> </td>
<td>set disbursement plan request</td>
<td>request raised by LSP to set the disbursement account for the loan</td>
</tr>
<tr>
<td> </td>
<td>Get disbursement plans request</td>
<td>Request raised by LSP to get all disbursement plans offered by lender</td>
</tr>
<tr>
<td> </td>
<td>Get disbursement plans response</td>
<td>Request raised by LSP to choose a disbursement plan</td>
</tr>
<tr>
<td> </td>
<td>Set disbursement plan response</td>
<td>Response given by lender indicating the status of set Disbursement Plan</td>
</tr>
<tr>
<td><b>Dispute management</b></td>
<td>Raise dispute request</td>
<td>Request by LSP to lender to raise a dispute</td>
</tr>
<tr>
<td> </td>
<td>Raise dispute response</td>
<td>Response sent by lender to LSP for raise dispute request</td>
</tr>
<tr>
<td> </td>
<td>Update dispute request</td>
<td>request by LSP to lender to update a dispute</td>
</tr>
<tr>
<td> </td>
<td>Update dispute response</td>
<td>response by lender to LSP to update dispute request</td>
</tr>
<tr>
<td> </td>
<td>Dispute status request</td>
<td>Request by LSP to lender to query dispute status</td>
</tr>
<tr>
<td> </td>
<td>Dispute status response</td>
<td>Response by Lender to LSP to inform status of a dispute</td>
</tr>
</tbody>
</table>
# Domain objects
<table >
<tbody>
<tr>
<td><strong>Name</strong></td>
<td><strong>Description</strong></td>
</tr>
<tr>
<td>Metadata</td>
<td>Metadata about each API request</td>
</tr>
<tr>
<td>Response</td>
<td>Object which indicates the successful completion of Request. If there are any business errors, they are captured inside response</td>
</tr>
<tr>
<td>Borrower</td>
<td>Details about the borrower, this identifes with verification status etc.</td>
</tr>
<tr>
<td>Address</td>
<td>Details about the address of the borrower</td>
</tr>
<tr>
<td>Collateral</td>
<td>Security against which the loan is requested by the borrower</td>
</tr>
<tr>
<td>Reference</td>
<td>Object used for making pointing to a different entity in the request/response. For example: if the lender wants to refer a document from the Collateral section, this object should be populated with details of the document object `in payload</td>
</tr>
<tr>
<td>Ack</td>
<td>Acknowledgement response for any async request</td>
</tr>
<tr>
<td>Account Details</td>
<td>Object for capturing account details for different types like VPA, Accounts etc.</td>
</tr>
<tr>
<td>Loan tenure</td>
<td>Details about the tenure of the loan including durations and units</td>
</tr>
<tr>
<td>Loan Tems history</td>
<td>Details about how the loan parameters - amount, interest rate, tenure - changes over the course of the loan</td>
</tr>
<tr>
<td>Documents</td>
<td>All the dta presented byu the user to beused for granting loan will be classified as documents. Example GST invoices, Bank History, GST summary, Swiggy restaurant history</td>
</tr><tr>
<td>LoanOffer</td>
<td>Loan offer will have the offer details like interest rate, tenure, minAMount, maxAmount etc</td>
</tr>
<tr>
<td>Rejection details</td>
<td>If a lender rejects a loanReques, they needs to send a standardised rejection codes, and user message</td>
</tr>
<tr>
<td>Applicant</td>
<td>This object captures the details of the person who is applying for the loan. Applicant can be different from the borrower.</td>
</tr>
<tr>
<td>Lender</td>
<td>This object captures the details of the lender.</td>
</tr>
<tr>
<td>ContactDetails</td>
<td>This object captures the contact details of the borrower/guarantor/applicant etc as the case might be.</td>
</tr>
<tr>
<td>AdditionalIdentifier</td>
<td>Additional identifier details for borrower/guarantor/applicant etc as the case might be.</td>
</tr>
<tr>
<td>Valuation</td>
<td>Valuation details for the collateral. For example, in case of home loans, it will capture how much the home is valued at.</td>
</tr>
<tr>
<td>Party</td>
<td>Object for capturing the details of the parties who are associated with the collaterals.</td>
</tr>
<tr>
<td>LoanTerms</td>
<td>Details of the loan like amount sanctioned, interest, tenure etc.</td>
</tr>
<tr>
<td>Charge</td>
<td>Details about the penalty and processing charges for the loan</td>
</tr> <tr>
<td>ActionRequired</td>
<td>Details of any specific action that the lender wants from the borrower. Can including submitting addtional documents, furnishing additional details.</td>
</tr>
</tr><tr>
<td>PaymentPlan</td>
<td>Details about the payment plans provided by the lender. Can be a disbursement plan or a repayment plan.</td>
</tr>
<tr>
<td>Disbursement</td>
<td>Object capturing the disbursement plans and the disbursement account choices available</td>
</tr>
<tr>
<td>Chosen Disbursement</td>
<td>Object capturing the chosen disbursement plan and disbursement account for the loan</td>
</tr>
<tr>
<td>Chosen Repayment</td>
<td>Object capturing the chosen repayment plan and active payment method for the loan</td>
</tr>
<tr>
<td>Payment</td>
<td>Object capturing the details of any kind of payment related to a loan</td>
</tr>
<tr>
<td>Payment Method</td>
<td>Object capturing the details of payment method. Each method would have different set of attributes depending on the type</td>
</tr>
<tr>
<td>Consent</td>
<td>Consent details needed for raising a consent request</td>
</tr>
<tr>
<td>Dispute</td>
<td>Consent details needed for raising a consent request</td>
</tr>
<tr>
<td>Transaction</td>
<td>Object capturing the details of individual transactions carried out on the loan. Includes both disbursement and repayment.</td>
</tr>
<tr>
<td>Guarantors</td>
<td>Guarantors for the loan application. This can internally some signed certificates given by Guarantor. Beyond the scope of MVP, added this for future use-cases.</td>
</tr>
<tr>
<td>CreditScoreType</td>
<td>Credit score rating provided by the borrower to other entitiers like Swiggy for restaurants</td>
</tr>
<tr>
<td>Amount Type</td>
<td>Details of the amount including currency</td>
</tr>
<tr>
<td>Loan request details</td>
<td>Details about the loan the user wants: min amount , max amount & tenure etc.</td>
</tr>
<tr>
<td>Reference </td>
<td>Object used for pointing to a different entity in the request/response. e.g. If the Lender wants to refer a document from collateral section</td>
</tr>
<tr>
<td>Loan details</td>
<td>Details about the loan that is granted to the user</td>
</tr>
<tr>
<td>Loan Insurance</td>
<td>Details about the loan that is tied to the insurance. Can also be a reference to an insurance policy.</td>
</tr>
<tr>
<td>Accepted offer</td>
<td>Details about the offer, disbursement and repayment plans that the borrower has chosen</td>
</tr>
<tr>
<td>Trigger disbursement</td>
<td>Details needed for initating a borrower led disbursement</td>
</tr>
<tr>
<td>Loan application</td>
<td>This will have all the details like loan agreement, accepted offer ID, supporting documents, lien etc</td>
</tr>
<tr>
<td>Disbursement history</td>
<td>All the disbursements made against the loan offered via LSP, this is to be shown on the LSP app</td>
</tr>
<tr>
<td>Repayment history</td>
<td>To be shown on LSP app. ALl the repayments that have been made against a loan given out by the LSP</td>
</tr>
<tr>
<td>Collaterals</td>
<td>Collateral details presented by the user for loan application. </td>
</tr>
<tr>
<td>Purpose</td>
<td>Purpose for which the loan was requested</td>
</tr>
</tbody>
</table>
# Security
- All communication between PCR <-> Lender should happen over HTTPS(TLS 1.1 and above)
- Connection should be a two-way TLS connection
- All API Request/Response should be digitally signed as per the JSON Web Signature
- Specification:
RSA with SHA-256 should be used to sign the request/response of the APIs
To avoid data duplication, we will follow Detached Signature Approach as described in
Appendix F of the JWT RFC(https://tools.ietf.org/html/rfc7515#appendix-F)
All API request should contain the current timestamp (Unix Epoch Time - ISO8601, precision of
millisecond).
# API specs
# Create Loan Application
## Create Loan Application Request
HTTP Verb - POST
API Endpoint - /v1/loanApplication/createLoanApplicationRequest
This API is called by the LSP to create a loan application request in the borrower system. The LSP sends the basic details regarding the loan request to the lender using this API.
```
{
"metadata": {
"version": "1.0.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "a8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "LSP123"
},
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"createdDate": "2020-03-01T00:00:00Z",
"loanApplicationId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"type": "CASHFLOW",
"borrower": {
"primaryId": "CPAA1234A",
"primaryIdType": "PAN",
"additionalIdentifiers": [],
"name": "John doe",
"category": "ORGANISATION",
"contactDetails": [
{
"type": "PRIMARY",
"phone": "7777777777",
"email": "johndoe@defenterprises",
"address": {
"co": "<care of>",
"hba": "<House/Building/Apartment>",
"srl": "<Street/Road/Lane>",
"landmark": "",
"als": "<Area/Locality/Sector>",
"vtc": "<Village/Town/City>",
"pincode": "",
"po": "",
"district": "",
"state": "",
"country": "",
"uri": "<digital address>",
"latitude": "",
"longitude": ""
}
}
],
"documents": [
{
"format": "JSON",
"reference": "b8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"source": "GSTN",
"sourceIdentifier": "GSTN",
"type": "GSTN_PROFILE",
"isDataInline": true,
"data": "eyJzdGpDZCI6IkFQMDAzIiwibGdubSI6Ik1TIENPUlBPUkFUSU9OIiwic3RqIjoiQkNQI EtPRElLT05EQSIsImR0eSI6IlJlZ3VsYXIiLCJjeGR0IjoiIiwiZ3N0aW4iOiIwNUFCTlR ZMzI5MFA4WkEiLCJuYmEiOlsiQm9uZGVkIFdhcmVob3VzZSIsIkVPVSAvIFNUUCAvIEVIV FAiLCJGYWN0b3J5IC8gTWFudWZhY3R1cmluZyIsIklucHV0IFNlcnZpY2UgRGlzdHJpYnV 0b3IgKElTRCkiLCJMZWFzaW5nIEJ1c2luZXNzIl0sImxzdHVwZHQiOiIwNS8wMS8yMDE3I iwicmdkdCI6IjA1LzA1LzIwMTciLCJjdGIiOiJGb3JlaWduIExMUCIsInN0cyI6IlByb3Z pc2lvbmFsIiwiY3RqQ2QiOiJBUDAwNCIsImN0aiI6IkJDUCBUSFVNTUFLVU5UQSIsInRyY WRlTmFtIjoiQUxUT04gUExBU1RJQyBQUklWQVRFIExURCIsImFkYWRyIjpbeyJhZGRyIjp7ImJubSI6IkVMUEhJTlNUT05FIEJVSUxESU5HIiwic3QiOiIxMCwgVkVFUiBOQVJJTUFOI FJPQUQiLCJsb2MiOiJGT1JUIiwiYm5vIjoiMTAiLCJzdGNkIjoiUmFqYXN0aGFuIiwiZmx ubyI6IjFTVCBGTE9PUiIsImx0IjoiNzQuMjE3OSIsImxnIjoiMjcuMDIzOCIsInBuY2QiO iI0MDAwMDEifSwibnRyIjpbIldob2xlc2FsZSBCdXNpbmVzcyJdfV0sInByYWRyIjp7ImF kZHIiOnsiYm5tIjoiS0FUR0FSQSBIT1VTRSIsInN0IjoiMTUsIEwgSkFHTU9IQU5EQVMgT UFSRyIsImxvYyI6Ik1BTEFCQVIgSElMTCIsImJubyI6IjUiLCJzdGNkIjoiTWFoYXJhc2h 0cmEiLCJmbG5vIjoiNFRIIEZMT09SIiwibHQiOiI3NC4yMTc5IiwibGciOiIyNy4wMjM4I iwicG5jZCI6IjQwMDAwNiJ9LCJudHIiOlsiV2hvbGVzYWxlIEJ1c2luZXNzIl19fQ=="
}
]
},
"collaterals": [
{
"collateralPrimaryId": "<GSTIN>_<INVOICENUM>",
"collateralPrimaryIdType": "GST_INVOICE",
"type": "GST_INVOICE",
"additionalIdentifiers": [],
"valuation": {
"value": "",
"currency": "",
"date": "",
"source": "GSTN"
},
"parties": [],
"documents": [
{
"format": "JSON",
"reference": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"source": "GSTN",
"sourceIdentifier": "GSTN",
"type": "GSTN_B2B_INVOICE",
"isDataInline": true,
"data": "eyJjdGluIjoiMDFBQUJDRTIyMDdSMVo1IiwiY2ZzIjoiWSIsImludiI6W3siY2hrc3VtIjoiQkJVSUJVSVVJSktLQkpLR1VZRlRGR1VZIiwidXBkYnkiOiJTIiwiaW51bSI6IlMwMDg 0MDAiLCJpZHQiOiIyNC0xMS0yMDE2IiwidmFsIjo3MjkyNDguMTYsInBvcyI6IjA2Iiwic mNocmciOiJOIiwiZXRpbiI6IjAxQUFCQ0U1NTA3UjFaNCIsImludl90eXAiOiJSIiwiY2Z sYWciOiJOIiwiZGlmZl9wZXJjZW50IjowLjY1LCJvcGQiOiIyMDE2LTEyIiwiaXRtcyI6W 3sibnVtIjoxLCJpdG1fZGV0Ijp7InJ0Ijo1LCJ0eHZhbCI6MTAwMDAsImlhbXQiOjMyNSw iY2FtdCI6MCwic2FtdCI6MCwiY3NhbXQiOjEwfX1dfV19"
}
]
}
],
"guarantors": [],
"applicants": [
{
"primaryId": "9898989898",
"primaryIdType": "MOBILE"
}
],
"terms": {
"requestedAmount": "50000.00",
"currency": "INR"
}
}
```
## Create Loan Application Response
This is response for Create Loan Application but invoked by lender
HTTP Verb - POST
API Endpoint - /v1/loanApplication/createLoanApplicationResponse
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "FIU123"
},
"response": {
"error": "0"
},
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"loanApplicationId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"lender": {
"primaryId": "AWW PA7645M",
"primaryIdType": "PAN",
"additionalIdentifiers": [],
"name": "ABC Bank",
"category": "ORGANIZATION",
"contactDetails": [],
"documents": []
},
"loanApplicationStatus": "PROCESSING"
}
```
# Consent handle APIs
## Consent Handle Request
HTTP Verb - POST
API Endpoint - /v1/consent/consentHandleRequest
This API is used to request the lenders to send a consent request for fetching the bank account statements, GST historical data. The lender (FIU) checks with the AA and creates and consent handle internally once this API is triggered
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "LSP123"
},
"loanApplicationIds": [
"f8cc6822bd4bbb4eb1b9e1b4996fbff8acb"
],
"requestId": "g8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"consent": {
"consentFetchType": "ONETIME",
"vua": "user@aa.in",
"isAggregationEnabled": true,
"consentAggregationId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acd",
"lspInfo": {}
}
}
```
## Consent handle response
HTTP Verb - POST
API Endpoint - /v1/consent/consentHandleResponse
This API is invoked by the lenders to send the consent handles created in the AA system as part of Consent Handle Request API triggered by the LSP.
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "l8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "LSP123"
},
"requestId": "m8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"consent": {
"consentHandle": "m8cc6822bd4bbb4eb1b9e1b4996fbff8acb"
}
}
```
## Consent Status Request
HTTP Verb - POST
API Endpoint - /v1/consent/consentStatusRequest
This API is invoked by the LSP to check the status of Consents.
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822-d4bb-4eb1-9e1b-4996fbff8acb",
"orgId": "LSP123"
},
"consentHandle": "39e108fe-9243-11e8-b9f2-0256d88baae8"
}
```
## Consent status response
HTTP Verb - POST
API Endpoint - /v1/consent/consentStatusResponse
This API is invoked by the lender as a response informing the LSP regarding the status of the consents.
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "o8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "FIU123"
},
"response": {
"error": "0"
},
"requestId": "p8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"consent": {
"consentHandle": "q8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"consentStatus": "READY"
}
}
```
# Offers API
## Generate Offers API request
Once the consents needed for fetching data are ready, the LSP sends a request to the Lenders to generate the offer for a set of loan applications. All these loan applications belong to the same borrower. This API is the trigger point for the lenders to use the consentIds that were created for the loanapplicationids as part of the Consent APIs to fetch the data from various FIPs as needed for the loan use case. Once the data from these sources have been obtained, the lender system runs its business rules on the data and creates the offers
HTTP Verb - POST
API Endpoint - /v1/offer/generateOffersRequest
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822-d4bb-4eb1-9e1b-4996fbff8acb",
"orgId": "LSP123"
},
"loanApplicationIds": [
"54947df8-0e9e-4471-a2f9-9af509fb5889"
]
}
```
## Generate Offers API Response
HTTP Verb - POST
API Endpoint - /v1/offer/generateOffersResponse
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "w8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "FIU123"
},
"response": {
"error": "0"
},
"requestId": "x8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"loanApplications": [
{
"loanApplicationId": "x8cc6822bd4bbb4eb1b9e1b4996fbff8acb"
}
],
"loanApplicationStatus": "OFFERED",
"offers": [
{
"id": "y8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"validTill": "2018-12-06T00:00:00.000Z",
"terms": {
"requestedAmount": "50000.00",
"currency": "INR",
"sanctionedAmount": "50000.00",
"interestType": "FIXED",
"interestRate": "12.00",
"interestAmount": "6000.00",
"totalAmount": "56000.00",
"tenure": {
"duration": "3",
"unit": "MONTH"
},
"legalAgreement": {
"type": "TEXT",
"data": "<Base64 Encoded Data>"
},
"charges": {
"prepayment": {
"chargeType": "RATE_BASED",
"description": "Description of charge calculation",
"data": {
"rate": "6",
"applicableParameter": "TOTAL_LOAN_AMOUNT"
}
},
"bounce": {
"chargeType": "FIXED_AMOUNT",
"description": "Description of charge calculation",
"data": {
"amount": "3000.00"
}
},
"latePayment": {
"chargeType": "FIXED_AMOUNT",
"description": "Description of charge calculation",
"data": {
"amount": "3000.00"
}
},
"processing": {
"chargeType": "FIXED_AMOUNT",
"description": "Description of charge calulation",
"data": {
"amount": "3000.00"
}
}
}
},
"disbursement": {
"plans": [
{
"id": "hb8c6822bd4bbb4eb1b9e1b4996fbff8acb",
"automatic": false,
"scheduleType": "ONE_TIME",
"noOfInstallments": "1",
"totalAmount": "10000.00",
"status": "INACTIVE"
}
],
"accountDetails": [
{
"id": "hb8c6822bd4bbb4eb1b9e1b4996fbff8acb",
"accountDataType": "ACCOUNT",
"data": {
"accountType": "CURRENT",
"maskedAccountNumber": "XXXXXXXXX9090"
}
}
]
},
"repayment": {
"plans": [
{
"id": "a8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"automatic": false,
"scheduleType": "ONE_TIME",
"payNowAllowed": false,
"changeMethodAllowed": false,
"noOfInstallments": "1",
"tenure": {
"duration": "1",
"unit": "MONTH"
},
"title": "Title of the repayment plan",
"shortDescription": "short description",
"url": "lender url showing repayment details",
"penalty": "0.00",
"principal": "9000.00",
"interestAmount": "1000.00",
"totalAmount": "10000.00",
"status": "INACTIVE"
}
]
}
}
]
}
```
## Set offer request
HTTP Verb - POST
API Endpoint - /v1/offers/setOfferRequest
This API is invoked by the LSP to inform the lender about the offer that the borrower has chosen for a particular loan application.
```
{
"metadata": {
"version": "0.1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "c8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "LSP123"
},
"requestId": "12c1ds6822bd4bbb4eb1b9e1b4996fbff8acb",
"loanApplicationId": "d8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"offer": {
"id": "y8cc6822bd4bbb4eb1b9e1b4996fbff8acb"
}
}
```
## Set offer response
HTTP Verb - POST
API Endpoint - /v1/offers/setOfferResponse
This API is invoked by the lender and is the asynchronous response to Accept Offer Request API.
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "w8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "FIU123"
},
"response": {
"error": "0"
},
"requestId": "w8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"loanApplicationId": "w8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"loanApplicationStatus": "OFFER_ACCEPTED"
}
```
## Offer Status Request
HTTP Verb - POST
API Endpoint - /v1/offers/offerStatusRequest
This API is invoked by the LSP when it did not get an Offers Response from the lender within the expected time.
```
{
"metadata": {
"version": "0.1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822-d4bb-4eb1-9e1b-4996fbff8acb",
"orgId": "LSP123"
},
"loanApplicationIds": [
"54947df8-0e9e-4471-a2f9-9af509fb5889"
]
}
```
## Offer status response
HTTP Verb - POST
API Endpoint - /v1/offers/offerStatusResponse
This API is invoked by the lender and is the asynchronous response to Offer Status Request API
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822-d4bb-4eb1-9e1b-4996fbff8acb",
"orgId": "FIU123"
},
"loanApplications": [{
"loanApplicationId": "54947df8-0e9e-4471-a2f9-9af509fb5889",
"offers": [{
"id": "BKCCMSME10",
"collateralReference": [
"INVOICE_GSTN_INV2011"
],
"legalTerms": {
"type": "TEXT|URL",
"data": "<base64 encoded doc>"
},
"tenure": {
"value": "6",
"unit": "MONTH"
},
"validTill": "2018-12-06T11:39:57.153Z",
"amountType": "FIXED",
"offeredAmount": "30000",
"interestType": "FIXED",
"interestRate": "10",
"latePenalty": {
"penalRate": "5",
"penalAmount": "2000"
},
"earlyPenalty": {
"penalRate": "5",
"penalAmount": "2000"
},
"processingFee": "",
"repayment": {
"plans": [{
"id": "HDFCMSME10RP1",
"autoRepayment": "Y",
"scheduleType": "ONE TIME",
"frequency": "MONTHLY",
"firstPaymentDate": "2018-12-06",
"amount": "5000"
}],
"mandate": {
"amount": "3000",
"activeFrom": "",
"expiryDate": "",
"paymentInstrumentType": "EMANDATE",
"paymentInstrumentData": {
"destinationAccount": {
"type": "ACCOUNT",
"data": {
"accountIFSCCode": "IKCC0009",
"accountNumber":
}
},
"sourceAccount": {
"type": "ACCOUNT",
"data": {
"accountIFSCCode": "BKCC0009",
"accountNumber":
}
}
}
}
},
"disbursement": {
"plans": [{
"id": "HDFCMSME10DP1",
"autoDisbursement": "Y",
"scheduleType": "ONE TIME",
"firstPaymentDate": "2018-12-06",
"amount": "15000"
}],
"disbursementAccountDetails": {
"type": "ACCOUNT",
"data": {
"accountIFSCCode": "BKCC0009",
"accountNumber": "3232090999090"
}
}
}
}],
"status": "OFFERED",
"rejectionDetails": [],
"actionRequired": []
}]
}
```
# Offer Acceptance APIs
SMS Format for the OTP
{6Digit OTP} is the One Time Password (OTP) to complete the loan process with {Lender Name}.
Eg:
467866 is the One Time Password (OTP) to complete the loan process with Corporation Bank.
## Trigger Loan Acceptance Request
HTTP Verb - POST
API Endpoint - /v1/loan/triggerLoanAcceptanceRequest
This API is invoked by the LSP when the user agrees to the terms of the agreement. The Asynchronous response for this API should include the lender sending an OTP to the phone number associated with disbursement account.
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "LSP123"
},
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"loanApplicationIds": [
"e8cc6822bd4bbb4eb1b9e1b4996fbff8acb"
],
"credBlock": {
"type": "OTP",
"data": {
"appToken": "0aBCD7DMr7s"
}
}
}
```
## Trigger Loan Acceptance Response
HTTP Verb - POST
API Endpoint - /v1/loan/triggerLoanAcceptanceResponse
This API is invoked by the Lender when the Lender sends out an OTP to the phone number associated with the disbursement account. This API is an asynchronous response to the OTP trigger request by theLSP.
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "LSP123"
},
"response": {
"error": "0"
},
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"credBlock": {
"type": "OTP",
"data": {
"otpSessionKey": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"maskedPhoneNumber": "xxxxxx9090"
}
}
}
```
## Verify Loan Acceptance Request
HTTP Verb - POST
API Endpoint - /v1/loan/verifyLoanAcceptanceRequest
This API is invoked by the LSP when the user enters the OTP received on the mobile number associated with the disbursement account and agrees to the terms of the agreement. The asynchronous response for this API should include the lender acknowledging the receipt of OTP and verifying if the user has entered the correct OTP that was shared by the lender.
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "LSP123"
},
"requestId": "es1c6822bd4bbb4eb1b9e1b4996fbff8acb",
"credBlock": {
"type": "OTP",
"data": {
"otpSessionKey": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"otp": "689451"
}
}
}
```
## Verify Loan Acceptance response
HTTP Verb - POST
API Endpoint - /v1/loan/verifyLoanAcceptanceResponse
This API is invoked by the Lender when the OTP entered by the user is shared through the LSP. This API acknowledges the receipt of OTP and verifies if the user has entered the correct OTP that was shared by the lender on the mobile number associated with the disbursement account.
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "FIU123"
},
"response": {
"error": "0"
},
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acc",
"credBlock": {
"type": "OTP",
"data": {
"otpSessionKey": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"status": "SUCCESS"
}
}
}
```
# Grant loan APIs
# Grant Loan request
- HTTP Verb - POST
- API Endpoint - /v1/loan/grantLoanRequest
This API is invoked by the LSP once the borrower has agreed to the terms of the agreement, given consent for monitoring and set up a repayment option. This API creates the actual loan in the lender’s system.
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "LSP123"
},
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"loanApplicationId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb"
}
```
## Grant Loan Response
- HTTP Verb - POST
- API Endpoint - /v1/loan/grantLoanResponse
This method is called be the Lender when the Grant Loan processing is completed. This informs the borrower about the status of the loan in the lender system. Upon successful creation of loan in the system, the lender returns all the details of the loan.
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "FIU123"
},
"response": {
"error": "0"
},
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"loanId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"terms": {
"requestedAmount": "50000.00",
"currency": "INR",
"sanctionedAmount": "50000.00",
"interestType": "FIXED",
"interestRate": "12",
"interestAmount": "6000.00",
"totalAmount": "56000.00",
"tenure": {
"duration": "3",
"unit": "MONTH"
},
"legalAgreement": {
"type": "TEXT",
"data": "<Base64 Encoded Data>"
},
"charges": {
"prepayment": {
"chargeType": "RATE_BASED",
"description": "Description of charge calculation",
"data": {
"rate": "6",
"applicableParameter": "TOTAL_LOAN_AMOUNT"
}
},
"bounce": {
"chargeType": "FIXED_AMOUNT",
"description": "Description of charge calculation",
"data": {
"amount": "3000.00"
}
},
"latePayment": {
"chargeType": "FIXED_AMOUNT",
"description": "Description of charge calculation",
"data": {
"amount": "3000.00"
}
},
"processing": {
"chargeType": "FIXED_AMOUNT",
"description": "Description of charge calculation",
"data": {
"amount": "3000.00"
}
}
}
},
"disbursement": {
"plan": {
"id": "hb8c6822bd4bbb4eb1b9e1b4996fbff8acb",
"automatic": false,
"scheduleType": "ONE_TIME",
"noOfInstallments": "1",
"totalAmount": "10000.00",
"status": "ACTIVE"
},
"accountDetails": {
"accountDataType": "ACCOUNT",
"data": {
"accountType": "CURRENT",
"maskedAccountNumber": "XXXXXXXXX9090"
}
}
},
"repayment": {
"plan": {
"id": "a8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"automatic": false,
"scheduleType": "ONE_TIME",
"payNowAllowed": false,
"changeMethodAllowed": false,
"noOfInstallments": "1",
"principal": "9000.00",
"interestAmount": "1000.00",
"penalty": "0.00",
"totalAmount": "10000.00",
"status": "ACTIVE"
}
},
"loanStatus": "GRANTED"
}
```
## Loan Summary Request
- HTTP Verb - POST
- API Endpoint - /v1/loan/LoanSummaryRequest
This API is invoked by the LSP to get the summary of the loan as of the current date.
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "LSP123"
},
"requestId": "bvcc6822bd4bbb4eb1b9e1b4996fbff8acb",
"loanId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb"
}
```
## Loan summary response
- HTTP Verb - POST
- API Endpoint - /v1/loan/loanSummaryResponse
This method is called be the Lender as a response to Loan Summary Request.
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "FIU123"
},
"response": {
"error": "0"
},
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"loanId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"loanStatus": "GRANTED",
"createdDate": "2019-12-30T13:55:00Z",
"startDate": "2019-12-30T00:00:00Z",
"endDate": "2020-03-01T00:00:00Z",
"summary": {
"nextRepayment": {
"totalAmount": "5000.00",
"principal": "4000.00",
"interestAmount": "1000.00",
"penalty": "0.00",
"fee": "0.00",
"date": "2020-10-10",
"installmentNumber": "1"
},
"principalPaid": "10000.00",
"interestPaid": "100.00",
"penaltyPaid": "10.00",
"principalPending": "10000.00",
"interestPending": "100.00",
"amountDisbursed": "1000.00",
"amountRepaid": "1000.00",
"tenure": {
"duration": "3",
"unit": "MONTH"
},
"description": "short description for the loan"
}
}
```
## Get loan request
- HTTP Verb - POST
- API Endpoint - /v1/loan/getLoanRequest
This API is invoked by the LSP when the LSP wants to get the details of the loan.
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "LSP123"
},
"loanId": "e8cc6822d4bb4eb19e1b4996fbff8acb",
"requestId": "e8cc6822d4bb4eb19e1b4996fbff8acb"
}
```
## Get Loan response
- HTTP Verb - POST
- API Endpoint - /v1/loan/getLoanResponse
This method is called by the Lender and it returns all the details of the loan.
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "FIU123"
},
"response": {
"error": "0"
},
"loanId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"loanStatus": "GRANTED",
"createdDate": "2019-12-30T13:55:00Z",
"startDate": "2019-12-30T00:00:00Z",
"endDate": "2020-03-01T00:00:00Z",
"type": "CASHFLOW",
"borrower": {
"primaryId": "CPAA1234A",
"primaryIdType": "PAN",
"additionalIdentifiers": [],
"name": "John doe",
"category": "ORGANISATION",
"contactDetails": [
{
"type": "PRIMARY",
"phone": "7777777777",
"email": "johndoe@defenterprises",
"address": {
"co": "<care of>",
"hba": "<House/Building/Apartment>",
"srl": "<Street/Road/Lane>",
"landmark": "",
"als": "<Area/Locality/Sector>",
"vtc": "<Village/Town/City>",
"pincode": "",
"po": "",
"district": "",
"state": "",
"country": "",
"uri": "<digital address>",
"latitude": "",
"longitude": ""
}
}
],
"documents": []
},
"collaterals": [
{
"collateralPrimaryId": "<GSTIN>_<INVOICENUM>",
"collateralPrimaryIdType": "GST_INVOICE",
"type": "GST_INVOICE",
"additionalIdentifiers": [],
"valuation": {
"value": "",
"currency": "",
"date": "",
"source": "GSTN"
},
"parties": [],
"documents": []
}
],
"guarantors": [],
"applicants": [
{
"primaryId": "9898989898",
"primaryIdType": "MOBILE"
}
],
"terms": {
"requestedAmount": "50000.00",
"currency": "INR",
"sanctionedAmount": "50000.00",
"interestType": "FIXED",
"interestRate": "12.00",
"interestAmount": "6000.00",
"totalAmount": "56000.00",
"tenure": {
"duration": "3",
"unit": "MONTH"
},
"legalAgreement": {
"type": "TEXT",
"data": "<Base64 Encoded Data>"
},
"charges": {
"prepayment": {
"chargeType": "RATE_BASED",
"description": "Description of charge calculation",
"data": {
"rate": "6",
"applicableParameter": "TOTAL_LOAN_AMOUNT"
}
},
"bounce": {
"chargeType": "FIXED_AMOUNT",
"description": "Description of charge calculation",
"data": {
"amount": "3000.00"
}
},
"latePayment": {
"chargeType": "FIXED_AMOUNT",
"description": "Description of charge calculation",
"data": {
"amount": "3000.00"
}
},
"processing": {
"chargeType": "FIXED_AMOUNT",
"description": "Description of charge calculation",
"data": {
"amount": "3000.00"
}
}
}
},
"disbursement": {
"plan": {
"id": "hb8c6822bd4bbb4eb1b9e1b4996fbff8acb",
"automatic": false,
"scheduleType": "ONE_TIME",
"noOfInstallments": "1",
"totalAmount": "10000.00",
"status": "ACTIVE"
},
"accountDetails": {
"accountDataType": "ACCOUNT",
"data": {
"accountType": "CURRENT",
"maskedAccountNumber": "XXXXXXXXX9090"
}
}
},
"repayment": {
"plan": {
"id": "a8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"automatic": false,
"scheduleType": "ONE_TIME",
"payNowAllowed": false,
"changeMethodAllowed": false,
"noOfInstallments": "1",
"principal": "9000.00",
"interestAmount": "1000.00",
"penalty": "0.00",
"totalAmount": "10000.00",
"status": "ACTIVE"
},
"method": {
"type": "EMANDATE_UPI",
"status": "ACTIVE",
"data": {
"refNumber": "Ref1234",
"amount": "50000.00",
"amountType": "MAX",
"activeFrom": "10-03-2020",
"expiryDate": "10-09-2020",
"destinationAccount": {
"accountDataType": "ACCOUNT",
"data": {
"accountType": "CURRENT",
"maskedAccountNumber": "XXXXXXXX9090"
}
},
"sourceAccount": {
"accountDataType": "VPA",
"data": {
"accountType": "CURRENT",
"maskedAccountNumber": "XXXXXXXX9090"
}
}
}
}
}
}
```
## Loan statement request
- HTTP Verb - POST
- API Endpoint - /v1/loan/loanStatementRequest
This method is called be the LSP to get the account statement for the loan for a specified period. If the start and end dates are blank, it will return the entire Loan Statement
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "LSP123"
},
"requestId": "e8cc6822-d4bb-4eb1-9e1b-4996fbff8acb",
"loanId": "e8cc6822-d4bb-4eb1-9e1b-4996fbff8acb"
}
```
## Loan statement response
This method is called be the Lender to return the loan account statement back to the LSP
- HTTP Verb - POST
- API Endpoint - /v1/loan/loanStatementResponse
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "FIU123"
},
"response": {
"error": "0"
},
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"loanId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"accountStatement": [
{
"date": "25-01-2020",
"narration": "Repayment of Loan no : xxxxxxx9090",
"txnRefNo": "004618602124",
"amount": "50000.00",
"type": "DEPOSIT",
"closingBalance": "50000.00"
}
]
}
```
# Repayments
The Repayment APIs between LSP and Lender has been standardized. The basic expectations from the APIs are the below
- When the lender returns an offer, a list of repayment plans should be provided which include the details about the schedule/when the repayments can be made.
- The Borrower chooses a repayment plan upon which setRepaymentPlanRequest is called. The lender returns a payment page url as part of the response to setRepaymentPlan. This url will be loaded by the LSP inside the app which would show the kinds of payment methods that the lender supports for the chosen repayment plan.
- The Borrower can choose a method on the payment page provided by the lender. In case of E-MANDATE, this will be a one-time e-mandate which the borrower can initiate by entering his vpa details. Post this, the lender will trigger a request to the PSP associated with the vpa for getting the authorization from the borrower. Post successful authorization, e-mandate becomes active and the repayment plan is also considered to be ACTIVE.
- When the repayment is to be initiated, by an option other than e-mandate, the user will be taken to the payment page from where he can choose a payment method and make the payment.
## Get Repayment Plans Request
- HTTP Verb - POST
- API Endpoint - /v1/repayment/getRepaymentPlansRequest
This API is used to get the list of repayment plans provided by the lender for a particular loan.
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "LSP123"
},
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"loanId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb"
}
```
## Get repayment plans response
- HTTP Verb - POST
- API Endpoint - /v1/repayment/getRepaymentPlansResponse
This API is invoked by the lender to the LSP returning the list of Repayment plans available for a particular loan.
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "LSP123"
},
"response": {
"error": "0"
},
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"plans": [
{
"id": "a8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"automatic": false,
"scheduleType": "ONE_TIME",
"payNowAllowed": false,
"changeMethodAllowed": false,
"noOfInstallments": "1",
"totalAmount": "10000.00",
"title": "Title of the repayment plan",
"shortDescription": "short description of repayment plan",
"url": "lender url showing repayment details"
},
{
"id": "hb8c6822bd4bbb4eb1b9e1b4996fbff8acb",
"automatic": false,
"scheduleType": "ONE_TIME",
"payNowAllowed": false,
"changeMethodAllowed": false,
"noOfInstallments": "1",
"totalAmount": "10000.00",
"title": "Title of the repayment plan",
"shortDescription": "short description of repayment plan",
"url": "lender url showing repayment details"
}
]
}
```
## Reconcile Repayment Request
HTTP Verb - POST
API Endpoint - /v1/repayment/reconcileRepaymentRequest
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822-d4bb-4eb1-9e1b-4996fbff8acb",
"orgId": "LSP123"
},
"loanId": "354c6822-d4bb-4eb1-9e1b-4996fbff8acb",
"type": "IMPS",
"data": {
"transactionReference": "Tx12120",
"accountNo": "3232090999090",
"IFSCCode": "BKCC0009"
},
"amount": "1550.00",
"installmentNumber": "5"
}
```
## Set Repayment Plan Request
- HTTP Verb - POST
- API Endpoint - /v1/repayment/setRepaymentPlanRequest
This API is invoked by the LSP to inform the lender system about the details of the repayment plan that will be used by the borrower. The LSP will need to send either the LoanId or the LoanApplicationId as the case might be.
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "LSP123"
},
"loanApplicationId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"plan": {
"id": "z8cc6822bd4bbb4eb1b9e1b4996fbff8acb"
}
}
```
## Set Repayment Plan Response
- HTTP Verb - POST
- API Endpoint - /v1/repayment/setRepaymentPlanResponse
This API is invoked by the lender to the LSP giving the payment url where he can enter details of repayment.
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "LSP123"
},
"response": {
"error": "0"
},
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"plan": {
"id": "z8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"paymentUrl": "https://abcbank.in/z8cc6822bd4bbb4eb1b9e1b4996fbff8acb"
}
}
```
## Set Repayment Plan Status Request
- HTTP Verb - POST
- API Endpoint - /v1/repayment/setRepaymentPlanStatusRequest
This API is used by LSP to check the status of a previously initiated set repayment plan request. This API is called once the payment page of the lender is loaded and the borrower choses a repayment method associated with the chosen repayment plan.
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "LSP123"
},
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8aca",
"plan": {
"id": "z8cc6822bd4bbb4eb1b9e1b4996fbff8acb"
}
}
```
## Set Repayment Plan Status Response
- HTTP Verb - POST
- API Endpoint - /v1/repayment/setRepaymentPlanStatusResponse
This API is used by lenders to inform LSP about the status of a previously initiated set Repayment.The API returns the status of the repayment plan that the borrower has chosen. In case, the borrower has chosen e-mandate as the repayment method in payment page url, the status of the repayment plan becomes ACTIVE only after successful authorization of the e-mandate on the PSP by borrower.
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "LSP123"
},
"response": {
"error": "0"
},
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"plan": {
"id": "a8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"automatic": false,
"scheduleType": "ONE_TIME",
"payNowAllowed": false,
"changeMethodAllowed": false,
"noOfInstallments": "1",
"totalmount": "10000.00",
"status": "ACTIVE"
}
}
```
## Trigger Repayment Request
- HTTP Verb - POST
- API Endpoint - /v1/repayment/triggerRepaymentRequest
This API is invoked by the LSP to inform the lender to trigger a repayment.
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "LSP123"
},
"loanId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb"
}
```
## Trigger Repayment Response
- HTTP Verb - POST
- API Endpoint - /v1/repayment/triggerRepaymentResponse
This API is invoked by the lender to the LSP giving the lender payment page url from where the borrower can make the payment. Lender also generates an id for the payment which become the reference for LSP to check the status of repayment.
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "FIU123"
},
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"payment": {
"id": "hhcc6822bd4bbb4eb1b9e1b4996fbff8acb",
"status": "PENDING_AUTH",
"paymentUrl": "https://abcbank.in/hhcc6822bd4bbb4eb1b9e1b4996fbff8acb"
}
}
```
## Trigger Repayment Status Request
- HTTP Verb - POST
- API Endpoint - /v1/repayment/triggerRepaymentStatusRequest
This API is used by LSP to check the status of a previously initiated repayment transaction.
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "FIU123"
},
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8adf",
"payment": {
"id": "e8cc6822bd4bbb4eb1b9e1b4996fbff8adf"
}
}
```
## Trigger Repayment Status Response
- HTTP Verb - POST
- API Endpoint - /v1/repayment/triggerRepaymentStatusResponse
This API is used by lender to inform LSP about the status of a previously initiated repayment.
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "FIU123"
},
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"payment": {
"id": "e8cc6822bd4bbb4eb1b9e1b4996fbff8adf",
"totalAmount": "5000.00",
"date": "2020-10-10",
"status": "SUCCESS",
"installmentNumber": "1",
"txnRefNo": "004618602124"
}
}
```
# Disbursement API
Disbursement includes 2 main objects. A disbursement plan which specifies the specifics of when disbursement will be carried out and disbursement account which indicates where the loan disbursement will be carried out.
## Get Disbursement Plans Request
- HTTP Verb - POST
- API Endpoint - /v1/disbursement/getDisbursementPlansRequest
This API is invoked by the LSP to get the list of disbursement plans provided by the lender for the loan
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "LSP123"
},
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"loanId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb"
}
```
## Get Disbursement Plans Response
- HTTP Verb - POST
- API Endpoint - /v1/disbursement/getDisbursementPlansResponse
This API is invoked by the lender to inform the LSP about the list of disbursement plans available for the loan
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "LSP123"
},
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"response": {
"error": "0"
},
"plans": [
{
"id": "a8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"automatic": false,
"scheduleType": "ONE_TIME",
"noOfInstallments": "1",
"totalAmount": "10000.00"
},
{
"id": "hb8c6822bd4bbb4eb1b9e1b4996fbff8acb",
"automatic": false,
"scheduleType": "ONE_TIME",
"noOfInstallments": "1",
"totalAmount": "10000.00"
}
]
}
```
## Set Disbursement Plan Request
- HTTP Verb - POST
- API Endpoint - /v1/disbursement/setDisbursementPlanRequest
This API is invoked by the LSP to inform the lender about the disbursement plan that the borrower has chosen.
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "LSP123"
},
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"loanApplicationId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"plan": {
"id": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb"
}
}
```
## Set Disbursement Plan Response
- HTTP Verb - POST
- API Endpoint - /v1/disbursement/setDisbursementPlanResponse
This API is invoked by the lender to inform the LSP about the current status of the chosen Disbursement Plan
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "FIU123"
},
"response": {
"error": "0"
},
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"plan": {
"id": "a8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"automatic": false,
"scheduleType": "ONE_TIME",
"noOfInstallments": "1",
"totalAmount": "10000.00",
"status": "ACTIVE"
}
}
```
## Trigger Disbursement Request
- HTTP Verb - POST
- API Endpoint - /v1/disbursement/triggerDisbursementRequest
This API is to be used when the user wants the money to be disbursed immediately.
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "LSP123"
},
"loanId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"payment": {
"useSavedPaymentOption": true
}
}
```
## Trigger Disbursement Response
- HTTP Verb - POST
- API Endpoint - /v1/disbursement/TriggerDisbursementResponse
This API is invoked by the lender to inform the status of the disbursement request.
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "FIU123"
},
"response": {
"error": "0"
},
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"payment": {
"totalAmount": "5000.00",
"date": "2020-10-10",
"status": "SUCCESS",
"installmentNumber": "1",
"txnRefNo": "004618602124"
}
}
```
# Loan Dispute Management APIs
## Raise Dispute Request
- HTTP Verb - POST
- API Endpoint - /v1/loan/dispute/raiseDisputeRequest
This API is invoked by the LSP to create a dispute in the lender system for an issue that is faced by the borrower.
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "LSP123"
},
"loanId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"dispute": {
"description": "Amount not disbursed to the account yet"
}
}
```
## Raise Dispute Response
This method is invoked by the lender once the Raise Dispute processing is done.
- HTTP Verb - POST
- API Endpoint - /v1/loan/dispute/raiseDisputeResponse
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "FIU123"
},
"response": {
"error": "0"
},
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"dispute": {
"id": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"status": "NEED_MORE_INFO",
"url": "URL where dispute progress can be tracked"
}
}
```
## Dispute Status Request
- HTTP Verb - POST
- API Endpoint - /v1/loan/dispute/disputeStatusRequest
This API is invoked by the LSP to check the status of the dispute.
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "LSP123"
},
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"dispute": {
"id": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb"
}
}
```
## Dispute Status Response
This API is invoked by the lender to inform the LSP regarding the status of the dispute.
- HTTP Verb - POST
- API Endpoint - /v1/loan/dispute/disputeStatusResponse
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "FIU123"
},
"response": {
"error": "0"
},
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"dispute": {
"id": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"status": "CLOSED"
}
}
```
# Meta APIs
## Get Lookups Request
- HTTP Verb - POST
- API Endpoint - /v1/meta/lookup/getLookupCodesRequest
This API is used to get the list of possible values for ENUM fields. There will be lookup codes and lookupTypes. Searching by a lookupType will return a set of lookupcodes for the type.
For example : loanStatus will be a lookupType and the associated lookupCodes will be - `PROCESSING | OFFERED | GRANTED | REJECTED| ACTION_REQUIRED`
This API can be hosted as a service in some central website and can be accessed on a need basis. The data will be fetched and stored in a local DB by the LSP. The local DB can be refreshed with data from the service API periodically
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "LSP123"
},
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"lookupType": "LOAN_STATUS"
}
```
## Get Lookups Response
- HTTP Verb - POST
- API Endpoint - /v1/meta/lookup/getLookupCodesRequest
This API is invoked by the central service hosting server as an async response to Get Lookups request raised by LSP server
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "LSP123"
},
"response": {
"error": "0"
},
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"lookupType": "LOAN_STATUS",
"lookupCodes": [
"PROCESSING",
"OFFERED",
"GRANTED",
"REJECTED",
"ACTION_REQUIRED"
]
}
```
## Get Error Code Request
- HTTP Verb - POST
- API Endpoint - /v1/meta/lookup/getErrorCodesRequest
This API is called to get the standard error codes.
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "LSP123"
},
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"lookupType": "LOAN_STATUS"
}
```
## Get Error Code Response
- HTTP Verb - POST
- API Endpoint - /v1/meta/lookup/getErrorCodesResponse
This API returns all the error codes
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "LSP123"
},
"response": {
"error": "0"
},
"requestId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"errorCodes": [
{
"code": "UDR180",
"description": "Invalid Dispute Id"
}
]
}
```
## Heartbeat
HTTP Verb - Get
API Endpoint - /v1/heartbeat
Synchronous API
Request Parameters - None
Response
```
{
"metadata": {
"version": "1.0",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"orgId": "LSP123"
},
"response": {
"error": "0"
},
"status": "SUCCESS"
}
```
# Non functional requirements
<table>
<tbody>
<tr>
<td><strong>API</strong></td>
<td><strong>SLA (seconds)</strong></td>
<td><strong>Timeouts</strong></td>
<td><strong>Throughput</strong></td>
</tr>
<tr>
<td>
<div class="page" title="Page 144">
<div class="section">
<div class="layoutArea">
<div class="column">
<p>createLoanApplicationRequest - createLoanApplicationResponse</p>
</div>
</div>
</div>
</div>
</td>
<td><1</td>
<td> 1</td>
<td>100 TPS</td>
</tr>
<tr>
<td>
<div class="page" title="Page 144">
<div class="section">
<div class="layoutArea">
<div class="column">
<p>consentHandleRequest - consentHandleResponse</p>
</div>
</div>
</div>
</div>
</td>
<td><2</td>
<td> 4</td>
<td>100 TPS</td>
</tr>
<tr>
<td>
<div class="page" title="Page 144">
<div class="section">
<div class="layoutArea">
<div class="column">
<p>consentStatusRequest - consentStatusResponse</p>
</div>
</div>
</div>
</div>
</td>
<td>
<div class="page" title="Page 144">
<div class="section">
<div class="layoutArea">
<div class="column">
<p><2</p>
</div>
</div>
</div>
</div>
</td>
<td>4 </td>
<td>100 TPS</td>
</tr>
<tr>
<td>
<div class="page" title="Page 144">
<div class="section">
<div class="layoutArea">
<div class="column">
<p>generateOffersRequest - generateOffersResponse</p>
</div>
</div>
</div>
</div>
</td>
<td>
<div class="page" title="Page 144">
<div class="section">
<div class="layoutArea">
<div class="column">
<p><10</p>
</div>
</div>
</div>
</div>
</td>
<td> 15</td>
<td>100 TPS</td>
</tr>
<tr>
<td>
<div class="page" title="Page 144">
<div class="section">
<div class="layoutArea">
<div class="column">
<p>triggerOTPRequest - triggerOTPResponse</p>
</div>
</div>
</div>
</div>
</td>
<td><1</td>
<td> 1</td>
<td> 50 TPS</td>
</tr>
<tr>
<td>
<div class="page" title="Page 144">
<div class="section">
<div class="layoutArea">
<div class="column">
<div class="page" title="Page 144">
<div class="section">
<div class="layoutArea">
<div class="column">
<p>verifyOTPRequest - verifyOTPResponse</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</td>
<td><1</td>
<td> 1</td>
<td> 50 TPS</td>
</tr>
<tr>
<td>
<div class="page" title="Page 144">
<div class="section">
<div class="layoutArea">
<div class="column">
<p>grantLoanRequest - grantLoanResponse</p>
</div>
</div>
</div>
</div>
</td>
<td> <10</td>
<td> 15</td>
<td> 50 TPS</td>
</tr>
<tr>
<td>
<div class="page" title="Page 144">
<div class="section">
<div class="layoutArea">
<div class="column">
<p>triggerDisbursementRequest - triggerDisbursementResponse</p>
</div>
</div>
</div>
</div>
</td>
<td><5 </td>
<td> NA</td>
<td> 50 TPS</td>
</tr>
</tbody>
</table>
# Domain Object Specification
### Metadata
```
{
"version": "1.0",
"orgId": "LSP123",
"timestamp": "2018-12-06T11:39:57.153Z",
"traceId": "e8cc6822-d4bb-4eb1-9e1b-4996fbff8acb"
}
```
### Purpose
```
{
"loanType": "CASHFLOW",
"desciption": "Description on why the borrower is borrowing"
}
```
### Borrower
Data section of borrrowers captures the data from Search Tax payer API. The schema for GSTN profile can be found in the Search Tax Payer API published in
https://developer.gst.gov.in/apiportal/common/others
```
{
"primaryId": "CPAA1234A",
"primaryIdType": "PAN",
"additionalIdentifiers": [],
"name": "John doe",
"category": "ORGANIZATION",
"contactDetails": [
{
"type": "PRIMARY",
"phone": "7777777777",
"email": "johndoe@defenterprises",
"address": {
"co": "<care of>",
"hba": "<House/Building/Apartment>",
"srl": "<Street/Road/Lane>",
"landmark": "",
"als": "<Area/Locality/Sector>",
"vtc": "<Village/Town/City>",
"pincode": "",
"po": "",
"district": "",
"state": "",
"country": "",
"uri": "<digital address>",
"latitude": "",
"longitude": ""
}
}
],
"documents": []
}
```
### Applicant
```
{
"primaryId": "<PAN NO.>",
"primaryIdType": "PAN | <SOME VALID REGISTRY>",
"additionalIdentifiers": [
{
"key": "",
"value": ""
}
],
"name": "",
"category": "ORGANISATION | INDIVIDUAL",
"relationshipWithBorrower": "",
"contactDetails": [
{
"type": "PRIMARY | OTHER",
"phone": "",
"email": "",
"address": {
"hba": "<House/Building/Apartment>",
"srl": "<Street/Road/Lane>",
"landmark": "",
"als": "<Area/Locality/Sector>",
"vtc": "<Village/Town/City>",
"pincode": "",
"po": "",
"district": "",
"state": "",
"country": "",
"uri": "<digital address>",
"latitude": "",
"longitude": ""
}
}
],
"documents": [
{
"format": "PDF/EXCEL/PNG/JSON",
"reference": "3c986a71-15c2-46a3-bf20-810ed203e06d",
"source": "FIP | USER ",
"sourceIdentifier": "",
"type": "PAN | AADHAAR | DRIVING_LICENSE | PASSPORT",
"isDataInline": "true/false",
"data": "<Base64 encoded data>"
}
]
}
```
### Lender
```
{
"primaryId": "AWWPA7645M",
"primaryIdType": "PAN",
"additionalIdentifiers": [],
"name": "ABC Bank",
"category": "ORGANIZATION",
"contactDetails": [
{
"co": "<care of>",
"type": "PRIMARY",
"phone": "8888888888",
"email": "abc@abcbank",
"address": {
"hba": "<House/Building/Apartment>",
"srl": "<Street/Road/Lane>",
"landmark": "",
"als": "<Area/Locality/Sector>",
"vtc": "<Village/Town/City>",
"pincode": "",
"po": "",
"district": "",
"state": "",
"country": "",
"uri": "<digital address>",
"latitude": "",
"longitude": ""
}
}
],
"documents": []
}
```
### ContactDetails
```
{
"type": "PRIMARY",
"phone": "7777777777",
"email": "johndoe@defenterprises",
"address": {
"co": "<Care of>",
"hba": "<House/Building/Apartment>",
"srl": "<Street/Road/Lane>",
"landmark": "",
"als": "<Area/Locality/Sector>",
"vtc": "<Village/Town/City>",
"pincode": "",
"po": "",
"district": "",
"state": "",
"country": "",
"uri": "<digital address>",
"latitude": "",
"longitude": ""
}
}
```
### AdditionalIdentifier
```
{
"id": "123488888888",
"type": "AADHAAR"
}
```
### Address
```
{
"hba": "<House/Building/Apartment>",
"srl": "<Street/Road/Lane>",
"landmark": "",
"als": "<Area/Locality/Sector>",
"vtc": "<Village/Town/City>",
"pincode": "",
"po": "",
"district": "",
"state": "",
"country": "",
"uri": "<digital address>",
"latitude": "",
"longitude": ""
}
```
### Document
```
{
"source": "GSTN",
"sourceIdentifier": "GSTN",
"format": "JSON",
"reference": "docref12",
"type": "GST_PROFILE",
"isDataInline": true,
"data": "eyJzdGpDZCI6IkFQMDAzIiwibGdubSI6Ik1TIENPUlBPUkFUSU9OIiwic3RqIjoiQkNQI EtPRElLT05EQSIsImR0eSI6IlJlZ3VsYXIiLCJjeGR0IjoiIiwiZ3N0aW4iOiIwNUFCTlR ZMzI5MFA4WkEiLCJuYmEiOlsiQm9uZGVkIFdhcmVob3VzZSIsIkVPVSAvIFNUUCAvIEVIV FAiLCJGYWN0b3J5IC8gTWFudWZhY3R1cmluZyIsIklucHV0IFNlcnZpY2UgRGlzdHJpYnV0b3IgKElTRCkiLCJMZWFzaW5nIEJ1c2luZXNzIl0sImxzdHVwZHQiOiIwNS8wMS8yMDE3I iwicmdkdCI6IjA1LzA1LzIwMTciLCJjdGIiOiJGb3JlaWduIExMUCIsInN0cyI6IlByb3Z pc2lvbmFsIiwiY3RqQ2QiOiJBUDAwNCIsImN0aiI6IkJDUCBUSFVNTUFLVU5UQSIsInRyY WRlTmFtIjoiQUxUT04gUExBU1RJQyBQUklWQVRFIExURCIsImFkYWRyIjpbeyJhZGRyIjp 7ImJubSI6IkVMUEhJTlNUT05FIEJVSUxESU5HIiwic3QiOiIxMCwgVkVFUiBOQVJJTUFOI FJPQUQiLCJsb2MiOiJGT1JUIiwiYm5vIjoiMTAiLCJzdGNkIjoiUmFqYXN0aGFuIiwiZmx ubyI6IjFTVCBGTE9PUiIsImx0IjoiNzQuMjE3OSIsImxnIjoiMjcuMDIzOCIsInBuY2QiO iI0MDAwMDEifSwibnRyIjpbIldob2xlc2FsZSBCdXNpbmVzcyJdfV0sInByYWRyIjp7ImF kZHIiOnsiYm5tIjoiS0FUR0FSQSBIT1VTRSIsInN0IjoiMTUsIEwgSkFHTU9IQU5EQVMgT UFSRyIsImxvYyI6Ik1BTEFCQVIgSElMTCIsImJubyI6IjUiLCJzdGNkIjoiTWFoYXJhc2h 0cmEiLCJmbG5vIjoiNFRIIEZMT09SIiwibHQiOiI3NC4yMTc5IiwibGciOiIyNy4wMjM4I iwicG5jZCI6IjQwMDAwNiJ9LCJudHIiOlsiV2hvbGVzYWxlIEJ1c2luZXNzIl19fQ"
}
```
### Collateral
This blick describes the credit instruments that you are using tio raise a loan request. In invoice financing, this block will capture invoices. For taking a loan against a house, this block will have home registration document details.
```
{
"collateralPrimaryId": "INVOICE_<GSTIN>_<INVOICENUM>",
"collateralPrimaryIdType": "GST_INVOICE | VIN <SOME VALID REGISTRY>",
"additionalIdentifiers": [
{
"key": "",
"value": ""
}
],
"valuation": {
"value": "",
"currency": "",
"date": "",
"source": "GSTN"
},
"parties": [
{
"primaryId": "<PAN NO.>",
"primaryIdType": "PAN | <SOME VALID REGISTRY>",
"additionalIdentifiers": [
{
"key": "",
"value": ""
}
],
"name": "",
"category": "ORGANISATION | INDIVIDUAL",
"relationshipWithCollateral": "",
"contactDetails": [
{
"type": "PRIMARY | OTHER",
"phone": "",
"email": "",
"address": {
"hba": "<House/Building/Apartment>",
"srl": "<Street/Road/Lane>",
"landmark": "",
"als": "<Area/Locality/Sector>",
"vtc": "<Village/Town/City>",
"pincode": "",
"po": "",
"district": "",
"state": "",
"country": "",
"uri": "<digital address>",
"latitude": "",
"longitude": ""
}
}
],
"documents": [
{
"format": "JSON",
"reference": "3c986a71-15c2-46a3-bf20-810ed203e06d",
"source": "FIP | USER ",
"sourceIdentifier": "",
"type": "",
"isDataInline": true,
"data": "<Base64 encoded data>"
}
]
}
],
"type": "GST_INVOICE",
"documents": [
{
"format": "JSON",
"reference": "3c986a71-15c2-46a3-bf20-810ed203e06d",
"source": "GSTN",
"sourceIdentifier": "GSTN",
"type": "GSTN_B2B_INVOICE",
"isDataInline": true,
"data": "eyJjdGluIjoiMDFBQUJDRTIyMDdSMVo1IiwiY2ZzIjoiWSIsImludiI6W3siY2hrc3VtI joiQkJVSUJVSVVJSktLQkpLR1VZRlRGR1VZIiwidXBkYnkiOiJTIiwiaW51bSI6IlMwMDg 0MDAiLCJpZHQiOiIyNC0xMS0yMDE2IiwidmFsIjo3MjkyNDguMTYsInBvcyI6IjA2Iiwic mNocmciOiJOIiwiZXRpbiI6IjAxQUFCQ0U1NTA3UjFaNCIsImludl90eXAiOiJSIiwiY2Z sYWciOiJOIiwiZGlmZl9wZXJjZW50IjowLjY1LCJvcGQiOiIyMDE2LTEyIiwiaXRtcyI6W 3sibnVtIjoxLCJpdG1fZGV0Ijp7InJ0Ijo1LCJ0eHZhbCI6MTAwMDAsImlhbXQiOjMyNSw iY2FtdCI6MCwic2FtdCI6MCwiY3NhbXQiOjEwfX1dfV19"
}
]
}
```
### Valuation
```
{
"value": "20000",
"currency": "INR",
"date": "2018-12-06",
"source": "GSTN"
}
```
### Party
```
{
"primaryId": "<PAN NO.>",
"primaryIdType": "PAN",
"additionalIdentifiers": [
{
"key": "",
"value": ""
}
],
"name": "",
"category": "INDIVIDUAL",
"relationshipWithCollateral": "",
"contactDetails": [
{
"type": "PRIMARY | OTHER",
"phone": "",
"email": "",
"address": {
"hba": "<House/Building/Apartment>",
"srl": "<Street/Road/Lane>",
"landmark": "",
"als": "<Area/Locality/Sector>",
"vtc": "<Village/Town/City>",
"pincode": "",
"po": "",
"district": "",
"state": "",
"country": "",
"uri": "<digital address>",
"latitude": "",
"longitude": ""
}
}
],
"documents": [
{
"format": "PNG",
"reference": "3c986a71-15c2-46a3-bf20-810ed203e06d",
"source": "USER",
"sourceIdentifier": "USER",
"type": "PAN",
"isDataInline": true,
"data": "<Base64 encoded data>"
}
]
}
```
### Charges
```
{
"prepayment": {
"chargeType": "RATE_BASED",
"data": {
"rate": "6",
"applicableParameter": "TOTAL_LOAN_AMOUNT"
}
},
"bounce": {
"chargeType": "FIXED_AMOUNT",
"data": {
"amount": "3000.00"
}
},
"latePayment": {
"chargeType": "FIXED_AMOUNT",
"data": {
"amount": "3000.00"
}
},
"processing": {
"chargeType": "FIXED_AMOUNT",
"data": {
"amount": "3000.00"
}
}
}
```
### ChargeDetails
```
{
"chargeType": "RATE_BASE",
"data": {
"rate": "6",
"applicableParameter": "TOTAL_LOAN_AMOUNT"
}
}
```
### Charges
```
{
"requestedAmount": "50000.00",
"currency": "INR",
"sanctionedAmount": "5000.00",
"interestType": "FIXED",
"interestRate": "6.50",
"tenure": {
"duration": "3",
"unit": "MONTH"
},
"legalAgreement": {
"type": "TEXT",
"data": "<Base64 Encoded Data>"
},
"documents": [],
"charges": {
"prepayment": {
"type": "RATE_BASED",
"rate": "6.00",
"applicableParameter": "TOTAL_LOAN_AMOUNT"
},
"bounce": {
"type": "FIXED_AMOUNT",
"amount": "3000.00"
},
"latePayment": {
"type": "FIXED_AMOUNT",
"amount": "3000.00"
},
"processing": {
"type": "FIXED_AMOUNT",
"amount": "3000.00"
}
}
}
```
### ChargeDetails
```
{
"chargeType": "RATE_BASE",
"data": {
"rate": "6",
"applicableParameter": "TOTAL_LOAN_AMOUNT"
}
}
```
### Loan details
```
{
"requestedAmount": "50000.00",
"currency": "INR",
"sanctionedAmount": "5000.00",
"interestType": "FIXED",
"interestRate": "6.50",
"tenure": {
"duration": "3",
"unit": "MONTH"
},
"legalAgreement": {
"type": "TEXT",
"data": "<Base64 Encoded Data>"
},
"documents": [],
"charges": {
"prepayment": {
"type": "RATE_BASED",
"rate": "6.00",
"applicableParameter": "TOTAL_LOAN_AMOUNT"
},
"bounce": {},
"latePayment": {
"type": "FIXED_AMOUNT",
"amount": "3000.00"
},
"processing": {
"type": "FIXED_AMOUNT",
"amount": "3000.00"
}
}
}
```
### LoanAgreement
```
{
"type": "TEXT/URL",
"data": "base64 encoded data or URL"
}
```
### CreditScoreType
```
{
"value": 800,
"sourceType": "LSP",
"source": "SWIGGY"
}
```
### Guarantors
```
{
"primaryId": "CPAA1234A",
"primaryIdType": "PAN",
"additionalIdentifiers": [],
"name": "John doe",
"relationshipWithBorrower": "Father",
"category": "ORGANIZATION",
"contactDetails": [
{
"type": "PRIMARY",
"phone": "7777777777",
"email": "johndoe@defenterprises",
"address": {
"co": "<care of>",
"hba": "<House/Building/Apartment>",
"srl": "<Street/Road/Lane>",
"landmark": "",
"als": "<Area/Locality/Sector>",
"vtc": "<Village/Town/City>",
"pincode": "",
"po": "",
"district": "",
"state": "",
"country": "",
"uri": "<digital address>",
"latitude": "",
"longitude": ""
}
}
],
"documents": []
}
```
### RejectionDetail
```
{
"reason": "LOW_CREDIT_SCORE",
"description": "Credit score below 600"
}
```
### Reference
This object is used when a reference needs to be made to another object that is send as part of the request/response.
For example. when the lender sends an action required block, it might refer to a document in the documents section.
```
{
"object": "documents",
"value": "INVOICE_GSTN_INV2011"
}
```
### actionRequired
```
{
"actionType": "ADD_DOCUMENT",
"description": "DL Number not visible",
"reference": {
"object": "documents",
"value": "DL"
}
}
```
### Offer
```
{
"id": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"validTill": "2018-12-06T00:00:00.000Z",
"terms": {
"requestedAmount": "50000.00",
"currency": "INR",
"sanctionedAmount": "50000.00",
"interestType": "FIXED",
"interestRate": "6.00",
"tenure": {
"duration": "3",
"unit": "MONTH"
},
"legalAgreement": {
"type": "TEXT",
"data": "<Base64 Encoded Data>"
},
"charges": {
"prepayment": {
"chargeType": "RATE_BASED",
"data": {
"rate": "6.00",
"applicableParameter": "TOTAL_LOAN_AMOUNT"
}
},
"bounce": {
"chargeType": "FIXED_AMOUNT",
"data": {
"amount": "3000.00"
}
},
"latePayment": {
"chargeType": "FIXED_AMOUNT",
"data": {
"amount": "3000.00"
}
},
"processing": {
"chargeType": "FIXED_AMOUNT",
"data": {
"amount": "3000.00"
}
}
}
},
"disbursement": {
"plans": [
{
"id": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"autoDisbursement": false,
"scheduleType": "ONE_TIME",
"amount": "10000.00"
}
],
"accountDetails": {
"accountDataType": "ACCOUNT",
"data": {
"accountType": "CURRENT",
"maskedAccountNumber": "XXXXXXXXX9090"
}
}
},
"repayment": {
"plans": [
{
"id": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"autoRepayment": "Y",
"scheduleType": "ONE_TIME",
"amount": "10000.00"
}
],
"methods": [
{
"type": "EMANDATE_UPI",
"data": {
"refNumber": "",
"amount": "50000.00",
"amountType": "MAX",
"activeFrom": "2020-01-01",
"expiryDate": "",
"destinationAccount": {
"accountDataType": "ACCOUNT",
"data": {
"accountType": "CURRENT",
"accountIFSC": "IKCC0009",
"maskedAccountNumber": "XXXXXXXX9090",
"accountNumber": "1112090999090"
}
}
}
}
]
}
}
```
### ChosenRepayment
```
{
"plan": <PaymentPlan>,
"method": <PaymentMethod>
}
```
### Payment Method
```
{
"id": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb",
"automatic": false,
"scheduleType": "RECURRING",
"frequency": "MONTHLY",
"tenure": {
"duration": "1",
"unit": "MONTH"
},
"totalAmount": "5000.00"
}
```
### LoanTenure
```
{
"duration": "1", "unit": "MONTH"
}
```
### LoanTermsHistory
```
{
"interest": "18",
"tenure": {
"duration": "1",
"unit": "MONTH"
},
"effectiveDate": "2020-01-01"
}
```
### Disbursement
```
{
"plan": [<PaymentPlan>],
"accountDetails": [<AccountDetails>]
}
```
### ChosenDisbursement
```
{
"plan": <PaymentPlan>,
"accountDetails": <AccountDetails>
}
```
### Payment
```
{
"totalAmount": "5000.00",
"date": "2020-10-10",
"status": "SUCCESS",
"installmentNumber": "1",
"txnRefNo": "004618602124",
"paymentId": "e8cc6822bd4bbb4eb1b9e1b4996fbff8acb"
}
```
### Transaction
```
{
"date": "25-01-2020",
"narration": "Repayment of Loan no : xxxxxxx9090",
"txnRefNo": "004618602124",
"amount": "50000.00",
"type": "DEPOSIT",
"closingBalance": "50000.00"
}
```
### Dispute
```
```
### AccountDetails
```
{
"type": "ACCOUNT",
"data": {
"accountNo": "3232090999090",
"accountType": "CURRENT",
"IFSCCode": "BKCC0009"
}
}
```
### AccountDetailsData
```
{
"accountType": "CURRENT",
"maskedAccountNumber": "XXXXXXXXX9090"
}
```
### AmountType
```
{
"amount": "10000",
"currency": "INR"
}
```
### PaymentMethod
```
```
### Consent
```
```
### LspInfo
```
{
"lspId": "<AA can identify the LSP based on this>",
"version": "<version of LSP>",
"appName": "<Package name of the app>"
}
```
# Error Codes
## CreateLoanApplicationResponse
<table>
<tbody>
<tr>
<td>Error code</td>
<td>Description</td>
</tr>
<tr>
<td>CLARQ1001</td>
<td>
Missing Attribute
</td>
</tr>
<tr>
<td>CLARQ1002</td>
<td>
CreationDate cannot be greater than current time
</td>
</tr>
<tr>
<td>CLARQ1003</td>
<td>
Requested loan amount exceeds limit
</td>
</tr>
<tr>
<td>CLARQ1004</td>
<td>
Corrupted API Payload for collateral data
</td>
</tr>
<tr>
<td>CLARQ1005</td>
<td>
Corrupted API Payload for borrower data
</td>
</tr>
</tbody>
</table>
## ConsentHandleResponse
<table>
<tbody>
<tr>
<td>Error code</td>
<td>Description</td>
</tr>
<tr>
<td>CHRQ4001</td>
<td>
Invalid vua
</td>
</tr>
<tr>
<td>CHRQ4002</td>
<td>
LoanApplicationId not found
</td>
</tr>
<tr>
<td>CHRQ4003</td>
<td>
isAggregation enabled flag is set to True but no ConsentAggregationId found
</td>
</tr>
<tr>
<td>SYS4004</td>
<td>
AA server down
</td>
</tr>
<tr>
<td>SYS4004</td>
<td>
AA server Request time out
</td>
</tr>
</tbody>
</table>
## TriggerRepaymentResponse
<table>
<tbody>
<tr>
<td>Error code</td>
<td>Description</td>
</tr>
<tr>
<td>TRRS9001</td>
<td>Invalid loan Id</td>
</tr>
<tr>
<td>TRRS9002</td>
<td>
No repayment method set for the request
</td>
</tr>
</tbody>
</table>
## TriggerRepaymentStatusResponse
<table>
<tbody>
<tr>
<td>Error code</td>
<td>Description</td>
</tr>
<tr>
<td>SYS8010</td>
<td>Insufficient Balance</td>
</tr>
<tr>
<td>SYS8011</td>
<td>Authorization failed</td>
</tr>
<tr>
<td>SYS8012</td>
<td>Authentication failure</td>
</tr>
<tr>
<td>SYS8013</td>
<td>Payment url expired</td>
</tr>
</tbody>
</table>
## LoanSummaryResponse
<table>
<tbody>
<tr>
<td>Error code</td>
<td>Description</td>
</tr>
<tr>
<td>LSR6010</td>
<td>Invalid loan ID</td>
</tr>
</tbody>
</table>
## LoanStatementResponse
<table>
<tbody>
<tr>
<td>Error code</td>
<td>Description</td>
</tr>
<tr>
<td>RHRS6001</td>
<td>Invalid loan ID</td>
</tr>
<tr>
<td>RHRS6002</td>
<td>Start Date before the loan start date</td>
</tr>
<tr>
<td>RHRS6003</td>
<td>End Date greater than current date</td>
</tr>
<tr>
<td>RHRS6004</td>
<td>Start date cannot be greater than end date</td>
</tr>
</tbody>
</table>
## GetRepaymentPlansResponse
<table>
<tbody>
<tr>
<td>Error code</td>
<td>Description</td>
</tr>
<tr>
<td>GRPR6001</td>
<td>Invalid loan ID</td>
</tr>
<tr>
<td>GRPR6002</td>
<td>No Repayment Plans exist currently for this loan Id</td>
</tr>
</tbody>
</table>
## GetDisbursementPlansResponse
<table>
<tbody>
<tr>
<td>Error code</td>
<td>Description</td>
</tr>
<tr>
<td>GDPR7001</td>
<td>Invalid loan ID</td>
</tr>
<tr>
<td>GDPR7002</td>
<td>No Disbursement Plans exist currently for this loan Id</td>
</tr>
</tbody>
</table>
## RaiseDisputeRequest
<table>
<tbody>
<tr>
<td>Error code</td>
<td>Description</td>
</tr>
<tr>
<td>RDR8120</td>
<td>Invalid loan Id</td>
</tr>
</tbody>
</table>
## UpdateDisputeRequest
<table>
<tbody>
<tr>
<td>Error code</td>
<td>Description</td>
</tr>
<tr>
<td>UDR8120</td>
<td>Invalid dispute ID</td>
</tr>
</tbody>
</table>