Get Repayment Schedule
curl --request GET \
--url https://carbonapistagingsecure.getcarbon.co/baas/api/v1/loans/{loanId}/repayments \
--header 'apikey: <api-key>' \
--header 'x-carbon-key: <x-carbon-key>'const options = {
method: 'GET',
headers: {'x-carbon-key': '<x-carbon-key>', apikey: '<api-key>'}
};
fetch('https://carbonapistagingsecure.getcarbon.co/baas/api/v1/loans/{loanId}/repayments', 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://carbonapistagingsecure.getcarbon.co/baas/api/v1/loans/{loanId}/repayments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apikey: <api-key>",
"x-carbon-key: <x-carbon-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://carbonapistagingsecure.getcarbon.co/baas/api/v1/loans/{loanId}/repayments"
headers = {
"x-carbon-key": "<x-carbon-key>",
"apikey": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)require 'uri'
require 'net/http'
url = URI("https://carbonapistagingsecure.getcarbon.co/baas/api/v1/loans/{loanId}/repayments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-carbon-key"] = '<x-carbon-key>'
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://carbonapistagingsecure.getcarbon.co/baas/api/v1/loans/{loanId}/repayments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-carbon-key", "<x-carbon-key>")
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": "success",
"message": "Repayment schedule fetched",
"data": {
"schedule": [
{
"dueDate": "2025-02-15",
"principalDue": 6666666,
"interestDue": 533333,
"totalDue": 7199999,
"paidAmount": 0,
"status": "UNPAID"
},
{
"dueDate": "2025-03-15",
"principalDue": 6666666,
"interestDue": 480000,
"totalDue": 7146666,
"paidAmount": 0,
"status": "UNPAID"
}
]
}
}Loans
Get Repayment Schedule
Fetch the full repayment schedule for an active loan.
GET
/
v1
/
loans
/
{loanId}
/
repayments
Get Repayment Schedule
curl --request GET \
--url https://carbonapistagingsecure.getcarbon.co/baas/api/v1/loans/{loanId}/repayments \
--header 'apikey: <api-key>' \
--header 'x-carbon-key: <x-carbon-key>'const options = {
method: 'GET',
headers: {'x-carbon-key': '<x-carbon-key>', apikey: '<api-key>'}
};
fetch('https://carbonapistagingsecure.getcarbon.co/baas/api/v1/loans/{loanId}/repayments', 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://carbonapistagingsecure.getcarbon.co/baas/api/v1/loans/{loanId}/repayments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apikey: <api-key>",
"x-carbon-key: <x-carbon-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://carbonapistagingsecure.getcarbon.co/baas/api/v1/loans/{loanId}/repayments"
headers = {
"x-carbon-key": "<x-carbon-key>",
"apikey": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)require 'uri'
require 'net/http'
url = URI("https://carbonapistagingsecure.getcarbon.co/baas/api/v1/loans/{loanId}/repayments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-carbon-key"] = '<x-carbon-key>'
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://carbonapistagingsecure.getcarbon.co/baas/api/v1/loans/{loanId}/repayments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-carbon-key", "<x-carbon-key>")
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": "success",
"message": "Repayment schedule fetched",
"data": {
"schedule": [
{
"dueDate": "2025-02-15",
"principalDue": 6666666,
"interestDue": 533333,
"totalDue": 7199999,
"paidAmount": 0,
"status": "UNPAID"
},
{
"dueDate": "2025-03-15",
"principalDue": 6666666,
"interestDue": 480000,
"totalDue": 7146666,
"paidAmount": 0,
"status": "UNPAID"
}
]
}
}Overview
Returns the complete repayment schedule for an active loan, including due dates, principal, interest, and payment status per instalment.Note: The:loanIdpath parameter is the loan ID (fieldloan_idon the application record, populated after disbursement) — not theapplication_id.
Request
Method:GETURL:
/v1/loans/:loanId/repayments
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-carbon-key | Header | string | Yes | API key for authentication. |
loanId | Path | string | Yes | Loan ID from the application record (loan_id field). |
Response
200 OK
{
"status": "success",
"message": "Repayment schedule fetched",
"data": {
"schedule": [
{
"dueDate": "2025-02-15",
"principalDue": 6666666,
"interestDue": 533333,
"totalDue": 7199999,
"paidAmount": 0,
"status": "UNPAID"
},
{
"dueDate": "2025-03-15",
"principalDue": 6666666,
"interestDue": 480000,
"totalDue": 7146666,
"paidAmount": 0,
"status": "UNPAID"
}
]
}
}
Error Responses
| Status | Message | Cause |
|---|---|---|
| 400 | Loan not found | loanId does not match any loan under this merchant |
| 422 | No SME loan ID on record | Loan not yet registered in lending engine |
Authorizations
Provide your API key in the 'apikey' header.
Headers
Path Parameters
Loan ID from the application record (loan_id field, not application_id)
Response
200 - application/json
Successful response
The response is of type object.
⌘I