Make a repayment on an active loan
cURL
curl --request POST \ --url https://api.example.com/lending/repay/{loanId} \ --header 'Content-Type: application/json' \ --data '{ "amount": 123 }'
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 }'
{ "loanId": "uuid", "amountPaid": "55.00", "totalRepaid": "55.00", "totalOwed": "105.00", "remaining": "50.00", "status": "ACTIVE", "collateralReturned": false }
status
REPAID
collateralReturned
true