REST APIs

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.

x-api-key: <SERVER_API_KEY>

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#

CaseHTTP Code
Missing customerID403
Missing mobile number403
Invalid mobile number403
User already exists409

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.

Prequalification API Workflow
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#

CaseHTTP Code
Missing customerID403
User not found400
User does not have eligibility data409

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
  • In case of production environment, the token is valid for 24 hours and in UAT it is valid for 1 week.
  • 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#

CaseHTTP Code
Missing customerID403
User does not exist404
User eligibility not available400
User not eligible for loan403
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.

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

ParameterOptionalTypeDescription
limitYesNumberRecords Per Page. Default Value is 10
pageYesNumberPage Number. Default Value is 1
fromYesDateFilter by a given start date (IST). Defaults to beginning of time. Format yyyy-mm-dd. Needs to be used with query param to
toYesDateFilter by a given end date (IST). Defaults to current date. Format yyyy-mm-dd. Needs to be used with query param from
customerIDYesStringFilter all users of a given %customerID% pattern.
mobileYesStringFilter all users of a given %mobileNumber% pattern.
statusTextYesStringFilter 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 in YYYY-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

ParameterOptionalTypeDescription
limitYesNumberRecords Per Page. Default Value is 10
pageYesNumberPage Number. Default Value is 1
fromYesDateFilter by a given start date (IST). Defaults to beginning of time. Format yyyy-mm-dd
toYesDateFilter by a given end date (IST). Defaults to current date. Format yyyy-mm-dd
customerIDYesStringFilter all loan applications of a given %customerID% pattern.
mobileYesStringFilter all loan applications of a given %mobileNumber% pattern.
statusTextYesStringFilter 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",
"userDetails": {
"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,
"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 | | 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": {
"lenderName": "XYZ Lender",
"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 | | - | - | - | | lenderName | String | Lender Name | | 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#

In case the loan product involves EDI (daily installments), you'll get an additional ediInfo key in response.

Sample Response

{
"data": {
"ediInfo": {
"amountPerDay": 6.65,
"edisPaid": 26,
"totalEDIs": 78
},
"emiList": [
{
"loanPaymentID": "01580ade-e750-4c1a-8a84-c78ee3d74123",
"amount": 173,
"installmentNum": 3,
"lateCharge": 0,
"status": "UNPAID",
"dueDate": "2021-12-03",
"paidDate": "",
"totalPayable": 173,
"amountReceived": 0
},
{
"loanPaymentID": "bc1aa687-035a-4c71-8988-628c8c519123",
"amount": 173,
"installmentNum": 2,
"lateCharge": 0,
"status": "UNPAID",
"dueDate": "2021-11-03",
"paidDate": "",
"totalPayable": 173,
"amountReceived": 2
},
{
"loanPaymentID": "84e0bcdf-7fa1-4634-8852-c648e4897123",
"amount": 173,
"installmentNum": 1,
"lateCharge": 0,
"status": "PAID",
"dueDate": "2021-10-04",
"paidDate": "2021-09-15",
"totalPayable": 173,
"amountReceived": 173
}
],
"lenderName": "XYZ Lender"
},
"error": "",
"status": true
}

EDI Keys: | Field | Type | Description | | - | - | - | | amountPerDay | Float | EDI Amount to be paid per day | | totalEDIs | Integer | Number of EDIs to be paid | | edisPaid | Integer | Number of EDIs fully paid |

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#

CaseHTTP Code
Missing customerID403
user with credit line not found404

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": "",
"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 |

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 payment
  • LATE_INTEREST_CHARGE: total day wise interest added due to EMI payment delay
  • NACH_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#

CaseHTTP Code
Missing customerID403
user with credit line not found404

Confirm Credit Line Transaction#

Confirms Credit Line Transaction in processing state

NOTE
  1. This API's request format is specific to e-commerce use case, and is disabled by default for clients with a different use case.
  2. 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/EACERAQEBAQACAgIDAQAAAAA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byb2R1Y2VyIChOZXZyb25hIERlc2lnbnMpDQovQ3JlYXRpb25EYXRlIChEOjIwMDYwMzAxMDcyODI2KQ0KPj4NCmVuZG9iag0KDQp4cmVmDQowIDExDQowMDAwMDAwMDAwIDY1NTM1IGYNCjAwMDAwMDAwMTkgMDAwMDAgbg0KMDAwMDAwMDA5MyAwMDAwMCBuDQowMDAwMDAwMTQ3IDAwMDAwIG4NCjAwMDAwMDAyMjIgMDAwMDAgbg0KMDAwMDAwMDM5MCAwMDAwMCBuDQowMDAwMDAxNTIyIDAwMDAwIG4NCjAwMDAwMDE2OTAgMDAwMDAgbg0KMDAwMDAwMjQyMyAwMDAwMCBuDQowMDAwMDAyNDU2IDAwMDAwIG4NCjAwMDAwMDI1NzQgMDAwMDAgbg0KDQp0cmFpbGVyDQo8PA0KL1NpemUgMTENCi9Sb290IDEgMCBSDQovSW5mbyAxMCAwIFINCj4+DQoNCnN0YXJ0eHJlZg0KMjcxNA0KJSVFT0YNCg=="
}
FieldTypeDescription
txnIDStringUnique FinBox Transaction ID, this can be fetched using the Credit Line Transactions API
awbNoStringAir Waybill Number
invoiceNoStringInvoice Number
podExtensionStringFile extension for proof of delivery, can be jpg, png or pdf
podBase64StringBase 64 encoded file content of proof of delivery
invoiceExtensionStringFile extension for invoice, can be jpg, png or pdf
invoiceBase64StringBase 64 encoded file content of invoice

On successful updating the status, API will give a response with 200 HTTP status code.

Error Cases#

CaseHTTP Code
Missing txnID403
Any other missing field400
Invalid extension400
Error decoding base 64 string400
Error processing file400
txnID not found404
only transaction with status PROCESSING can be updated403

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"
}
FieldTypeDescription
txnIDStringUnique 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#

