Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.digiflecttech.dev/llms.txt

Use this file to discover all available pages before exploring further.

Before submitting a loan request, you can check whether you are eligible for a specific amount. The eligibility check evaluates your current savings balance and any existing loans to give you a clear picture of what you can borrow. This prevents failed submissions and helps you offer members an accurate loan request form.
POST /api/loans/check-eligibility
This endpoint is authenticated. It always evaluates the currently logged-in member — you cannot check eligibility on behalf of another member.
Always call this endpoint before displaying the loan request form to your users. It tells you the maximum amount to allow in the form’s amount field and surfaces any blocking conditions (such as an existing active loan) before the member fills out and submits the full request.

Request body

amount
number
required
The loan amount you want to check. The API evaluates whether this specific amount is within your borrowing limit.
duration_months
number
required
The intended repayment duration in months. Used alongside amount when assessing the request.

Response fields

is_eligible
boolean
required
true if you can borrow the requested amount, false otherwise.
max_eligible_amount
number
required
The maximum amount you are currently eligible to borrow. Calculated as your total contributions multiplied by the group’s loan multiplier (typically 3×), capped at the group’s configured maximum loan limit.
reason
string
Present only when is_eligible is false. Explains why the request would be declined. Possible values:
  • "Member already has an active or pending loan." — you must fully repay your existing loan before requesting a new one.
  • "Requested amount exceeds MAX eligibility of <amount> (3x Savings)." — the amount you requested is higher than 3× your total contributions.

Example

curl --request POST \
  --url 'https://api.saveapp.example.com/api/loans/check-eligibility' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "amount": 300000,
    "duration_months": 6
  }'

Sample responses

Eligible member
{
  "is_eligible": true,
  "max_eligible_amount": 450000,
  "reason": null
}
Ineligible — existing active loan
{
  "is_eligible": false,
  "max_eligible_amount": 450000,
  "reason": "Member already has an active or pending loan."
}
Ineligible — amount exceeds savings multiplier
{
  "is_eligible": false,
  "max_eligible_amount": 150000,
  "reason": "Requested amount exceeds MAX eligibility of 150000 (3x Savings)."
}