Get Offer
curl --request GET \
--url https://carbonapistagingsecure.getcarbon.co/baas/api/v1/loans/{applicationId}/offer \
--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/{applicationId}/offer', 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/{applicationId}/offer",
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/{applicationId}/offer"
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/{applicationId}/offer")
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/{applicationId}/offer"
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",
"data": {
"offered_amount": 2000000,
"tenure": 3,
"interest_rate": 8,
"monthly_repayment": 719999,
"total_repayment": 2159997,
"expires_at": "2024-06-15T10:00:00Z",
"schedule": [
{
"dueDate": "2024-06-15",
"principalDue": 666666,
"interestDue": 53333,
"totalDue": 719999
}
]
}
}Loans
Get Loan Offer
Fetch the loan offer details once the application status is HAS_OFFER.
GET
/
v1
/
loans
/
{applicationId}
/
offer
Get Offer
curl --request GET \
--url https://carbonapistagingsecure.getcarbon.co/baas/api/v1/loans/{applicationId}/offer \
--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/{applicationId}/offer', 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/{applicationId}/offer",
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/{applicationId}/offer"
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/{applicationId}/offer")
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/{applicationId}/offer"
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",
"data": {
"offered_amount": 2000000,
"tenure": 3,
"interest_rate": 8,
"monthly_repayment": 719999,
"total_repayment": 2159997,
"expires_at": "2024-06-15T10:00:00Z",
"schedule": [
{
"dueDate": "2024-06-15",
"principalDue": 666666,
"interestDue": 53333,
"totalDue": 719999
}
]
}
}Overview
Returns the loan offer including amount, interest rate, tenure, and repayment schedule. Only available after the applicationstatus reaches HAS_OFFER.
Request
Method:GETURL:
/v1/loans/:applicationId/offer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-carbon-key | Header | string | Yes | API key for authentication. |
applicationId | Path | string | Yes | Application ID. |
Response
200 OK
{
"status": "success",
"message": "Offer fetched",
"data": {
"id": 42,
"offerAmount": 200000000,
"tenure": 3,
"interestRate": 8.0,
"repaymentSchedule": [
{
"dueDate": "2025-02-15",
"principalDue": 6666666,
"interestDue": 533333,
"totalDue": 7199999
},
{
"dueDate": "2025-03-15",
"principalDue": 6666666,
"interestDue": 480000,
"totalDue": 7146666
}
],
"offerStatus": "PENDING",
"expiresAt": "2025-01-22T10:00:00.000Z"
}
}
| Field | Description |
|---|---|
offerAmount | Approved loan amount in kobo |
tenure | Repayment period in months |
interestRate | Annual interest rate as a percentage |
repaymentSchedule | Monthly breakdown of principal, interest, and total |
offerStatus | PENDING until customer accepts or declines |
expiresAt | UTC timestamp when the offer expires |
Error Responses
| Status | Message | Cause |
|---|---|---|
| 400 | Application not found | Invalid applicationId |
| 422 | Application has no loan ID | Application not yet registered |
⌘I