Skip to main content
POST
/
wallet
/
loans
/
repay
Repay Loan
curl --request POST \
  --url https://api.rolla.xyz/api/v1/external/wallet/loans/repay \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "loanAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "sourceWalletId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "amount": 25000,
  "description": "<string>"
}
'
{
  "success": true,
  "message": "Loan repayment successful",
  "data": {
    "transaction": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "type": "deposit",
      "status": "pending",
      "amount": 123,
      "currency": "<string>",
      "description": "<string>",
      "created_at": "2023-11-07T05:31:56Z"
    },
    "loanBalance": 1975000,
    "availableBalance": 3025000
  }
}
Repay a loan from a source wallet.

Example Request

curl -X POST "https://api.rolla.xyz/api/v1/external/wallet/loans/repay" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "loanAccountId": "d4e5f6a7-b8c9-0123-defg-456789012345",
    "sourceWalletId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "amount": 25000,
    "description": "Partial loan repayment"
  }'

Example Response

{
  "success": true,
  "message": "Loan repayment successful",
  "data": {}
}
You can make partial repayments. The source wallet must have sufficient available_balance to cover the repayment amount.

Authorizations

X-API-Key
string
header
required

Your Rolla API key

Body

application/json
loanAccountId
string<uuid>
required

ID of the loan account to repay

sourceWalletId
string<uuid>
required

ID of the wallet to pay from

amount
number
required

Amount to repay (positive number)

Example:

25000

description
string

Optional description

Maximum string length: 500

Response

Loan repayment successful

success
boolean
Example:

true

message
string
Example:

"Loan repayment successful"

data
object