Skip to main content
POST
/
lending
/
repay
/
{loanId}
Repay Loan
curl --request POST \
  --url https://api.example.com/lending/repay/{loanId} \
  --header 'Content-Type: application/json' \
  --data '{
  "amount": 123
}'

Request

amount
number
required
Amount to repay. Must be positive.
curl -X POST https://api.midasprotocol.org/lending/repay/loan-uuid \
  -H "Authorization: Bearer pp_your_key" \
  -H "Content-Type: application/json" \
  -d '{ "amount": 55 }'

Response

{
  "loanId": "uuid",
  "amountPaid": "55.00",
  "totalRepaid": "55.00",
  "totalOwed": "105.00",
  "remaining": "50.00",
  "status": "ACTIVE",
  "collateralReturned": false
}
When fully repaid, status becomes REPAID and collateralReturned becomes true.