POST /v1/loans call returns
an already-active loan — there is no separate approve or disburse
step.
1. Obtain a token
The API lives on two hosts:| Purpose | Host |
|---|---|
| Token issuance, authenticate, authorize | https://api.dev.auth.bsa.ai |
| All other endpoints (customers, loans, repayments, credit, etc.) | https://api.dev.bsa.ai |
kid.
{"token": "<JWT>"}. Tokens are valid for 365 days —
see Handling expiry for the
three recommended refresh patterns (proactive exp check, reactive
401 catch-and-retry, or a scheduled rotation cron).
All examples below assume TOKEN is set and BASE=https://api.dev.bsa.ai.
2. Create a customer
The only field you choose is your ownexternalId — the identifier
that ties the LMS customer record back to your system. Everything else
(office, names, legal form, activation date) is filled in server-side
and the customer is created Active immediately.
Response
id field — "42" as a string. Pass it back exactly as
received. firstname mirrors your externalId so the customer is
searchable by it; lastname is a fixed placeholder LMS requires for
person records.
3. Create a loan
Three required fields plus an optionalexternalId — your own
reference for the loan (e.g. a wallet transaction id). customerId
carries the customer’s externalId (the one you chose in step 2),
not the numeric LMS id — you never need to store LMS ids on your side.
Every loan term is inherited from the chosen product. The returned
loan is already Active.
Response (abbreviated)
principalOutstanding,
interestCharged, totalOutstanding, …) plus nextDueDate /
nextDueAmount and the amortisation repaymentSchedule. Partners can
render “you owe X, due Y” without a follow-up GET. See
Create a loan for the complete field reference.
4. Record a repayment
Two equivalent forms — by the LMS numeric id, or by the loan’sexternalId you set above.
waive-interest, recover, refund,
credit-balance-refund, charge-off, get/adjust/reverse transaction)
has both forms — see
Repayments → Identifying the loan.
Next steps
- Browse the full Customers API
- Read Errors so you can branch on failure codes
- Learn how pagination works on list endpoints

