LOANTAP API DOCUMENTATION === ### LoanTap LEAD-GEN PARTNER API DOCUMENTATION 3.0 #### **Introduction** Affiliate channel url allows the channel to authenticate and use below API’s. The affiliate user id and affiliate user secret will be provided via onetimesecrete link. URL : https://loantap.in/affiliate/api-v3/<channel code>/<method name> Method: `POST` Headers: - `Content-Type`: `application/json` - `X-API-KEY`: `onetimesecrete_key_sent_via_mail` - `REQ-PRODUCT-ID`: `onetimesecrete_key_sent_via_mail` ### **Loan Application Eligibility API** This API will provide All Master Data List for Other API & Loan Details like Min & Max Amount and Tenure Loan City Etc. | Head | Description | | -------- | -------- | | Name | Loan Application Eligibility | |HTTP Method|GET| |Output Format|JSON| |Prod Server URL|https://loantap.in/affiliate/api-v3/<channel_code>/eligibility| Response body: ```json= { { "status": "success", "status_code": "200", "message": "Eligibility", "data": { "loan_city": { "bangalore": "Bangalore", "pune": "Pune", "mumbai": "Mumbai", "navi-mumbai": "Navi Mumbai", "delhi-ncr": "Delhi NCR", "chennai": "Chennai", "hyderabad": "Hyderabad", "ahmedabad": "Ahmedabad", "chandigarh": "Chandigarh", "bhopal": "Bhopal", "indore": "Indore", "raipur": "Raipur", "vadodara": "Vadodara", "coimbatore": "Coimbatore", "jaipur": "Jaipur" }, "job_type": { "salaried": "Salaried", "self-employed": "Self Employed" }, "gender": { "male": "Male", "female": "Female" }, "educational_qualification": { "others": "Others", "professional": "Professional", "post-graduate": "Post Graduate", "graduate": "Graduate", "under-graduate": "Under Graduate" }, "marital_status": { "married": "Married", "single": "Single" }, "home_ownership_type": { "owned": "Owned", "rented": "Rented" }, "years_at_current_residence": { "other": "Other", "more-than-3-years": "3+ Years", "less-than-3-years": "1-3 Years", "less-than-1-year": "0-1 Year" }, "employment_year": { "less-than-2-years": "&lt; 2 years", "less-than-5-years": "&lt; 5 years", "more-than-5-years": "&gt; 5 years" }, "business_ownership_type": { "owned": "Owned", "rented": "Rented" }, "years_of_business": { "less-than-2-years": "Less than 2 years", "less-than-5-years": "Less than 5 years", "more-than-5-years": "More than 5 years" }, "lapp_status": { "channel-app": "Channel App", "cpv": "CPV", "credit-appraisal": "Credit Appraisal", "credit-approval": "Credit Approval", "credit-decision": "Credit Decision", "fraud-sandbox-done": "Fraud Sandbox Done", "incomplete-application": "Incomplete Application", "junk": "Junk", "lead": "Lead", "loan": "Loan", "rejected": "Rejected", "relookup": "Relookup", "risk-management": "Risk Management", "topup": "Topup" } } } } ``` ### **Lead Generation API** This API will create lead in LoanTap portal. | Head | Description | | -------- | -------- | | Name | Lead Generation | |HTTP Method|POST| |Output Format|JSON| |Prod Server URL|https://loantap.in/affiliate/api-v3/<channel_code>/lapp-v2| > [color=red]**Input Fields for Salaried Scheme** | Key Name | Sample Value | Mandatory | Comment | | --------- | ------------ | --------- | ----------------------------------------- | | job_type | salaried | yes |**Note-This is allowed only given value** | | full_name | Test Test | yes |-| |personal_email|test@test.com|yes |-| |mobile_number|7020XXXXXX |yes|-| | dob |19900202 (YYYYMMDD) |yes|-| | gender |male/female |yes |-| | marital_status|single/married|yes|**Note-This is allowed only given value**| |home_ownership_type |owned/rented|no|**Note-This is allowed only given value**| |home_addr_line1|23 Herms Waves| yes|-| |home_addr_line2 |Near Post |Office no|-| |home_city |pune|yes|-| |home_zipcode |411041|yes|-| |address_landmark |Trade House|no|-| |pan_card |AJVCF56XX|yes|-| |req_amount |50000|yes|-| |req_processing_fees |1213|yes|-| | req_tenure | 24 | yes | - | | fixed_income| 50000 | yes | - | | fathers_name | Tes | yes | | | permanent_addr_line1 | 23 Herms Waves | yes | - | | permanent_addr_line2 | Near Post Office | no | - | | permanent_zipcode | 411041 | yes | - | | permanent_city | pune | yes | - | | loan_city | pune | yes | - | | employer_name | Google Inc | yes | - | | office_addr_line1 | 23 Herms Waves | no | - | | office_addr_line2 | Near Post Office | no | - | | office_city | pune | no | - | | office_zipcode | 411041 | no | - | | official_email | test@test.com | no | - | | emi_outflow | 10000 | no | - | | req_interest_rate | 18 | no | - | | educational_qualification |under-graduate/graduate/post-graduate/others | no |**Note-This is allowed only given value** | | no_of_dependents | 2 | no | - | | total_work_experience | 8 | no | - | | passport_number | LTXXXXX | no | - | | aadhar_uid | 1235689XXXX | no | - | | years_at_current_residence | more-than-3-years/less-than-3-years/less-than-1-year | no | **Note-This is allowed only given value** | | comment | Test comment | no | - | | employment_duration | 2 years | no | - | | office_landline_no | 112536598 | no | - | | salary_account_no | 1212121212 | no | - | | salary_bank_name | SBI | no | - | | company_mca_id | LT45215889 | no | - | | cibil_active_id | 125368977 | no | - | | ecs_bank_acc_no | 123456789 | no | - | | ecs_bank_branch | Viman Nager | no | - | | ecs_bank | SBI | no | - | | ecs_cust_name | Shrikant Vaishnav | no | - | | ecs_ifsc_code | SBI0004589 | no | - | | ecs_bank_city | pune | no | - | | ecs_account_type | saving | no | - | | ecs_micr_code | 5565655 | no | - | | preferred_nach_vendor | test | no | - | > [color=red]**Input Fields for Self Employed** | Key Name | Sample Value | Mandatory | Comment | | --------- | ------------ | --------- | ----------------------------------------- | | mobile_number | | yes | - | | business_ownership_type | owned/rented | yes | **Note-This is allowed only given value** | | gender | male/female | yes | **Note-This is allowed only given value** | | educational_qualification | | no | - | | dob | YYYYMMDD | yes | - | | personal_email | | yes | - | | job_type | self-employed | yes | **Note-This is allowed only given value** | | business_name | | yes | - | | business_address | | no | - | | business_addr_line1 | | yes | - | | business_addr_line2 | | no | - | | business_city | | yes | - | | loan_city | | yes | - | | business_zipcode | | yes | - | | business_annual_income | | no | - | | years_of_business | | no | **Note-This is allowed only given value** | | business_landline_no | | no | - | | nature_of_business | | no | - | | pan_card | | yes | - | | full_name | | yes | - | | mothers_maiden_name | | yes | - | | req_amount | | yes | - | | req_tenure | | yes | - | | req_processing_fees | | no | - | | credit_card_limit | | yes | - | | emi_outflow | | no | - | | marital_status | single/married | no | **Note-This is allowed only given value** | | fathers_name | | no | - | | rent_outflow | | no | - | | ecs_bank | | no | - | | permanent_addr_line1 | | yes | - | | permanent_addr_line2 | | no | - | | permanent_city | | yes | - | | permanent_zipcode | | yes | - | | home_addr_line1 | | yes | - | | home_addr_line2 | | no | - | | home_zipcode | | yes | - | | home_city | | yes | - | | address_landmark | | no | - | Response: | Parameter | Field Type | Description | Comments/Example | | --------- | ------------ | --------- | ----------------------------------------- | |lapp_id|String|unique lapp Id of the applicant|APP165061XXXXXXXX| Request body: ```json= { "mobile_number": "9827595XXX", "gender": "male", "dob": "19900202", "personal_email": "shrikant@XXX.in", "job_type": "self-employed", "home_ownership_type": "owned", "business_name": "test", "business_ownership_type": "owned", "business_address": "office_addr_line1", "business_addr_line1": "office_addr_line2", "business_addr_line2": "office_addr_line2", "business_zipcode": "411041", "business_city": "pune", "permanent_addr_line1": "office_addr_line2", "permanent_addr_line2": "office_addr_line2", "permanent_zipcode": "411041", "permanent_city": "pune", "home_addr_line1": "office_addr_line2", "home_addr_line2": "office_addr_line2", "home_zipcode": "411041", "home_city": "pune", "loan_city": "mumbai", "business_monthly_sales": "", "business_monthly_gp": "500000", "business_monthly_np": "50000", "years_of_business": "less-than-2-years", "business_landline_no": "2566555", "nature_of_business": "test", "emi_outflow": "0", "rent_outflow": "0", "pan_card": "AJTPM5566C", "full_name": "Shrikant Vaishnav", "mothers_maiden_name": "Mother", "req_amount": "52200", "req_tenure": "16", "address_landmark": "", "educational_qualification": "graduate", "years_at_current_residence": "", "marital_status": "", "fathers_name": "test", "req_processing_fees": "1232" } ``` Response body: ```json= { "status": "success", "status_code": "200", "message": "Application created successfully", "data": { "lapp_id": "APP1682537411839XXX", "link": "https://loantap.in/apply/home/APP168253741183XXX" } } ``` ### **Loan Application Status API** Loan Application Status API provides the loan application. | Head | Description | | -------- | -------- | | Name | Loan Application Status API | |HTTP Method|POST| |Output Format|JSON| |Prod Server URL|https://loantap.in/affiliate/api-v3/<channel_code>/status| Request: | Parameter | Field Type | Constraints | Mandatory|Comments/Example | | --------- | ------------ | --------- |--------- | ----------------------------------------- | |lapp_id|String|unique lapp Id of the applicant|yes|APP16511572XXXX| Response: | Parameter | Field Type | Description | Comments/Example | | --------- | ------------ | --------- | ----------------------------------------- | | status | String | Status of Request | Success | | status_code | Num | Status code of request | 200| | message | String | Status message of request | Process completed successfully | | lapp_date | String | Created date of the loan application | 2019-11-19 | | lapp_id | String | Unique application ID | APPXXXXXXXX | | sublan_id | String | SUBLAN ID of application | SLANXXXXXXXX | | lapp_status_id | num | Status ID | received | | lapp_status | String | Application Current Status | Documents Received - under Process | Request body: ```json= { "lapp_id": "APP1651157257020779" } ``` Response body: ```json= { "status": "success", "status_code": "200", "message": "Process completed successfully", "data": { "lapp_date": "2019-11-25", "lapp_id": "APP165115725702XXX", "sublan_id": "SLAN165115725702XXX", "lapp_status_id": "partial-app", "lapp_status": "Partial App" } } ``` Error response: ````json= { "status": "error" "status_code": "401", "message": "lapp_id required", } ```` ### **Documents Status API** Documents Detail API returns the status of all the documents for a particular customer. | Head | Description | | -------- | -------- | | Name | Documents List | |HTTP Method|POST| |Output Format|JSON| |Prod Server URL|https://loantap.in/affiliate/api-v3/<channel_code>/document-list| Request: | Parameter | Field Type | Constraints | Mandatory|Comments/Example | | --------- | ------------ | --------- |--------- | ----------------------------------------- | |lapp_id|String|unique lapp Id of the applicant|yes|APP16511572XXXX| Request body: ```json= { "lapp_id": "APP1651157257020779" } ``` Response body: ```json= { "status": "success", "status_code": "200", "message": "Documents List", "data": { "application_id": "APP16825132628XXXX", "doc_combo": "sal_bs6", "documents": { "kyc": { "aadhaar_card": { "file_name": "aadhaar_card", "label": "Aadhaar Card", "required": "no", "is_uploaded": "no" }, "aadhaar_card-xxxx": { "file_name": "aadhaar_card-xxxx", "label": "Additional Aadhaar Card Page", "required": "no", "is_uploaded": "no" }, "address_proof": { "file_name": "address_proof", "label": "Address Proof", "required": "no", "is_uploaded": "no" }, "is_completed": "yes" }, "others": { "others": { "file_name": "others", "label": "Others", "required": "yes", "is_uploaded": "no" }, "is_completed": "yes" }, "salary_slip": { "salary_slip-month-1": { "file_name": "salary_slip-month-1", "label": "Salary Slip Month 1", "required": "yes", "is_uploaded": "yes" }, "is_completed": "yes" }, "bank_statement": { "single_file": { "bank_statement-combined": { "file_name": "bank_statement-combined", "label": "Bank Statement ALL", "required": "yes", "is_uploaded": "yes" } }, "individual_files": { "bank_statement-month-1": { "file_name": "bank_statement-month-1", "label": "Bank Statement Month 1", "required": "yes", "is_uploaded": "no" }, "bank_statement-month-6": { "file_name": "bank_statement-month-6", "label": "Bank Statement Month 6", "required": "yes", "is_uploaded": "no" } }, "is_completed": "yes" } "itr": { "itr": { "file_name": "itr", "label": "Latest ITR", "required": "yes", "is_uploaded": "no" }, "itr-xxxx": { "file_name": "itr-xxxx", "label": "Additional ITR", "required": "yes", "is_uploaded": "no" }, "is_completed": "no" } } } } ``` > [color=Red]Note: About document upload. | Section | File | File Name | |---------|----------------------------------------------|---------------------------| | KYC | PAN Card | pan_card | | KYC | Address Proof | address_proof | | BANK | Aadhar Card | aadhaar_card | | BANK | Addition Page of Aadhar Card | aadhaar_card-xxxx | | BANK | Single Bak Statement (like all 6 month data) | bank_statement-all-102019 | | BANK | Individual File For Bank Statement | bank_statement-062019 | > [color=Red]Note : 1. single_file indicate you can upload a single file 2. individual_files indicated you need to upload all files in given section ### **Document Upload API** This API is called when all the documents are uploaded and no further changes will be done in the Customer Loan Application. Document Collection API verifies if all documents are uploaded successfully and updates the customers loan application state at LoanTap system. | Head | Description | | -------- | -------- | | Name | Upload Document | |HTTP Method|POST| |Output Format|JSON| |Prod Server URL|https://loantap.in/affiliate/api-v3/<channel_code>/upload-doc| Request: | Parameters | Field Type | Constraints | Mandatory | Comments/Example | |------------|------------|-------------------------------------------------------------------|-----------|-----------------------| | lapp_id | string | Valid lapp_id | Yes | APP123456899XX | | file_name | string | yes file name check(you can get file name from document list api) | Yes | pan_card | | ext | string | check ext. | yes. | "pdf ,jpg, jpeg ,png" | | password | string | | no | abcxxx | | file | string | | yes | base64 encoded | Response: | Parameters | Field Type | Description | Mandatory | Comments/Example | |---------------------|------------|-------------|-----------|--------------------------------| | status | String | | | success | | message | String | | | Process completed successfully | | status_code | Num | | | 200 | Request body: ```json= { "file_name":"bank_statement-combined", "lapp_id": "APP1667929791967744", "ext":"jpg", "password":"password", "file":"base 64 encoded file" } ``` Response body: ```json= { "status": "success", "status_code": "200", "message": "file uploaded successfully!" } ``` ### **Transaction API** This API is called when the customer wants to make a withdrawal request from the Loan Line (STRCL). | Head | Description | | -------- | -------- | | Name | Transaction API | |HTTP Method|POST| |Output Format|JSON| |Prod Server URL|https://loantap.in/affiliate/api-v3/<channel_code>/transaction| Headers: | Parameters | Field | Mandatory | Comments/Example | |------------|--------|-----------|------------------| | X-API-KEY | string | yes | This will be provided by LoanTap while setting up the Partner. Unique for each Partner. | Request: | Parameters | Field Type | Constraints | Mandatory | Comments/Example | |------------|------------|-------------------------------------------------------------------|-----------|-----------------------| | dealer_code | string | Valid dealer_code | Yes | A Dealer to whose bank account the amount will be credited. One time dealer code has to be created in LoanTap's system before consuming the API. Ex. **amin-traders** | | amount | num | Needs to be a number | Yes | Amount asked for withdrawal from the Loan Line. | | installment_frequency | string | Predefined by LoanTap | Yes | Possible Values: period_7_days, period_14_days, period_21_days, period_28_days | | sublan_id | string | sublan against which the withdrawal is requested | Yes | SLAN1688320183297267 This will be provided by LoanTap in response to the [Loan Application Status API](/RoVaOf7gTdWwLTVrOf-tfQ?view#Loan-Application-Status-API) | | transaction_id | string | Unique transaction Ref ID | Yes | This is to be **provided by the Partner**. The withdrawal will be reconciled against this ID. | Success Response: | Parameters | Field Type | Description | Comments/Example | |---------------------|------------|-------------|-----------|--------------------------------| | status | String | | success | | status_code | Num | | 200 | | message | String | | Transaction Fired | | Data | JSON | Data that will be returned | `{"is_eligibile":"yes", "loan_line_limit":"100000.00", "loan_line_used":"50000.00", "loan_line_available":"50000.00",  "transaction_id":"TXNID1234567890"}`  | The Data in the response will contain following: | Parameter | Field Type | Description/Value | Comment | |--------|--------|--------|--------| | is_eligible | string | yes/no | Whether the customer is eligible for this withdrawal. | | loan_line_limit | num | ex. 100000.00 | **Total limit of the Loan Line** made available to the customer. | | loan_line_used | num | ex. 50000.00 | **Total amount withdrawn** by the customer. | | loan_line_available | num | ex. 50000.00 | **Total available amount** which can be withdrawn the customer. | | transaction_id | string | ex. TXNID1234567890 | The transaction reference id. | Request body: ```json= { "dealer_code":"amin-traders", "amount":"50000", "installment_frequency":"period_7_days", "sublan_id":"SLAN1688320183297267" } ``` Response body: ```json= { "status":"success", "status_code":"200", "status_message":"Transaction Fired", "data":{ "is_eligibile":"yes", "loan_line_limit":"100000.00", "loan_line_used":"50000.00", "loan_line_available":"50000.00", "transaction_id":"TXNID1234567890" } } ``` ### **Loan Line Availability API** This API is called: 1. By the system when there is a need to show the availability of the line to the customer. 2. When a transaction is fired to check the eligibility of the transaction | Head | Description | | -------- | -------- | | Name | Loan Line Availability API | |HTTP Method|POST| |Output Format|JSON| |Prod Server URL|https://loantap.in/affiliate/api-v3/<channel_code>/loan-line-availability| Headers: | Parameters | Field | Mandatory | Comments/Example | |------------|--------|-----------|------------------| | X-API-KEY | string | yes | This will be provided by LoanTap while setting up the Partner. Unique for each Partner. | Request: | Parameters | Field Type | Constraints | Mandatory | Comments/Example | |------------|------------|-------------------------------------------------------------------|-----------|-----------------------| | sublan_id | string | sublan against which the withdrawal is requested | yes | SLAN1688320183297267 This will be provided by LoanTap in response to the [Loan Application Status API](/RoVaOf7gTdWwLTVrOf-tfQ?view#Loan-Application-Status-API) | Success Response: | Parameters | Field Type | Description | Comments/Example | |---------------------|------------|-------------|-----------|--------------------------------| | status | String | Status of the API call | success | | status_code | Num | Status code returned by LoanTap | 200 | | message | String | Message | Transaction Fired | | Data | JSON | Data that will be returned | `{"is_eligibile":"yes", "loan_line_limit":"100000.00", "loan_line_used":"50000.00", "loan_line_available":"50000.00"}` | The Data in the response will contain following: | Parameter | Field Type | Description/Value | Comment | |--------|--------|--------|--------| | is_eligible | string | yes/no | Whether the customer is eligible for this withdrawal. | | loan_line_limit | num | ex. 100000.00 | **Total limit of the Loan Line** made available to the customer. | | loan_line_used | num | ex. 50000.00 | **Total amount withdrawn** by the customer. | | loan_line_available | num | ex. 50000.00 | **Total available amount** which can be withdrawn the customer. | Request body: ```json= { "sublan_id":"SLAN1688320183297267" } ``` Response body: ```json= { "status":"success", "status_code":"200", "status_message":"Transaction Fired", "data":{ "is_eligibile": "yes", "loan_line_limit":"100000.00", "loan_line_used":"50000.00", "loan_line_available":"50000.00" } } ``` ### **Response Status Codes** | Code | Status | Label | Message | |------|--------|-------|---------| | 200 | success | Process Completed | Process completed successfully | | 201 |success | New Application Created | Application created successfully | | 202 | success | Application status changed | Application updated successfully| | 203 | success | Application Rejected | Application Rejected| | 204 | success | Application deleted | Application deleted successfully| | 205 | success | File chunk uploaded | File chunk uploaded successfully| | 401 | error | Invalid Ticket | Something went wrong. Please reload the page.| | 402 | error | Invalid API Key | Something went wrong. Please reload the page.| | 403 | error | Invalid Application ID | Invalid Application ID | | 404 | error | Application not found |Something went wrong. Please reload the page.| | 405 | error | Application Scheme not found | Something went wrong. Please reload the page.| | 406 | error | Scheme not found | Something went wrong. Please reload the page. | | 407 | error | loan settings not loaded | Something went wrong. Please reload the page.| | 408 | error | Invalid lead ID | Something went wrong. Please reload the page.| | 409 | error | Invalid customer ID | Something went wrong. Please reload the page.| | 410 | error | new topup application not created | Something went wrong. Please reload the page.| | 411 | error | honeypot filled | Incomplete Form. Try resubmitting the form.| | 412 | error | i_am_indian not selected | Please fill all form fields | | 413 | error | Terms & Conditions not Checked | Please fill all form fields| | 414 | error | Social Login not Done | | | 415 | error | Invalid Request | Invalid Request| | 416 | error | Invalid Activity | Something went wrong. Please reload the page.| | 417 | error | i_authorized not selected | Please fill all form fields| | 418 | error | OTP limit is exceeded for this session | OTP limit is exceeded for this session | | 419 | error | Incorrect OTP, Please Try Valid OTP | Incorrect OTP, Please Try Valid OTP | | 420 | error | Unable to send OTP | Unable to send OTP | | 421 | error | Bad Request | Please fill all form fields | | 422 | error | Max loan amount exceeded | You are not eligible for the loan | | 423 | error | Application not found | Application not found | | 424 | error | Invalid City | Invalid city | | 425 | error | Invalid mobile number | Invalid mobile number | | 426 | error | Merchant ID already exists | Merchant ID already exists | | 427 | error | Merchant already registered | Merchant already registered | | 428 | error | Unable to link merchant | Unable to link merchant | | 429 | error | Invalid OTP | Invalid OTP | | 430 | error | Unable to verify OTP | Unable to verify OTP | | 431 | error | Invalid token | Invalid token | | 432 | error | Unable to unlink merchant | Unable to unlink merchant | | 433 | error | Unable to fetch Eligibility Info | Unable to fetch Eligibility Info | | 434 | error | Invalid Wallet Transaction ID | Invalid Wallet Transaction ID | | 435 | error | No merchant found | No merchant found | | 436 | error | Unable to generate refund | Unable to generate refund | | 437 | error | Multiple loans found against this mobile number | Multiple loans found against this mobile number | | 438 | error | No merchant linked with this token | No merchant linked with this token | | 439 | error | Wallet limit exceeded | Wallet limit exceeded | | 440 | error | Invalid Amount | Invalid Amount | | 441 | error | Transaction already generated | Transaction already generated | | 442 | error | Unable to Process Transaction | Unable to Process Transaction | | 500 | error | create new app error | Internal Server Error | | 501 | error | update app meta error | Internal Server Error | | 502 | error | eligibility function error | Internal Server Error | | 503 | error | Lapp obj error | Internal Server Error | | 504 | error | Unable to fetch support data | Internal Server Error | | 505 | error | Unable to generate ticket | Internal Server Error | | 506 | error | Error while uploading file | Internal Server Error | | 507 | error | Target path not defined | Internal Server Error | | 508 | error | Failed to open temp directory | Internal Server Error | | 509 | error | Failed to open output stream | Internal Server Error | | 510 | error | Failed to upload file | Internal Server Error | | 511 | error | Failed to open input stream | Internal Server Error | | 512 | error | Invalid data, Please check data again! | Invalid data, Please check data again! | | 513 | under-maintenance | Our system is under maintenance. Please visit back in some time. | Our system is under maintenance. Please visit back in some time. | | 514 | error | NACH Not Active | NACH is not Active |