CaseHTTP Code
Missing txnID403
txnID not found404
only transaction with status PROCESSING can be updated403

Split Credit Line Transaction#

Splits Credit Line Transaction in processing state into different transactions. Useful when same order has different invoices, shipment or deliveries. After splitting, each transaction can further be splitted or moved to cancelled / confirmed state.

NOTE
  1. This API's request format is specific to e-commerce use case, and is disabled by default for clients with a different use case.
  2. For other use cases if this is required, FinBox team will share a different API.
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}
]
}
FieldTypeDescription
txnIDStringUnique FinBox Transaction ID, this can be fetched using the Credit Line Transactions API
invoiceNoStringInvoice Number. This is optional and can be skipped by passing blank string
amountFloatAmount of the sub transaction

On successful updating the status, API will give a response with 200 HTTP status code.

NOTE
  1. Please make sure sum of amounts add up to the original transaction amount being split
  2. API will throw an error if total amount exceeds the original transaction amount being split
  3. 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
  4. After split is complete sub transactions will have same partnerTxnID but different txnID (FinBox Transaction ID). In such cases, invoiceNo and amount fields in Credit Line Transactions API can be used to distinguish between the sub transactions.

Error Cases#

CaseHTTP Code
Missing txnID403
txnID not found404
only transaction with status PROCESSING can be splitted403
amount should be greater than 0400
sum of invoice amounts cannot exceed transaction amount400

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 event
  • eventType indicates the active event or activity
  • source indicates the last source passed in Generate Token API or Session API
  • journeyType can be business_loan, personal_loan or credit_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
  1. 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.
  2. 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 API
  • journeyType can be business_loan, personal_loan or credit_line

A list of all possible activities (eventType) can be found Appendix

A list of all possible entity types (entityType) can be found Appendix