API Search endpoints…⌘K Get API credentialsGet access

Repayments, refunds and write-offs

After disbursal, everything that changes what a borrower owes is a transaction on the loan. You post one with a command, and you read them back the same way you read any list.

Before you start

Set your environment

Every request authenticates with HTTP Basic and names its tenant in a header. Set these once and the commands below work as written.

export LOKTA_API="https://default.lokta.tech"
export LOKTA_USER="your-username"
export LOKTA_PASS="your-password"

1. Post a transaction

Send the command as a query parameter. The body carries the transactionDate and the transactionAmount, with dateFormat and locale.

curl -X POST "$LOKTA_API/lokta-lms/api/v1/loans/$LOAN_ID/transactions?command=repayment" \
  -u "$LOKTA_USER:$LOKTA_PASS" \
  -H "Tenant-Identifier: default" \
  -H "Content-Type: application/json" \
  -d '{
    "transactionDate": "03 October 2026",
    "transactionAmount": 1000,
    "dateFormat": "dd MMMM yyyy",
    "locale": "en"
  }'

2. Choose the command

These are the most used commands. The endpoint page lists every command it accepts.

repayment

Make a repayment.

downPayment

Record a down payment.

recoverypayment

Make a recovery payment.

merchantIssuedRefund

Merchant issued refund.

payoutRefund

Payout refund.

goodwillCredit

Goodwill credit.

chargeRefund

Charge refund.

refundByCash

Refund an active loan by cash.

creditBalanceRefund

Refund a credit balance.

waiveinterest

Waive interest.

writeoff

Write off the loan.

undowriteoff

Undo a write-off.

foreclosure

Foreclose an active loan.

close

Close the loan.

close-rescheduled

Close a rescheduled loan.

3. List and inspect transactions

List a loan's transactions, then retrieve one to see its detail.

curl -X GET "$LOKTA_API/lokta-lms/api/v1/loans/$LOAN_ID/transactions" \
  -u "$LOKTA_USER:$LOKTA_PASS" \
  -H "Tenant-Identifier: default"

Note the id of the transaction you want to change. The next step calls it $TRANSACTION_ID.

4. Adjust a transaction

Post to the transaction itself with the corrected date and amount. There is no need to send a command parameter.

transactionDate

Mandatory. The corrected date, sent with dateFormat and locale.

transactionAmount

Mandatory. The corrected amount.

curl -X POST "$LOKTA_API/lokta-lms/api/v1/loans/$LOAN_ID/transactions/$TRANSACTION_ID" \
  -u "$LOKTA_USER:$LOKTA_PASS" \
  -H "Tenant-Identifier: default" \
  -H "Content-Type: application/json" \
  -d '{
    "transactionDate": "03 October 2026",
    "transactionAmount": 900,
    "dateFormat": "dd MMMM yyyy",
    "locale": "en"
  }'

Where to go next

Every request authenticates with HTTP Basic and carries a Tenant-Identifier header. See the conventions. Read this guide as Markdown.

This is the API reference for Lokta, the agentic loan servicing platform. Go to lokta.ai