Create a loan
Loans
Create a loan
Submit, approve, and disburse a loan in a single call. Returns an Active loan.
POST
Create a loan
Creates a loan against an existing customer using one of the configured loan products. The returned loan is alreadyDocumentation Index
Fetch the complete documentation index at: https://docs.lms.bsa.ai/llms.txt
Use this file to discover all available pages before exploring further.
Active and ready for
repayments.
Loan terms (term length, repayment schedule, interest rate,
amortization, etc.) are inherited from the chosen productId, so the
request body carries only the three fields that vary per loan.
Request body
The customer this loan is for.
The loan product to use. List available products via
GET /v1/loan-products.
Requested principal amount. Must be greater than 0 and within the
product’s
minPrincipal/maxPrincipal bounds. The full principal is
approved and disbursed in the same call.Optional partner-supplied identifier for the loan (e.g. your wallet
transaction reference). The LMS enforces uniqueness — a duplicate
externalId is rejected with
aborted. Once set, you can reference
the loan on every repayment route via
/v1/loans/external/{externalId}/... instead of the numeric LMS id.Example
Response
200 OK returns the freshly-created and disbursed loan object.
id (string) is what every downstream call uses
(repayments, get, etc.).
totalOutstanding is the headline “how much is owed” amount;
nextDueDate / nextDueAmount are the next instalment to collect.
Errors
| Code | When |
|---|---|
invalid_argument | Missing customerId / productId / principal, or principal <= 0 |
not_found | productId or customerId does not exist |
aborted / invalid_argument | principal outside the product’s allowed range, or the customer is in a state that disallows new loans |

