Request Bank Statement
curl --request POST \
--url https://carbonapistagingsecure.getcarbon.co/baas/api/v1/loans/{applicationId}/bank-statement \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--header 'x-carbon-key: <x-carbon-key>' \
--data '
{
"account_number": "0123456789",
"sort_code": "058",
"num_months": 6
}
'const options = {
method: 'POST',
headers: {
'x-carbon-key': '<x-carbon-key>',
apikey: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({account_number: '0123456789', sort_code: '058', num_months: 6})
};
fetch('https://carbonapistagingsecure.getcarbon.co/baas/api/v1/loans/{applicationId}/bank-statement', 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}/bank-statement",
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([
'account_number' => '0123456789',
'sort_code' => '058',
'num_months' => 6
]),
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/{applicationId}/bank-statement"
payload = {
"account_number": "0123456789",
"sort_code": "058",
"num_months": 6
}
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/{applicationId}/bank-statement")
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 \"account_number\": \"0123456789\",\n \"sort_code\": \"058\",\n \"num_months\": 6\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/{applicationId}/bank-statement"
payload := strings.NewReader("{\n \"account_number\": \"0123456789\",\n \"sort_code\": \"058\",\n \"num_months\": 6\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",
"message": "Bank statement request initiated"
}Loans
Request Bank Statement
Request a bank statement for a loan application.
POST
/
v1
/
loans
/
{applicationId}
/
bank-statement
Request Bank Statement
curl --request POST \
--url https://carbonapistagingsecure.getcarbon.co/baas/api/v1/loans/{applicationId}/bank-statement \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--header 'x-carbon-key: <x-carbon-key>' \
--data '
{
"account_number": "0123456789",
"sort_code": "058",
"num_months": 6
}
'const options = {
method: 'POST',
headers: {
'x-carbon-key': '<x-carbon-key>',
apikey: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({account_number: '0123456789', sort_code: '058', num_months: 6})
};
fetch('https://carbonapistagingsecure.getcarbon.co/baas/api/v1/loans/{applicationId}/bank-statement', 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}/bank-statement",
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([
'account_number' => '0123456789',
'sort_code' => '058',
'num_months' => 6
]),
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/{applicationId}/bank-statement"
payload = {
"account_number": "0123456789",
"sort_code": "058",
"num_months": 6
}
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/{applicationId}/bank-statement")
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 \"account_number\": \"0123456789\",\n \"sort_code\": \"058\",\n \"num_months\": 6\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/{applicationId}/bank-statement"
payload := strings.NewReader("{\n \"account_number\": \"0123456789\",\n \"sort_code\": \"058\",\n \"num_months\": 6\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",
"message": "Bank statement request initiated"
}Overview
Requests a bank statement from the customer’s bank. For Carbon bank accounts use sort code565 — no account number or phone required. For all other banks, provide the account number and customer phone.
Request
Method:POSTURL:
/v1/loans/:applicationId/bank-statement
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-carbon-key | Header | string | Yes | API key for authentication. |
applicationId | Path | string | Yes | Application ID. |
Request Body — Carbon Bank
{
"sort_code": "565"
}
Request Body — External Bank
{
"sort_code": "058",
"account_number": "0123456789",
"phone": "08012345678"
}
| Field | Required | Description |
|---|---|---|
sort_code | Yes | 3–6 digit bank sort code. Use 565 for Carbon. |
account_number | Yes (external bank) | Exactly 10 digits. |
phone | Yes (external bank) | Valid Nigerian phone number. |
Response
200 OK
{
"status": "success",
"message": "Bank statement requested",
"data": {
"requestId": "stmt_abc123",
"status": "PENDING"
}
}
Error Responses
| Status | Message | Cause |
|---|---|---|
| 400 | sort_code is required | Missing sort code |
| 400 | sort_code must be 3–6 digits | Invalid format |
| 400 | account_number must be exactly 10 digits | Non-Carbon bank, missing or invalid account |
| 400 | phone must be a valid Nigerian number | Non-Carbon bank, missing or invalid phone |
| 400 | Application not found | Invalid applicationId |
| 422 | Application has no loan ID | Application not yet registered |
Authorizations
Provide your API key in the 'apikey' header.
Headers
Path Parameters
Body
application/json
Provide the required values for the request body.
Response
200 - application/json
Successful response
The response is of type object.
⌘I