Get Loan Accounts
curl --request GET \
--url https://api.rolla.xyz/api/v1/external/wallet/loans \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.rolla.xyz/api/v1/external/wallet/loans"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.rolla.xyz/api/v1/external/wallet/loans', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rolla.xyz/api/v1/external/wallet/loans",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.rolla.xyz/api/v1/external/wallet/loans"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.rolla.xyz/api/v1/external/wallet/loans")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rolla.xyz/api/v1/external/wallet/loans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 200,
"message": "Loan accounts retrieved successfully",
"success": true,
"loans": [
{
"id": "d4e5f6a7-b8c9-4012-9def-456789012345",
"name": "Acme Ltd NGN Credit Line",
"currency": "NGN",
"balance": {
"availableBalance": 2000000,
"postedBalance": 2000000,
"pendingBalance": 0,
"lienAmount": 0
},
"virtualAccounts": [],
"credit_limit": 5000000,
"interest_rate": 12.5
}
]
}{
"status": 400,
"message": "Validation failed",
"code": "ACCOUNT_RESTRICTED",
"errors": [
{
"path": [
"amount"
],
"message": "amount must be a whole number of smallest currency units (e.g. cents)"
}
]
}{
"status": 400,
"message": "Validation failed",
"code": "ACCOUNT_RESTRICTED",
"errors": [
{
"path": [
"amount"
],
"message": "amount must be a whole number of smallest currency units (e.g. cents)"
}
]
}Get Loan Accounts
Retrieves the credit lines for the authenticated business, with balances and credit limits in smallest units. The accounts sit at the top level of the response as loans, not under data.
GET
/
wallet
/
loans
Get Loan Accounts
curl --request GET \
--url https://api.rolla.xyz/api/v1/external/wallet/loans \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.rolla.xyz/api/v1/external/wallet/loans"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.rolla.xyz/api/v1/external/wallet/loans', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rolla.xyz/api/v1/external/wallet/loans",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.rolla.xyz/api/v1/external/wallet/loans"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.rolla.xyz/api/v1/external/wallet/loans")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rolla.xyz/api/v1/external/wallet/loans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 200,
"message": "Loan accounts retrieved successfully",
"success": true,
"loans": [
{
"id": "d4e5f6a7-b8c9-4012-9def-456789012345",
"name": "Acme Ltd NGN Credit Line",
"currency": "NGN",
"balance": {
"availableBalance": 2000000,
"postedBalance": 2000000,
"pendingBalance": 0,
"lienAmount": 0
},
"virtualAccounts": [],
"credit_limit": 5000000,
"interest_rate": 12.5
}
]
}{
"status": 400,
"message": "Validation failed",
"code": "ACCOUNT_RESTRICTED",
"errors": [
{
"path": [
"amount"
],
"message": "amount must be a whole number of smallest currency units (e.g. cents)"
}
]
}{
"status": 400,
"message": "Validation failed",
"code": "ACCOUNT_RESTRICTED",
"errors": [
{
"path": [
"amount"
],
"message": "amount must be a whole number of smallest currency units (e.g. cents)"
}
]
}Retrieve the credit lines associated with your business, with their balances and credit limits. All amounts are in the smallest unit of the loan currency (kobo for NGN, cents for USD).
Example Request
curl -X GET "https://api.rolla.xyz/api/v1/external/wallet/loans" \
-H "X-API-Key: your_api_key_here"
Example Response
{
"status": 200,
"message": "Loan accounts retrieved successfully",
"success": true,
"loans": [
{
"id": "d4e5f6a7-b8c9-4012-9def-456789012345",
"name": "Acme Ltd NGN Credit Line",
"currency": "NGN",
"balance": {
"availableBalance": 2000000,
"postedBalance": 2000000,
"pendingBalance": 0,
"lienAmount": 0
},
"virtualAccounts": [],
"credit_limit": 5000000,
"interest_rate": 12.5
}
]
}
balance.postedBalance is the amount currently drawn. The credit still available to draw is credit_limit minus balance.postedBalance — in the example above, 3000000 kobo. interest_rate is an annual percentage, not an amount, so it is never converted to minor units.Unlike most reads on this API, the loan accounts sit at the top level of the response as
loans, not under data.