Apply for Loan
curl --request POST \
--url https://carbonapistagingsecure.getcarbon.co/baas/api/v1/loans/apply \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--header 'x-carbon-key: <x-carbon-key>' \
--data '
{
"customer_id": "1732ca47-42b2-4990-a65d-c369e934eed3",
"amount": 2000000,
"repayment_period": 3,
"loan_purpose": "INVENTORY_MGT",
"reference": "MERCH_REF_001"
}
'const options = {
method: 'POST',
headers: {
'x-carbon-key': '<x-carbon-key>',
apikey: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
customer_id: '1732ca47-42b2-4990-a65d-c369e934eed3',
amount: 2000000,
repayment_period: 3,
loan_purpose: 'INVENTORY_MGT',
reference: 'MERCH_REF_001'
})
};
fetch('https://carbonapistagingsecure.getcarbon.co/baas/api/v1/loans/apply', 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/apply",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customer_id' => '1732ca47-42b2-4990-a65d-c369e934eed3',
'amount' => 2000000,
'repayment_period' => 3,
'loan_purpose' => 'INVENTORY_MGT',
'reference' => 'MERCH_REF_001'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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/apply"
payload = {
"customer_id": "1732ca47-42b2-4990-a65d-c369e934eed3",
"amount": 2000000,
"repayment_period": 3,
"loan_purpose": "INVENTORY_MGT",
"reference": "MERCH_REF_001"
}
headers = {
"x-carbon-key": "<x-carbon-key>",
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)require 'uri'
require 'net/http'
url = URI("https://carbonapistagingsecure.getcarbon.co/baas/api/v1/loans/apply")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-carbon-key"] = '<x-carbon-key>'
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer_id\": \"1732ca47-42b2-4990-a65d-c369e934eed3\",\n \"amount\": 2000000,\n \"repayment_period\": 3,\n \"loan_purpose\": \"INVENTORY_MGT\",\n \"reference\": \"MERCH_REF_001\"\n}"
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://carbonapistagingsecure.getcarbon.co/baas/api/v1/loans/apply"
payload := strings.NewReader("{\n \"customer_id\": \"1732ca47-42b2-4990-a65d-c369e934eed3\",\n \"amount\": 2000000,\n \"repayment_period\": 3,\n \"loan_purpose\": \"INVENTORY_MGT\",\n \"reference\": \"MERCH_REF_001\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-carbon-key", "<x-carbon-key>")
req.Header.Add("apikey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": "success",
"data": {
"application_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "PENDING"
}
}Loans
Apply for Loan
Submit a loan application for a KYC-verified customer.
POST
/
v1
/
loans
/
apply
Apply for Loan
curl --request POST \
--url https://carbonapistagingsecure.getcarbon.co/baas/api/v1/loans/apply \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--header 'x-carbon-key: <x-carbon-key>' \
--data '
{
"customer_id": "1732ca47-42b2-4990-a65d-c369e934eed3",
"amount": 2000000,
"repayment_period": 3,
"loan_purpose": "INVENTORY_MGT",
"reference": "MERCH_REF_001"
}
'const options = {
method: 'POST',
headers: {
'x-carbon-key': '<x-carbon-key>',
apikey: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
customer_id: '1732ca47-42b2-4990-a65d-c369e934eed3',
amount: 2000000,
repayment_period: 3,
loan_purpose: 'INVENTORY_MGT',
reference: 'MERCH_REF_001'
})
};
fetch('https://carbonapistagingsecure.getcarbon.co/baas/api/v1/loans/apply', 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/apply",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customer_id' => '1732ca47-42b2-4990-a65d-c369e934eed3',
'amount' => 2000000,
'repayment_period' => 3,
'loan_purpose' => 'INVENTORY_MGT',
'reference' => 'MERCH_REF_001'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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/apply"
payload = {
"customer_id": "1732ca47-42b2-4990-a65d-c369e934eed3",
"amount": 2000000,
"repayment_period": 3,
"loan_purpose": "INVENTORY_MGT",
"reference": "MERCH_REF_001"
}
headers = {
"x-carbon-key": "<x-carbon-key>",
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)require 'uri'
require 'net/http'
url = URI("https://carbonapistagingsecure.getcarbon.co/baas/api/v1/loans/apply")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-carbon-key"] = '<x-carbon-key>'
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer_id\": \"1732ca47-42b2-4990-a65d-c369e934eed3\",\n \"amount\": 2000000,\n \"repayment_period\": 3,\n \"loan_purpose\": \"INVENTORY_MGT\",\n \"reference\": \"MERCH_REF_001\"\n}"
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://carbonapistagingsecure.getcarbon.co/baas/api/v1/loans/apply"
payload := strings.NewReader("{\n \"customer_id\": \"1732ca47-42b2-4990-a65d-c369e934eed3\",\n \"amount\": 2000000,\n \"repayment_period\": 3,\n \"loan_purpose\": \"INVENTORY_MGT\",\n \"reference\": \"MERCH_REF_001\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-carbon-key", "<x-carbon-key>")
req.Header.Add("apikey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": "success",
"data": {
"application_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "PENDING"
}
}Overview
Submits a loan application for a customer whosekyc_status is VERIFIED. The reference field is a merchant-controlled idempotency key — submitting the same reference again returns the existing application with 200 OK instead of creating a duplicate.
All amounts are in kobo (1 NGN = 100 kobo).
Request
Method:POSTURL:
/v1/loans/apply
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-carbon-key | Header | string | Yes | API key for authentication. |
Request Body
{
"customer_id": "1732ca47-42b2-4990-a65d-c369e934eed3",
"amount": 2000000,
"repayment_period": 3,
"loan_purpose": "INVENTORY_MGT",
"reference": "MERCH_REF_20250115_001"
}
| Field | Type | Required | Description |
|---|---|---|---|
customer_id | string | Yes | UUID of the KYC-verified customer |
amount | number | Yes | Loan amount in kobo. Minimum: 300000 (₦3,000) |
repayment_period | number | Yes | Repayment duration in months. Range: 1 – 6 |
loan_purpose | string | Yes | See enum below |
reference | string | Yes | Merchant idempotency key. Max 100 characters. |
loan_purpose values:
| Value | Description |
|---|---|
WORKING_CAPITAL | Working capital |
EXPANSION_AND_GROWTH | Business expansion |
EQUIPMENT_PURCHASE | Equipment purchase |
INVENTORY_MGT | Inventory management |
DEBT_FINANCING | Debt financing |
STARTUP_CAPITAL | Startup capital |
OTHERS | Other purposes |
Response
201 — Application Created
{
"status": "success",
"message": "Loan application submitted",
"data": {
"application_id": "aaaabbbb-cccc-dddd-eeee-ffffffffffff",
"status": "PENDING",
"amount": 2000000,
"repayment_period": 3,
"loan_purpose": "INVENTORY_MGT",
"created_at": "2025-01-15T10:10:00.000Z"
}
}
200 — Duplicate Reference (Idempotent)
{
"status": "failed",
"message": "An application with this reference already exists",
"data": {
"application_id": "aaaabbbb-cccc-dddd-eeee-ffffffffffff",
"status": "PENDING",
"amount": 2000000,
"repayment_period": 3,
"loan_purpose": "INVENTORY_MGT",
"created_at": "2025-01-15T10:10:00.000Z"
}
}
Error Responses
| Status | Message | Cause |
|---|---|---|
| 400 | customer_id is required | Field missing |
| 400 | Customer not found | Customer not under this merchant |
| 400 | minimum loan amount is 300000 kobo | amount below minimum |
| 400 | repayment_period must be between 1 and 6 months | Out of range |
| 400 | loan_purpose must be one of: ... | Invalid enum value |
| 400 | reference must be 100 characters or less | reference too long |
| 422 | Customer KYC must be verified before applying for a loan | kyc_status is not VERIFIED |
Authorizations
Provide your API key in the 'apikey' header.
Headers
Body
application/json
Provide the required values for the request body.
Example:
"1732ca47-42b2-4990-a65d-c369e934eed3"
Loan amount in kobo
Example:
2000000
Tenure in months (1–6)
Example:
3
Example:
"INVENTORY_MGT"
Merchant idempotency key
Example:
"MERCH_REF_001"
Response
200 - application/json
Successful response
The response is of type object.
⌘I