Skip to main content
POST
/
v1
/
lms
/
loans
/
calculate-schedule
Preview a repayment schedule
curl --request POST \
  --url https://{baasHost}/api/v1/lms/loans/calculate-schedule \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "productCode": "<string>",
  "principal": 123,
  "customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "numberOfRepayments": 123,
  "repaymentEvery": 123,
  "interestRatePerPeriod": 123,
  "expectedDisbursementDate": "<string>",
  "linkWalletId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "createWalletProductCode": "<string>",
  "fspFundId": 123
}
'
{
  "currency": {
    "code": "TZS",
    "decimalPlaces": 2
  },
  "periods": [
    {
      "period": 1,
      "dueDate": "2026-04-15",
      "principalDue": 33333.33,
      "interestDue": 2500,
      "totalDueForPeriod": 35833.33
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer token from POST /generate-token. Expires ~1h; on 401, re-generate and retry once.

Body

application/json
productCode
string
required
principal
number
required

Loan principal amount (e.g. 100000).

customerId
string<uuid>
numberOfRepayments
integer
repaymentEvery
integer
repaymentFrequency
enum<string>
Available options:
DAYS,
WEEKS,
MONTHS,
YEARS
interestRatePerPeriod
number
expectedDisbursementDate
string

yyyy-MM-dd

Strategy B: attach an existing wallet.

createWalletProductCode
string

Strategy C: auto-provision a wallet + auto-sweep standing instruction. Temporarily unavailable — open a wallet and use linkWalletId instead.

fspFundId
integer

Response

200 - application/json

Schedule preview