Skip to main content

Server-side Implementation

To keep your business informed about transaction results outcomes (objects) through our API & SDK, we strongly recommend the use of Webhooks. This feature enables you to initiate additional workflows based on transaction events. Whenever an event you're subscribed to occurs, Creditchek will dispatch a POST request to the Webhook URL you specified, including information about the transaction event.

To activate webhook requests, you must enable this feature on the dashboard settings and configure your correct webhook Callback URL, which should accept POST HTTP requests.

Webhook requests include an "x-auth-signature" on the header, containing your app's LiveSecretKey, for verification purposes. You can leverage this key to authenticate and authorize your unique webhook request.

Sample Webhook Response
    {
"success": true,
"message": "Loan history fetched",
"data": [
{
"_id": "645ba39d5bc6ff7923e45e1b",
"loan": "otXAdXYBSOctnGplKSBI",
"analysisData": {
"widgetData": {
"_id": "630c8be99131cd442344e798",
"businessId": "630c8be89131cd442344e790",
"appId": "630c8be89131cd442344e794",
"theme": "light",
"minimumAverageMonthlyIncome": "70000.00",
"minimumMonthlySittingBalance": "10000.00",
"creditHistorySource": [
"all"
],
"maximumOutstandingLoanValue": "30000",
"totalActiveLoans": "1",
"existingLoanOverdue": "no",
"status": true,
"createdAt": "2022-08-29T09:50:33.367Z",
"updatedAt": "2023-05-08T07:29:03.418Z",
"__v": 4,
"minimumAvailableLoan": "200000",
"paymentDuration": [
"3 months",
"6 months",
"12 months"
],
"maximumAvailableLoan": "300000.00"
},
"insightData": {
"bvnFinancialAccounts": [],
"bvnFinancialInstitutionList": [],
"linkedFinancialAccount": [
{
"institution": {
"name": "fcmb",
"bankCode": "214",
"type": "PERSONAL_BANKING"
},
"name": "TEST",
"accountNumber": "1122334455",
"type": "savings",
"currency": "NGN",
"balance": "7300",
"bvn": "",
"isavailable": "false",
"lastTransactionDate": "2022-04-29T00:00:00.000Z",
"_id": "63b4c56268228e4be689817f",
"borrowerId": "630e1a9686b30445f31def25",
"businessId": "630c8be89131cd442344e790",
"__v": 0,
"createdAt": "2023-01-04T00:16:33.942Z",
"pdfUrl": "https://res.cloudinary.com/creditchek-africa/image/upload/v1672791423/pdfStatement/630c8be89131cd442344e790_630e1a9686b30445f31def25_214_savings_fcmb.pdf",
"source": "pdf",
"updatedAt": "2023-01-04T00:17:10.808Z"
}
],
"avgMonthlyIncome": 8861848.933333334,
"totalmoneyReceived": 132927734,
"totalmoneySpents": 133484255,
"eligibleAmount": 35092921.776,
"DTI_reason": "This is generally regarded as an unhealthy level of debt burden for most households or individuals and should serve as a red flag to start working on reducing\n their debt/expense ASAP. At this ratio, this borrower will have trouble qualifying for most loans and are at risk of a financial crisis should their monthly\n expenses continue to rise or income drop. Since their debt-burden ratio is over 50%, you'd very well advise the borrower to explore credit counseling/or consolidating debt payments in your financial organization.",
"incomeb4Tax": "",
"recurringDebt": "",
"bonusIncome": "",
"EDTI": {
"businessId": "630c8be89131cd442344e790",
"borrowerId": "630e1a9686b30445f31def25",
"average_monthly_income": 8861848.933333334,
"annual_edti": 55.72129740810898,
"average_monthly_balance": 2851176.230769231,
"average_monthly_recurring_debt_expenses": 5697619.846153846,
"number_of_active_months": 13,
"average_monthly_edti": 64.2938047016642,
"balance": {
"April 2021": 74062,
"May 2021": 867235,
"June 2021": 99650,
"July 2021": 16103576,
"August 2021": 8088536,
"September 2021": 3578717,
"October 2021": 102520,
"November 2021": 95445,
"December 2021": 563145,
"January 2022": 7090411,
"February 2022": 85413,
"March 2022": 309281,
"April 2022": 7300
},
"EDTI": {
"April 2022": 100,
"March 2022": 34,
"February 2022": 0,
"January 2022": 34,
"December 2021": 34,
"November 2021": 68,
"October 2021": 34,
"September 2021": 68,
"August 2021": 45,
"July 2021": 34,
"June 2021": 51,
"May 2021": 35,
"April 2021": 28
},
"recurrent_expenses_debt": {
"April 2022": 32819703,
"March 2022": 3009288,
"February 2022": 1674,
"January 2022": 3023056,
"December 2021": 3021360,
"November 2021": 6016575,
"October 2021": 3009208,
"September 2021": 6010056,
"August 2021": 4006976,
"July 2021": 3011498,
"June 2021": 4516537,
"May 2021": 3115374,
"April 2021": 2507753
},
"recurrent_debt_sum": 74069058,
"averageMonthlyIncome": 8861848.933333334,
"totalMoneyReceive": 132927734,
"totalMoneySpent": 133484255,
"eligibleAmount": 35092921.776,
"creditData": false,
"totalBorrowed": "null",
"totalOutstanding": "null",
"totalOverdue": "null",
"creditInsight": "null",
"spendingAnalysis": {
"airtime": [
1002688
],
"atm": [
0
],
"education": [
30608062
],
"electricity": [
0
],
"gambling": [
0
],
"investment": [
31008063
],
"loans": [
31008063
],
"party": [
0
],
"rent": [
0
],
"tax": [
3907
],
"titheOffering": [
31008063
],
"transfers": [
24018813
],
"transport": [
0
],
"tv": [
0
]
},
"titheOffering": {
"September 2021": 1002688,
"April 2022": 30005375
},
"airtime": {
"August 2021": 1002688
},
"investment": {
"September 2021": 1002688,
"April 2022": 30005375
},
"loans": {
"September 2021": 1002688,
"April 2022": 30005375
},
"transfers": {
"May 2021": 1502688,
"June 2021": 1502687,
"July 2021": 1002688,
"August 2021": 12000000,
"December 2021": 2002688,
"February 2022": 1002687,
"March 2022": 5005375
},
"education": {
"May 2021": 602687,
"April 2022": 30005375
},
"salary": {
"amount": [],
"narration": []
},
"creditBreakdown": {
"creditFirstHalf0": {
"January 2022": 11555700,
"February 2022": 4739,
"March 2022": 10241220,
"April 2022": 35520410
},
"creditFirstHalf1": {
"April 2021": 4020661,
"May 2021": 7765000,
"June 2021": 5251642
},
"creditFirstQuarter0": {
"January 2022": 11555700,
"February 2022": 4739,
"March 2022": 10241220
},
"creditFourthQuarter1": {
"October 2021": 3535699,
"November 2021": 6009500,
"December 2021": 14497124
},
"creditSecondHalf1": {
"July 2021": 20018113,
"August 2021": 12000000,
"September 2021": 2507926,
"October 2021": 3535699,
"November 2021": 6009500,
"December 2021": 14497124
},
"creditSecondQuarter0": {
"April 2022": 35520410
},
"creditSecondQuarter1": {
"April 2021": 4020661,
"May 2021": 7765000,
"June 2021": 5251642
},
"creditThirdQuarter1": {
"July 2021": 20018113,
"August 2021": 12000000,
"September 2021": 2507926
},
"dailyAverageDeposit": 365186.0824175824,
"dailyAverageWithdrawal": 366714.98626373627,
"weeklyAverageDeposit": 2556302.576923077,
"weeklyAverageWithdrawal": 2567004.903846154,
"debitFirstHalf0": {
"January 2022": 5028431,
"February 2022": 7009735,
"March 2022": 10017350,
"April 2022": 35822390
},
"debitFirstHalf1": {
"April 2021": 4510440,
"May 2021": 6971825,
"June 2021": 6019224
},
"debitFirstQuarter0": {
"January 2022": 5028431,
"February 2022": 7009735,
"March 2022": 10017350
},
"debitFourthQuarter1": {
"October 2021": 7011895,
"November 2021": 6016575,
"December 2021": 14029422
},
"debitSecondHalf1": {
"July 2021": 4014186,
"August 2021": 20015039,
"September 2021": 7017743,
"October 2021": 7011895,
"November 2021": 6016575,
"December 2021": 14029422
},
"debitSecondQuarter0": {
"April 2022": 35822390
},
"debitSecondQuarter1": {
"April 2021": 4510440,
"May 2021": 6971825,
"June 2021": 6019224
},
"debitThirdQuarter1": {
"July 2021": 4014186,
"August 2021": 20015039,
"September 2021": 7017743
},
"monthlyCredit": {
"April 2021": 4020661,
"May 2021": 7765000,
"June 2021": 5251642,
"July 2021": 20018113,
"August 2021": 12000000,
"September 2021": 2507926,
"October 2021": 3535699,
"November 2021": 6009500,
"December 2021": 14497124,
"January 2022": 11555700,
"February 2022": 4739,
"March 2022": 10241220,
"April 2022": 35520410
},
"monthlyDebit": {
"April 2021": 4510440,
"May 2021": 6971825,
"June 2021": 6019224,
"July 2021": 4014186,
"August 2021": 20015039,
"September 2021": 7017743,
"October 2021": 7011895,
"November 2021": 6016575,
"December 2021": 14029422,
"January 2022": 5028431,
"February 2022": 7009735,
"March 2022": 10017350,
"April 2022": 35822390
},
"max_bal_day_list_dict": [
115
],
"max_bal_week_list_dict": [
17
],
"max_depo_day_list_dict": [
115
],
"max_depo_week_list_dict": [
17
],
"min_bal_days_list_dict": [
117
],
"min_bal_week_list_dict": [
17
],
"numberOfActiveMonths": 13,
"perCredTrans": 21.29032258064516,
"perDebTrans": 78.70967741935485,
"negBalDays": 0,
"aveSweepMonthlyCred": 41.5,
"averageDailyBal": 5056252.086247948,
"maxCredit": 35520000,
"min_crebit": 410,
"meanCredit": 4028113.1515151514,
"maxDebit": 30000000,
"minDebit": 40,
"meanDebit": 1094133.237704918
}
}
},
"loanOriginator": {
"result": {
"minimumAverageMonthlyIncome": "true",
"minimumMonthlySittingBalance": "true"
},
"_id": "63b4c529118058f7ed038473",
"businessId": "630c8be89131cd442344e790",
"borrowerId": "630e1a9686b30445f31def25",
"requestId": "otXAdXYBSOctnGplKSBI",
"loanRequetAmount": "2,000",
"paymentDuration": "3 months",
"bvn": "22372292144",
"driverLicense": "",
"status": false,
"createdAt": "2023-01-04T00:15:37.032Z",
"updatedAt": "2023-05-10T14:01:00.760Z",
"__v": 0
}
},
"createdAt": "2023-05-10T14:01:02.018Z",
"updatedAt": "2023-05-10T14:01:02.018Z",
"__v": 0
}
]
}