# Sourcing Entity - Rest API
These APIs are called from the server side. The workflow is as follows:
- First a user is created by calling Create User API
- Eligibility for the given user is checked by calling Get Eligibility API
- Token is generated for the user by calling Generate Token API and is sent to the Android app to be used with the SDK
# Authentication
All the APIs below require a Server API Key to be passed in x-api-key
header. This API Key will be shared directly by FinBox. Make sure this key is not exposed in any of your client side applications.
# Postman Collection
Postman collection for the REST APIs can be downloaded using the button below:
Postman environment having base_url
and server-api-key
will be shared separately.
# Request and Response formats
All APIs accept request body with application/json
content type, the response body is as follows:
{
"status": true,
"error": "",
"data": ""
}
On successful response you'll receive 200 HTTP status, with status
value as true
.
On failure, response will have status
key as false
, and error
will hold the message indicating the failure.
# Create User
This API creates a FinBox lending user for a given customer ID.
Endpoint
POST base_url
/v1/user/create
# Request Format
{
"customerID": "somecustomerid",
"mobile": "9999999999"
}
# Response
{
"data": {
"message": "user created!"
},
"error": "",
"status": true
}
# Error Cases
Case | HTTP Code |
---|---|
Missing customerID | 403 |
Missing mobile number | 403 |
Invalid mobile number | 403 |
User already exists | 409 |
customerID cannot exceed 50 characters | 400 |
# Get Eligibility
This API checks for a user's eligibility and returns the eligible amount. Partner platform data and data from DeviceConnect SDK is used to prequalify the customers. The customer_id
in DeviceConnect SDK should be same as the customer_id
of user.
Endpoint
GET base_url
/v1/user/eligibility?customerID=somecustomerid
# Response
{
"data": {
"eligible_amount": 15000,
"is_eligible": true
},
"error": "",
"status": true
}
Here is_eligible
is a boolean indicating whether the user is eligible or not, while eligibility_amount
is a float that indicates the loan eligibility amount.
# Error Cases
Case | HTTP Code |
---|---|
Missing customerID | 403 |
User not found | 400 |
User does not have eligibility data | 409 |
# Generate Token
This API can be called multiple times for an eligible user, and is used to get a valid token that can be used by the Android App to initialize the SDK.
Token Validity
- The token is valid for 24 hours.
- It is recommended to call this API everytime user clicks on the banner on app, so that a fresh token is issued for the user session everytime.
Endpoint
POST base_url
/v1/user/token
# Request Format
{
"customerID": "somecustomerid"
}
# Response
{
"data": {
"token": "123LN5hAeH6LgDzhmtJs12345678q3G25QAMLinE77IE123yrT7GWZpwNyPO3123"
},
"error": "",
"status": true
}
Here token
field indicates the token.
# Error Cases
Case | HTTP Code |
---|---|
Missing customerID | 403 |
User does not exist | 404 |
User eligibility not available | 400 |
User not eligible for loan | 403 |
Tracking Source
In case you are using same API key across different platforms, and want to track the source of the user, also pass a string field source
in the request body, indicating a unique source from which the user is accessing the SDK from.
# Partner Push
This API is used to pass partner data to FinBox system if required. This API is to be called before calling /v1/user/eligibility
API.
Hence, the flow of APIs will be as follows:
- Create User API
/v1/user/create
(One Time) - Push User Data API
/v1/user/push
(One Time) - Get Eligibility API
/v1/user/eligibility
(One Time) - Token API
/v1/user/token
/ Session API/v1/user/session
(Every time user resumes/starts journey)
Endpoint
POST base_url
/v1/user/push
# Request Format
{
"customerID": "somecustomerid",
"pan": "BQGPM6873M",
"name": "Sample User",
"dob": "1992-01-01",
"email": "test@finbox.in",
"gender": "Male",
"gstin": "18BQGPM6873M1ZM",
"vintageDate": "2006-01-02"
}
Field | Type | Mandatory | Description |
---|---|---|---|
customerID | String | Yes | Unique customerID which was used while creating user in Create User API |
pan | String | No | Applicant's Personal PAN |
name | String | No | Full Name |
dob | String | No | Date of Birth in YYYY-MM-DD format |
String | No | Applicant's Email | |
gender | String | No | Gender, possible values are Male , Female or Other |
gstin | String | No | GSTIN of applicant's business. This should match with personal PAN specified, i.e. personal PAN should be present in the GSTIN specified (Propreitorships) |
vintageDate | String | No | Platform onboarding date of customer in YYYY-MM-DD format |
NOTE
- Based on pre-qualification criteria, additional fields might be required to be passed in this API endpoint. These fields will be communicated by FinBox team, if required.
- Except
customerID
all other fields are optional. Fields can be passed as per requirement, like in business loan / credit line, GSTIN can be passed, while in personal loan / credit line journey this can be left out. - In case of partner push failure. API response and the activity log description will mention the reason for failure.
# Response
{
"data": {
"message": "added"
},
"error": "",
"status": true
}
# Error Cases
Error Message | HTTP Code | Description |
---|---|---|
Missing customerID | 403 | Compulsory field customerID was not passed |
request validation failed | 400 | Invalid Request Body Format |
User not found | 404 | No user with given cusomterID exists |
User journey already started. Partner data should be pushed before starting journey | 406 | User journey already started. Partner data should be pushed before starting journey |
Invalid fieldname , passed value: passedvalue | 400 | Value passed for the field was in invalid format |
PAN is not matching with GSTIN, passed value: PAN = passed_pan , GSTIN = passed_gstin | 400 | PAN extracted from GSTIN is not matching with the propreitor's PAN |
something went wrong | 500 | Internal error while processing the request |
Error Response format:
{
"data": {},
"error": "ERROR_MESSAGE_HERE",
"status": false
}
# List Users
Lists all the users created from a given sourcing entity's account. It's a paginated API.
Endpoint
GET base_url
/v1/users?limit=totalRecords
&page=numPages
# Query Parameters
Query parameters can be appended at end of the URL like /?limit=20&page=1
Parameter | Optional | Type | Description |
---|---|---|---|
limit | Yes | Number | Records Per Page. Default Value is 10 |
page | Yes | Number | Page Number. Default Value is 1 |
from | Yes | Date | Filter by a given start date (IST). Defaults to beginning of time. Format yyyy-mm-dd . Needs to be used with query param to |
to | Yes | Date | Filter by a given end date (IST). Defaults to current date. Format yyyy-mm-dd . Needs to be used with query param from |
customerID | Yes | String | Filter all users of a given %customerID% pattern. |
mobile | Yes | String | Filter all users of a given %mobileNumber% pattern. |
statusText | Yes | String | Filter all loan applications of a given loan status. Status list in Appendix |
# Response
{
"data": {
"total": 2,
"userList": [
{
"name": "Firstname LastName",
"mobile": "9999999999",
"createdAt": "2020-09-15 18:54:15",
"status": "USER_PROFILE",
"customerID": "someCustomerID1"
},
{
"name": "FirstName2 LastName2",
"mobile": "9999900000",
"createdAt": "2020-09-15 18:51:11",
"status": "USER_PROFILE",
"customerID": "someCustomerID2"
}
]
}
}
Different values of user status can be found in Appendix
# User Profile
Returns the profile of the user against a customerID
Endpoint
GET base_url
/v1/user/profile?customerID=someCustomerID
# Response
{
"data": {
"userProfile": {
"customerID": "someCustomerID",
"mobile": "9999999999",
"createdAt": "2020-09-15 05:09:58",
"status": "USER_PROFILE_UPDATED",
"name": "Awesome User",
"email": "username@email.com",
"dob": "1992-11-09",
"gender": "Male",
"pan": "ABCDN0000P",
"loanApplicationIDs": ["someLongUUID1"]
}
},
"error": "",
"status": true
}
- Different values of
status
(customer status) can be found in Appendix createdAt
indicates the date time of user creation inYYYY-MM-DD HH:MM:SS
format (UTC)
# List Loans
Lists all the loan applications created from a given sourcing entity's account. It's a paginated API.
Endpoint
GET base_url
/v1/loans?limit=totalRecords
&page=numPages
# Query Parameters
Query parameters can be appended at end of the URL like /?limit=20&page=1
Parameter | Optional | Type | Description |
---|---|---|---|
limit | Yes | Number | Records Per Page. Default Value is 10 |
page | Yes | Number | Page Number. Default Value is 1 |
from | Yes | Date | Filter by a given start date (IST). Defaults to beginning of time. Format yyyy-mm-dd |
to | Yes | Date | Filter by a given end date (IST). Defaults to current date. Format yyyy-mm-dd |
customerID | Yes | String | Filter all loan applications of a given %customerID% pattern. |
mobile | Yes | String | Filter all loan applications of a given %mobileNumber% pattern. |
statusText | Yes | String | Filter all loan applications of a given loan status. Status list in Appendix |
# Response
{
"data": {
"loans": [
{
"loanApplicationID": "someLongUUID",
"loanApplicationNum": "readableApplicationNumber",
"createdAt": "2020-09-15 18:56:15",
"status": "BANK_ADDED",
"customerID": "someCustomerID"
},
{
"loanApplicationID": "someLongUUIDAgain",
"loanApplicationNum": "anotherReadableApplicationNumber",
"createdAt": "2020-09-15 18:10:45",
"status": "KYC_SUCCESS",
"customerID": "someAnotherCustomerID"
}
]
}
}
Different values of loan status can be found in Appendix
createdAt
indicates the date time of loan creation in YYYY-MM-DD HH:MM:SS
format (UTC)
# Loan Details
Returns the details of a given loan application.
Endpoint
GET base_url
/v1/loan/details?loanApplicationID=someLongLoanApplicationUUID
# Response
{
"data": {
"loanApplicationID": "2fee9ba7-52e1-4873-8328-e0dff99cdc83",
"loanApplicationNum": "FB1600196175625806",
"appliedLoanAmount":15000,
"status": "BANK_ADDED",
"createdAt": "2020-09-15 18:56:15",
"loanDetails": {
"customerID": "someCustomerID",
"name": "Amazing User",
"email": "username@email.com",
"mobile": "9999999999",
"gender": "Male",
"dob": "1992-12-09",
"pan": "ABCDP0000N",
"currentAddress": {
"line1": "22, 80 Feet Rd",
"line2": "Koramangala",
"city": "Bengaluru",
"pincode": "560095",
"state": "Karnataka"
},
"loanFormData": {
"dependents": "0",
"educationLevel": "MBBS",
"expenses": "515231",
"fathersName": "Ram",
"income": "515241",
"loanPurpose": "Marriage",
"maritalStatus": "Unmarried",
"reference1Contact": "+919999999999",
"reference1ContactName": "Papa",
"reference1Name": "Ram Kumar",
"reference1Relationship": "Father"
},
"residenceType": "Rented",
},
"bankDetails": {
"accountNumber": "50100100100999",
"ifscCode": "HDFC0000123",
"bankName": "HDFC Bank",
"accountHolderName": "Amazing User"
}
},
"error": "",
"status": true
}
Most of the parameters of the response are self-explainatory. Some key fields are explained below:
Field | Description |
---|---|
loanApplicationNum | A readable loan number format is FBxxx |
appliedLoanAmount | The amount of loan applied by the user. Note that it might be different from the final loan offer |
residenceType | Type of residence - Rented or Owned |
accountHolderName | Verified name as per user's bank account |
dob | Date of Birth in YYYY-MM-DD format |
createdAt | Date time of loan creation in YYYY-MM-DD HH:MM:SS format (UTC) |
loanFormData | Fields in this key varies for every sourcing entity, exact keys will be shared for this during the integration |
# Loan Offers
Returns the loan offers made to a given loan application.
NOTE
Loan Offers API works only once loan is approved
Endpoint
GET base_url
/v1/loan/offers?loanApplicationID=someLongLoanApplicationUUID
{
"data": [
{
"amount": 6500,
"tenureMonths": 6,
"annualInterest": 14.4,
"processingFee": 700,
"gst": 18,
"advanceEMIAmount": 0,
"emiCalculationMethod": "flat_rate",
"status": "offer_accepted",
"disbursalAmount": 5674,
"totalPayableAmount": 6966,
"lenderName": "XYZ Lender",
"emis": [
{
"emiDate": "2021-02-03",
"emiAmount": 1161
},
{
"emiDate": "2021-03-03",
"emiAmount": 1161
},
{
"emiDate": "2021-04-05",
"emiAmount": 1161
},
{
"emiDate": "2021-05-03",
"emiAmount": 1161
},
{
"emiDate": "2021-06-03",
"emiAmount": 1161
},
{
"emiDate": "2021-07-05",
"emiAmount": 1161
}
]
}
],
"error": "",
"status": true
}
Response fields are explained below:
Field | Type | Description |
---|---|---|
amount | Float | Loan Amount |
tenureMonths | Integer | Tenure in Months |
annualInterest | Float | Annual Interest Rate in Percentage |
processingFee | Float | Processing Fee |
gst | Float | GST Percentage |
advanceEMIAmount | Float | Advance EMI Amount |
emiCalculationMethod | String | Can be flat_rate or reducing_balance |
status | String | Can be offer_accepted or offered |
disbursalAmount | Float | Final Disbursal Amount |
totalPayableAmount | Float | Total Payable Amount |
lenderName | String | Name of the lender against which offers were generated |
emis | Array of Objects | Contains emi objects containing date and amount sorted in sequence of installments |
emiAmount | Float | Tells the EMI Amount |
emiDate | String | Contains YYYY-MM-DD format |
# Get Signed Agreement
Returns the presigned url for signed agreement PDF File
NOTE
- This API works only after
loan_signed_agreement_generated
event has been triggered - The presigned URL in response is valid for 300 seconds
Endpoint
GET base_url
/v1/loan/agreement?loanApplicationID=someLongLoanApplicationUUID
{
"data": {
"signedAgreementURL": "https://somelongurl/somefile.pdf?someparam=somevalue&somemoreparam=somevalue2"
},
"error": "",
"status": true
}
# Loan Repayments
Returns the repayments information for a given loan application.
NOTE
Loan Repayments API works only after loan disbursal.
Endpoint
GET base_url
/v1/loan/repayments?loanApplicationID=someLongLoanApplicationUUID
{
"data": {
"emiList": [
{
"loanPaymentID": "1c9387b3-c1f8-4d81-89e9-eabd06e8536c",
"amount": 15375,
"installmentNum": 1,
"lateCharge": 0,
"status": "UNPAID",
"dueDate": "2020-11-10",
"paidDate": "",
"totalPayable": 15375,
"amountReceived": 0
}
]
},
"error": "",
"status": true
}
Response fields are explained below:
Field | Type | Description |
---|---|---|
loanPaymentID | String | A UUID identifying an installment |
amount | Float | EMI amount |
installmentNum | Integer | Instalment number varies from 1 to tenureMonths (from loan offer API) |
lateCharge | Float | Late charge (if any otherwise 0) |
status | String | Can be PAID , UNPAID or PENDING |
dueDate | String | Due date for the installment in YYYY-MM-DD format |
paidDate | String | Date of payment in YYYY-MM-DD format, if not paid the value is blank string "" |
totalPayable | Float | Total amount to be paid by user, excluding partial payments made |
amountReceived | Float | Denotes the amount paid by customer against the EMI |
# EDI (Equated Daily Installments)
Returns repayment information in case an EDI product is configured.
Endpoint
GET base_url
/v1/edi/repayments?loanApplicationID=someLongLoanApplicationUUID
Response Format
{
"data": {
"loanApplicationID": "c24ef33f-f167-46ed-89c7-d101e636b0a5",
"numTotalEDIs": 79,
"numPaidEDIs": 0,
"numUnpaidEDIs": 79,
"numOverdueEDIs": 9,
"totalLoanAmount": 26499,
"amountPaid": 7,
"amountUnpaid": 26499,
"amountOverdue": 3024,
"lateCharges": 0,
"totalLateFees": 5,
"lastEDIPaidDate": "2021-11-24T00:00:00Z",
"lastEDIPaidAmount": 1,
"excessFunds": 2
},
"error": "",
"status": true
}
Key | Type | Nullable | Description |
---|---|---|---|
loanApplicationID | string | No | Id of the loan application for which the data is queried |
numTotalEDIs | int | No | Total number of EDIs for the loan application |
numPaidEDIs | int | No | Number of EDIs settled so far |
numUnpaidEDIs | int | No | Number of EDIs remaining to be paid from user's side |
numOverdueEDIs | int | No | Number of EDIs which should be paid by now, but has not been paid yet |
totalLoanAmount | float64 | No | Includes the repayment amount which the customer will be paying. This will not include the late charges incurred |
amountPaid | float64 | No | Total amount paid so far across the settled EDIs |
amountUnpaid | float64 | No | Remaining EDI amount to be paid by the user |
amountOverdue | float64 | No | Total EDI amount that the user has not paid till date |
lateCharges | float64 | No | Late fees which is pending to be paid by the user |
totalLateFees | float64 | No | Total late fees which the user has incurred so far |
lastEDIPaidDate | date time | Yes | Date of most recent payment done (EDI/Late Fees) |
lastEDIPaidAmount | float64 | Yes | Amount of most recent payment done by the customer (EDI/ Late fees) |
excessFunds | float64 | No | Excess amount apart from the amount used for settling the EDI and Late Fees |
# Repay Loan
Marks the repayment of a given loan EMI
NOTE
This API is disabled by default. If required, request FinBox team to enable this API.
Endpoint
POST base_url
/v1/loan/repay
# Request Format
{
"loanApplicationID": "someLoanApplicationID",
"installmentNum": 2,
"amountReceived": 12500,
"paymentDate": "2020-09-01 12:00:00",
"paymentMode": "upi",
"transactionID":"someUTRNumber"
}
Response Format
{
"data": {
"referenceID": "FinBoxReferenceIDforRecon"
},
"error": "",
"status": true
}
# Credit Line Details
Returns credit line details for a given user using the customerID
Endpoint
GET base_url
/v1/creditline/details?customerID=someCustomerID
Response Format
{
"data": {
"status": "ACTIVE",
"maxLimit": 100000,
"availableLimit": 98800,
"validity": "2022-01-18",
"inactiveReason": ""
},
"error": "",
"status": true
}
Response fields are explained below:
Field | Type | Description |
---|---|---|
status | String | Status of credit line, can be ACTIVE or INACTIVE |
maxLimit | Float | Maximum credit limit assigned to the user |
availableLimit | Float | Currently available limit of the user |
validity | String | Indicates the expiry date of credit line in YYYY-MM-DD |
inactiveReason | String | Reason for status to be INACTIVE |
# Error Cases
Case | HTTP Code |
---|---|
Missing customerID | 403 |
user with credit line not found | 404 |
# Credit Line Transactions
Returns credit line transactions for a given user using the customerID
Endpoint
GET base_url
/v1/creditline/transactions?customerID=someCustomerID
Response Format
{
"data": {
"transactions": [
{
"txnID": "e07a8733-2d7e-46a1-9146-fda547ce8b0d",
"partnerTxnID": "1234OD123312",
"invoiceNo": "123",
"txnStatus": "CONFIRMED",
"amount": 1200,
"interest": 0,
"emiCalculationMethod": "reducing_balance",
"subventionAmount": 24,
"processingFee": 0,
"gst": 18,
"disbursalAmount": 1171.68,
"createdAt": "2020-02-12 13:02:12",
"disbursalUTR": "",
"lenderName": "XYZ Lender",
"emis": [
{
"amount": 1200,
"installmentNum": 1,
"charges": [
{
"chargeType": "LATE_CHARGE",
"charge": 0
},
{
"chargeType": "NACH_BOUNCE_CHARGE",
"charge": 0
},
{
"chargeType": "LATE_INTEREST_CHARGE",
"charge": 0
}
],
"status": "PAID",
"dueDate": "2020-02-14",
"paidDate": "2020-02-13",
"totalPayable": 1200,
}
]
}
]
},
"error": "",
"status": true
}
Response fields are explained below:
Field | Type | Description |
---|---|---|
txnID | String | Unique Transaction ID generated by FinBox |
partnerTxnID | String | Transaction ID passed on Client SDK |
invoiceNo | String | Invoice No for the transaction |
txnStatus | String | Status of transaction can be PROCESSING , CONFIRMED , DISBURSED , PAID , CANCELLED , OVERDUE |
amount | Float | Transaction amount |
interest | Float | Annual Interest Percentage user is paying for this transaction |
subventionAmount | Float | Subvention amount on this transaction |
processingFee | Float | Processing Fee on this transaction |
gst | Float | Indicates GST in percentage |
disbursalAmount | Float | Indicates the final amount that will be disbursed |
emiCalculationMethod | String | Can be flat_rate or reducing_balance |
createdAt | String | Transaction creation time in YYYY-MM-DD HH:MM:SS format |
disbursalUTR | String | UTR number of disbursal made by lender |
lenderName | String | Lender Name |
objects in emis
contain:
Field | Type | Description |
---|---|---|
amount | Float | Indicates the EMI Amount |
installmentNum | Integer | Installment Number |
charges | Array of objects | Contains array of different charges, possible chargeType are LATE_CHARGE , NACH_BOUNCE_CHARGE , LATE_INTEREST_CHARGE |
status | String | Payment status can be UNPAID , PAID , PENDING |
dueDate | String | Due date in YYYY-MM-DD format |
paidDate | String | Payment completion in YYYY-MM-DD format, if not paid is blank string "" |
totalPayable | Float | Total payable amount for the EMI |
filter basis of partnerTxnID
You can also pass an optional field, partnerTxnID
as query string parameter to filter out transactions basis of specified partnerTxnID
, as follows:
base_url
/v1/creditline/transactions?customerID=someCustomerID
&partnerTxnID=AZ123ABC
charges
Different meanings of charges are as follows:
LATE_CHARGE
: late fee added because of late in EMI paymentLATE_INTEREST_CHARGE
: total day wise interest added due to EMI payment delayNACH_BOUNCE_CHARGE
: this is added if nach was presented, but bounced
emis key
Array of objects in emis
will be empty in case of CANCELLED
and PROCESSING
transactions.
# Error Cases
Case | HTTP Code |
---|---|
Missing customerID | 403 |
user with credit line not found | 404 |
# Confirm Credit Line Transaction
Confirms Credit Line Transaction in processing state
NOTE
- This API's request format is specific to e-commerce use case, and is disabled by default for clients with a different use case.
- For other use cases, FinBox team will share a different API for updating the status.
Endpoint
POST base_url
/v1/creditline/txn/confirm
Request Format
{
"txnID": "573d04f2-6e25-44ac-8247-0565df5cbd0d",
"awbNo": "AWB_NO_HERE",
"invoiceNo": "INVOICE_NO_HERE",
"podExtension": "jpg",
"podBase64": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxAQDw8QDw8PDxAQDw8PDw8NDw8PDw8PFREWFhUVFRUYHSggGBolHRUVITEhJSkrLi4uFx8zODMtNygtLisBCgoKDg0OGhAQGi0lHiUtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tListLS0tLS0tLS0tLS0uLf/AABEIAOQA3QMBIgACEQEDEQH/xAAcAAACAgMBAQAAAAAAAAAAAAAAAQIDBAUGBwj/xAA2EAACAgECBAQEBAYBBQAAAAAAAQIDEQQhBRIxQQZRYXETIjKBB5GhsRQjQlLB0XIzYnPw8f/EABkBAAMBAQEAAAAAAAAAAAAAAAABAwIEBf/EACERAQEBAQACAgIDAQAAAAAAAAABAhEDIRIxQVETInFh/9oADAMBAAIRAxEAPwD0oBDNADEMAAAABgAAAAAAMAAAAAAAAAAAAAAAABgCGAAgGIAAAABAADJEYAZMDAAAAYAAADAAAIymkK2T7CQmyt2AiGvP+m5hPnQncl1wl5vZEJ7b+R4X4x4nqr75O5zUcvkqy+SEO2F0e3cU+ep3p8j3uucH/UvtuvzyWKrPRnzLptbZCUZQnOEo9JQk015dD2X8OPEduqokrsudU+Rz6c6wmn777j+W8/YuZ+HZSg0RMqNqa3X3I2Vd0UztjjHAbEUIAADAABAAAAAIAACIAARmAAAMAGAAmxtmv1Opzsuhje5mHJ1dbqfL8zD1GvrrXNZZCC85yjFfqYfEdY6qrLFD4jrg5Kvf55Lotu2cHh/G+I333Ts1E5Tm5Nvm+mPpGPSKXkjn+Ot3qvqPf9JrqrPoshPHXklGX7GwjjB82cP11tViurnKM088yby/fz+5734U4jLU6am2Sw51xk0uza3+xjfjufs5ZfpunDJwPijwPZZZ8XTTWOf4jptb+HzZy+XqlnyZ6Eo/+rqVyKeLyfFnWXk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ID, this can be fetched using the Credit Line Transactions API |
awbNo | String | Air Waybill Number |
invoiceNo | String | Invoice Number |
podExtension | String | File extension for proof of delivery, can be jpg , png or pdf |
podBase64 | String | Base 64 encoded file content of proof of delivery |
invoiceExtension | String | File extension for invoice, can be jpg , png or pdf |
invoiceBase64 | String | Base 64 encoded file content of invoice |
On successful updating the status, API will give a response with 200 HTTP status code.
# Error Cases
Case | HTTP Code |
---|---|
Missing txnID | 403 |
Any other missing field | 400 |
Invalid extension | 400 |
Error decoding base 64 string | 400 |
Error processing file | 400 |
txnID not found | 404 |
only transaction with status PROCESSING can be updated | 403 |
# Cancel Credit Line Transaction
Cancels Credit Line Transaction in processing state
Endpoint
POST base_url
/v1/creditline/txn/cancel
Request Format
{
"txnID": "0e882dbd-3768-4c68-8986-57b68d0669d3"
}
Field | Type | Description |
---|---|---|
txnID | String | Unique FinBox Transaction ID, this can be fetched using the Credit Line Transactions API |
On successful updating the status, API will give a response with 200 HTTP status code.
# Error Cases
Case | HTTP Code |
---|---|
Missing txnID | 403 |
txnID not found | 404 |
only transaction with status PROCESSING can be updated | 403 |
# Split Credit Line Transaction
Splits Credit Line Transaction in processing state into different transactions.
Example of a use-case for this API in e-commerce contet would when the same order has different invoices, shipment or deliveries. After splitting, each transaction can further be splitted or moved to cancelled / confirmed state.
Endpoint
POST base_url
/v1/creditline/txn/split
Request Format
{
"txnID": "039b0552-31e3-4724-a35c-0d5edd663bcf",
"invoices": [
{"invoiceNo": "DEFS123", "amount": 1000},
{"invoiceNo": "ABNC456", "amount": 500},
{"invoiceNo": "", "amount": 1500}
]
}
Field | Type | Description |
---|---|---|
txnID | String | Unique FinBox Transaction ID, this can be fetched using the Credit Line Transactions API |
invoiceNo | String | Invoice Number. This is optional and can be skipped by passing blank string |
amount | Float | Amount of the sub transaction |
# Response format
On successful updating the status, API will give a response with 200 HTTP status code with details on sub-transactions created after the split.
For the example, let's assume transaction id 039b0552-31e3-4724-a35c-0d5edd663bcf
had original amount of 34,000, and example request payload above was used.
{
"data": {
"msg": "success",
"transactions": [
{
"txnID": "74ecb785-5323-45b9-bed5-303f3a927cb1",
"amount": 1000,
"invoiceNo": "DEFS123"
},
{
"txnID": "226eefa8-458c-4a58-9336-28e90bdcd2e6",
"amount": 500,
"invoiceNo": "ABNC456"
},
{
"txnID": "ceb4c3eb-51eb-4164-b4a6-d6279e64e07d",
"amount": 1500,
"invoiceNo": ""
},
{
"txnID": "c0dcfe89-f8b3-414d-a52c-0d9d022ec382",
"amount": 31000,
"invoiceNo": ""
}
]
},
"error": "",
"status": true
}
Here, amount
is of type Float.
NOTE
- Please make sure sum of amounts add up to the original transaction amount being split
- API will throw an error if total amount exceeds the original transaction amount being split
- In case sum of amounts is less than original transaction amount, another transaction with no invoiceNo and left over amount will be created, and split will proceed
- After split is complete sub transactions will have same
partnerTxnID
but differenttxnID
(FinBox Transaction ID). In such cases,invoiceNo
andamount
fields in Credit Line Transactions API can be used to distinguish between the sub transactions.
# Error Cases
Case | HTTP Code |
---|---|
Missing txnID | 403 |
txnID not found | 404 |
only transaction with status PROCESSING can be splitted | 403 |
amount should be greater than 0 | 400 |
sum of invoice amounts cannot exceed transaction amount | 400 |
# Merge Credit Line Transactions
Merge Credit Line Transactions in processing state to a single transaction. Useful when different orders have same invoice. After merging, invoice can be moved to cancelled / confirmed state.
Endpoint
POST base_url
/v1/creditline/txn/merge
Request Format
{
"txnIDs": ["039b0552-31e3-4724-a35c-0d5edd663bcf", "234b0552-21e3-1722-a35c-1e2edd663bcf"]
}
Field | Type | Description |
---|---|---|
txnIDs | Array of strings | Array of unique FinBox Transaction IDs, this can be fetched using the Credit Line Transactions API |
On successful merging, API will give a response with 200 HTTP status code and new merged finbox txn id.
# Response
{
"data": {
"mergedTxnID": "712c0552-33e3-5224-b35c-1d5edd663bde"
},
"status": true,
"error": ""
}
# Error Cases
Case | HTTP Code |
---|---|
Missing txnIDs | 400 |
< 2 items in txnIDs key | 400 |
txnID passed is not found | 404 |
mismatch in txn loan details | 409 |
transaction passed not in processing state | 409 |
# Overdue Credit Lines
Returns customers with overdue txns and payment links
Endpoint
GET base_url
/v1/creditline/overdue
# Response
{
"data": {
"users": [
{
"customerID": "some_customer_id",
"loanApplicationNo": "FB1620071147561625",
"availableLimit": 7000,
"maxLimit": 16000,
"status": "INACTIVE",
"inactiveReason": "pay emis to reactive link",
"paymentLink": "https://payment-link",
"overdueAmount": 9000,
"overdueTxns": [
{
"txnID": "8cf9ae88-d379-4afa-b7a8-eeb1165bbecc",
"txnAmount": 9000,
"totalPayable": 9000,
"invoiceNo": "A123",
"awbNo": "123456764534534",
"partnerTxnID": "partner_txn_id_sample",
"dueDate": "2021-06-05",
"amountReceived": 0
}
]
}
]
},
"error": "",
"status": true
}
Field | Type | Description |
---|---|---|
customerID | String | Customer ID of the user |
loanApplicationNo | String | Loan Application No linked with credit link account |
availableLimit | Float | Available Limit |
maxLimit | Float | Maximum Limit |
status | String | Credit Line Status, can be ACTIVE or INACTIVE |
inactiveReason | String | specifies the reason for status being INACTIVE |
paymentLink | String | Payment Link for clearing all dues |
overdueAmount | Float | Sum of all pending amounts (totalPayable - amountReceived) |
txnID | String | Unique FinBox Txn ID |
txnAmount | Float | Transaction Amount |
totalPayable | Float | Total amount expected to be paid off against the transaction (doesn't include partially paid amount) |
amountReceived | Float | Total amount paid (partial) paid against the transaction |
awbNo | String | AWB No of the transaction |
invoiceNo | String | Invoice No of the transaction |
partnerTxnID | String | Order ID / Partner Txn ID |
dueDate | String | Oldest due date of the overdue txn |
# User Activity History
Returns the activity
Endpoint
GET base_url
/v1/user/activity?customerID=someCustomerID
# Response
{
"data": {
"userActivityHistory": [
{
"entityType": "sourcing_entity",
"loggedAt": "2020-09-15 17:52:58",
"eventType": "user_created",
"eventDescription": "",
"loanApplicationID": "",
"source": "",
"journeyType": "business_loan"
},
{
"entityType": "system",
"loggedAt": "2020-09-15 17:52:58",
"eventType": "loan_approved",
"eventDescription": "",
"loanApplicationID": "someLongUUID",
"source": "",
"journeyType": "business_loan"
}
]
},
"error": "",
"status": true
}
entityType
indicates who took the action eventeventType
indicates the active event or activitysource
indicates the last source passed in Generate Token API or Session APIjourneyType
can bebusiness_loan
,personal_loan
orcredit_line
A list of all possible activities (eventType
) can be found Appendix
A list of all possible entity types (entityType
) can be found Appendix
# Webhook
A webhook can be configured to receive events on different actions taken throughout the user journey.
To configure this, you can update the webhook URL in Settings page of FinBox Dashboard. The webhook URL should be a valid endpoint.
A Valid Endpoint:
- receives a POST request
- receives a request body with content-type
application/json
- returns a 2xx status code on successful reception.
We'll be sending JSON encoded body in the following payload format:
{
"customerID": "some_customer_id",
"entityType": "sourcing_entity",
"eventDescription": "",
"eventType": "eligibility_calculated",
"loanApplicationID": "",
"loggedAt": "2020-09-15 21:58:31",
"journeyType": "business_loan",
"source": ""
}
Retries and Timeout
- If the webhook endpoint gives a non 2xx HTTP status code, or if the API call fails, then maximum 3 times retry is attempted (maximum 4 attempts) with exponential backoff.
- Every webhook endpoint call has a timeout set of maximum 90 seconds.
IMPORTANT
loanApplicationID
is available once the loan application is created, and will not be available for credit line specific activities.eventDescription
is always a string, in some cases you might get string encoded JSON as well. These specific cases are mentioned in Appendix along with activities.source
indicates the last source passed in Generate Token API or Session APIjourneyType
can bebusiness_loan
,personal_loan
orcredit_line
A list of all possible activities (eventType
) can be found Appendix
A list of all possible entity types (entityType
) can be found Appendix