> ## Documentation Index
> Fetch the complete documentation index at: https://autoloans.liquidity.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Loan Payment

This endpoint is used to submit a **loan payment** against an active loan. It is typically invoked by the borrower or an authorized repayment agent to pay a scheduled installment or make a partial payment as per the loan agreement.

## What it does

* Records a **loan payment** against the specified loan
* Reduces the outstanding **principal** and/or **interest**
* Logs the payment **on-chain** for transparency and audit purposes

## When to use it

* On or before a scheduled installment due date
* For manual or automated loan payment processing
* When reconciling payments through third-party systems or channels

## Request Body

The request body must include the following fields:

```json theme={null}
{
  "loanId": "0x5a0c0663a48e3abf16c7f0ee632b57da833e44e02a290fc0920ea2858da31f73",
  "amount": 100,
  "refId": "REF123"
}
```

* `loanId`: The unique identifier of the loan being repaid.

* `amount`: The repayment amount.

* `refId`: A client-defined reference ID used for internal tracking, audit, or reconciliation.

## Response

* Returns a success confirmation along with the blockchain transaction hash:

```json theme={null}
{
  "transactionHash": "0x5a0c0663a48e3abf16c7f0ee632b57da833e44e02a290fc0920ea2858da31f73"
}
```
