Request Loan
curl --request POST \
--url https://{tenant}.fincode.software/api/v6/services/user/request-loan \
--header 'Content-Type: application/json' \
--data '
{
"currencyCode": "<string>",
"dateOfBirth": "<string>",
"durationCounter": 123,
"loanApplicationStatusEnum": "REQUESTED",
"employmentStatus": "<string>",
"loanAmount": 123,
"bvn": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"accountNumber": "<string>",
"bankCode": "<string>",
"phoneNumber": "<string>",
"loanDuration": 123,
"loanProductId": "<string>",
"loanRepaymentMethodEnum": "<string>",
"monthlyIncome": 123,
"eligibilityAnswers": [
{
"questionId": "<string>",
"answer": "<string>"
}
]
}
'import requests
url = "https://{tenant}.fincode.software/api/v6/services/user/request-loan"
payload = {
"currencyCode": "<string>",
"dateOfBirth": "<string>",
"durationCounter": 123,
"loanApplicationStatusEnum": "REQUESTED",
"employmentStatus": "<string>",
"loanAmount": 123,
"bvn": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"accountNumber": "<string>",
"bankCode": "<string>",
"phoneNumber": "<string>",
"loanDuration": 123,
"loanProductId": "<string>",
"loanRepaymentMethodEnum": "<string>",
"monthlyIncome": 123,
"eligibilityAnswers": [
{
"questionId": "<string>",
"answer": "<string>"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
currencyCode: '<string>',
dateOfBirth: '<string>',
durationCounter: 123,
loanApplicationStatusEnum: 'REQUESTED',
employmentStatus: '<string>',
loanAmount: 123,
bvn: '<string>',
firstName: '<string>',
lastName: '<string>',
accountNumber: '<string>',
bankCode: '<string>',
phoneNumber: '<string>',
loanDuration: 123,
loanProductId: '<string>',
loanRepaymentMethodEnum: '<string>',
monthlyIncome: 123,
eligibilityAnswers: [{questionId: '<string>', answer: '<string>'}]
})
};
fetch('https://{tenant}.fincode.software/api/v6/services/user/request-loan', 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://{tenant}.fincode.software/api/v6/services/user/request-loan",
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([
'currencyCode' => '<string>',
'dateOfBirth' => '<string>',
'durationCounter' => 123,
'loanApplicationStatusEnum' => 'REQUESTED',
'employmentStatus' => '<string>',
'loanAmount' => 123,
'bvn' => '<string>',
'firstName' => '<string>',
'lastName' => '<string>',
'accountNumber' => '<string>',
'bankCode' => '<string>',
'phoneNumber' => '<string>',
'loanDuration' => 123,
'loanProductId' => '<string>',
'loanRepaymentMethodEnum' => '<string>',
'monthlyIncome' => 123,
'eligibilityAnswers' => [
[
'questionId' => '<string>',
'answer' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.fincode.software/api/v6/services/user/request-loan"
payload := strings.NewReader("{\n \"currencyCode\": \"<string>\",\n \"dateOfBirth\": \"<string>\",\n \"durationCounter\": 123,\n \"loanApplicationStatusEnum\": \"REQUESTED\",\n \"employmentStatus\": \"<string>\",\n \"loanAmount\": 123,\n \"bvn\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"bankCode\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"loanDuration\": 123,\n \"loanProductId\": \"<string>\",\n \"loanRepaymentMethodEnum\": \"<string>\",\n \"monthlyIncome\": 123,\n \"eligibilityAnswers\": [\n {\n \"questionId\": \"<string>\",\n \"answer\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}HttpResponse<String> response = Unirest.post("https://{tenant}.fincode.software/api/v6/services/user/request-loan")
.header("Content-Type", "application/json")
.body("{\n \"currencyCode\": \"<string>\",\n \"dateOfBirth\": \"<string>\",\n \"durationCounter\": 123,\n \"loanApplicationStatusEnum\": \"REQUESTED\",\n \"employmentStatus\": \"<string>\",\n \"loanAmount\": 123,\n \"bvn\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"bankCode\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"loanDuration\": 123,\n \"loanProductId\": \"<string>\",\n \"loanRepaymentMethodEnum\": \"<string>\",\n \"monthlyIncome\": 123,\n \"eligibilityAnswers\": [\n {\n \"questionId\": \"<string>\",\n \"answer\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.fincode.software/api/v6/services/user/request-loan")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"currencyCode\": \"<string>\",\n \"dateOfBirth\": \"<string>\",\n \"durationCounter\": 123,\n \"loanApplicationStatusEnum\": \"REQUESTED\",\n \"employmentStatus\": \"<string>\",\n \"loanAmount\": 123,\n \"bvn\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"bankCode\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"loanDuration\": 123,\n \"loanProductId\": \"<string>\",\n \"loanRepaymentMethodEnum\": \"<string>\",\n \"monthlyIncome\": 123,\n \"eligibilityAnswers\": [\n {\n \"questionId\": \"<string>\",\n \"answer\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyAPI Endpoints
Request Loan
Creates a new loan application request from a customer or agent.
POST
/
user
/
request-loan
Request Loan
curl --request POST \
--url https://{tenant}.fincode.software/api/v6/services/user/request-loan \
--header 'Content-Type: application/json' \
--data '
{
"currencyCode": "<string>",
"dateOfBirth": "<string>",
"durationCounter": 123,
"loanApplicationStatusEnum": "REQUESTED",
"employmentStatus": "<string>",
"loanAmount": 123,
"bvn": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"accountNumber": "<string>",
"bankCode": "<string>",
"phoneNumber": "<string>",
"loanDuration": 123,
"loanProductId": "<string>",
"loanRepaymentMethodEnum": "<string>",
"monthlyIncome": 123,
"eligibilityAnswers": [
{
"questionId": "<string>",
"answer": "<string>"
}
]
}
'import requests
url = "https://{tenant}.fincode.software/api/v6/services/user/request-loan"
payload = {
"currencyCode": "<string>",
"dateOfBirth": "<string>",
"durationCounter": 123,
"loanApplicationStatusEnum": "REQUESTED",
"employmentStatus": "<string>",
"loanAmount": 123,
"bvn": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"accountNumber": "<string>",
"bankCode": "<string>",
"phoneNumber": "<string>",
"loanDuration": 123,
"loanProductId": "<string>",
"loanRepaymentMethodEnum": "<string>",
"monthlyIncome": 123,
"eligibilityAnswers": [
{
"questionId": "<string>",
"answer": "<string>"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
currencyCode: '<string>',
dateOfBirth: '<string>',
durationCounter: 123,
loanApplicationStatusEnum: 'REQUESTED',
employmentStatus: '<string>',
loanAmount: 123,
bvn: '<string>',
firstName: '<string>',
lastName: '<string>',
accountNumber: '<string>',
bankCode: '<string>',
phoneNumber: '<string>',
loanDuration: 123,
loanProductId: '<string>',
loanRepaymentMethodEnum: '<string>',
monthlyIncome: 123,
eligibilityAnswers: [{questionId: '<string>', answer: '<string>'}]
})
};
fetch('https://{tenant}.fincode.software/api/v6/services/user/request-loan', 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://{tenant}.fincode.software/api/v6/services/user/request-loan",
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([
'currencyCode' => '<string>',
'dateOfBirth' => '<string>',
'durationCounter' => 123,
'loanApplicationStatusEnum' => 'REQUESTED',
'employmentStatus' => '<string>',
'loanAmount' => 123,
'bvn' => '<string>',
'firstName' => '<string>',
'lastName' => '<string>',
'accountNumber' => '<string>',
'bankCode' => '<string>',
'phoneNumber' => '<string>',
'loanDuration' => 123,
'loanProductId' => '<string>',
'loanRepaymentMethodEnum' => '<string>',
'monthlyIncome' => 123,
'eligibilityAnswers' => [
[
'questionId' => '<string>',
'answer' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.fincode.software/api/v6/services/user/request-loan"
payload := strings.NewReader("{\n \"currencyCode\": \"<string>\",\n \"dateOfBirth\": \"<string>\",\n \"durationCounter\": 123,\n \"loanApplicationStatusEnum\": \"REQUESTED\",\n \"employmentStatus\": \"<string>\",\n \"loanAmount\": 123,\n \"bvn\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"bankCode\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"loanDuration\": 123,\n \"loanProductId\": \"<string>\",\n \"loanRepaymentMethodEnum\": \"<string>\",\n \"monthlyIncome\": 123,\n \"eligibilityAnswers\": [\n {\n \"questionId\": \"<string>\",\n \"answer\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}HttpResponse<String> response = Unirest.post("https://{tenant}.fincode.software/api/v6/services/user/request-loan")
.header("Content-Type", "application/json")
.body("{\n \"currencyCode\": \"<string>\",\n \"dateOfBirth\": \"<string>\",\n \"durationCounter\": 123,\n \"loanApplicationStatusEnum\": \"REQUESTED\",\n \"employmentStatus\": \"<string>\",\n \"loanAmount\": 123,\n \"bvn\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"bankCode\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"loanDuration\": 123,\n \"loanProductId\": \"<string>\",\n \"loanRepaymentMethodEnum\": \"<string>\",\n \"monthlyIncome\": 123,\n \"eligibilityAnswers\": [\n {\n \"questionId\": \"<string>\",\n \"answer\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.fincode.software/api/v6/services/user/request-loan")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"currencyCode\": \"<string>\",\n \"dateOfBirth\": \"<string>\",\n \"durationCounter\": 123,\n \"loanApplicationStatusEnum\": \"REQUESTED\",\n \"employmentStatus\": \"<string>\",\n \"loanAmount\": 123,\n \"bvn\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"bankCode\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"loanDuration\": 123,\n \"loanProductId\": \"<string>\",\n \"loanRepaymentMethodEnum\": \"<string>\",\n \"monthlyIncome\": 123,\n \"eligibilityAnswers\": [\n {\n \"questionId\": \"<string>\",\n \"answer\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyCreates a new loan application request. Customers or agents can use this endpoint to submit loan applications with required details including loan amount, product selection, and eligibility information.
Request Headers
string
required
The JWT Access Token obtained from the
/login or /refresh-token endpoint.string
required
Unique idempotency key for the request to prevent duplicate processing.
string
required
The date and time at which the request was initiated (ISO 8601 format).
string
required
The IP address of the customer making the request.
string
required
Unique identifier for the interaction/session.
string
default:"application/json"
required
Must be
application/json.Request Body
string
required
The currency code for the loan (e.g., “NGN”).
string
required
Customer’s date of birth (YYYY-MM-DD).
number
required
The numeric value of the duration (e.g., 12).
string
default:"REQUESTED"
required
Initial status of the application. Must be “REQUESTED”.
string
required
Customer’s employment status (e.g., “EMPLOYED”, “SELF_EMPLOYED”).
number
required
The requested loan amount.
string
required
Bank Verification Number of the customer.
string
required
Customer’s first name.
string
required
Customer’s last name.
string
required
Bank account number for disbursement/repayment.
string
required
Code of the bank associated with the account number.
string
required
Customer’s phone number.
number
required
Duration of the loan.
string
required
The unique identifier of the loan product.
string
required
Method of repayment (e.g., “DIRECT_DEBIT”).
number
required
Customer’s monthly income.
array
Code Examples
curl --location --request POST 'https://{your-domain}.fincode.software/api/v6/services/user/request-loan' \
--header 'X-Auth-Token: YOUR_JWT_ACCESS_TOKEN' \
--header 'x-idempotency-key: unique-key-12345' \
--header 'x-fapi-auth-date: 2024-01-15T10:30:00Z' \
--header 'x-fapi-customer-ip-address: 192.168.1.1' \
--header 'x-fapi-interaction-id: interaction-12345' \
--header 'Content-Type: application/json' \
--data '{
"currencyCode": "NGN",
"dateOfBirth": "1990-01-01",
"durationCounter": 12,
"loanApplicationStatusEnum": "REQUESTED",
"employmentStatus": "EMPLOYED",
"loanAmount": 50000.00,
"bvn": "12345678901",
"firstName": "John",
"lastName": "Doe",
"accountNumber": "0123456789",
"bankCode": "044",
"phoneNumber": "08012345678",
"loanDuration": 12,
"loanProductId": "product-123",
"loanRepaymentMethodEnum": "DIRECT_DEBIT",
"monthlyIncome": 150000.00,
"eligibilityAnswers": [
{
"questionId": "q1",
"answer": "Yes"
}
]
}'
const axios = require('axios');
const BASE_URL = 'https://{your-domain}.fincode.software/api/v6/services/user';
async function requestLoan(accessToken, loanRequestData) {
try {
const response = await axios.post(
`${BASE_URL}/request-loan`,
{
customerId: loanRequestData.customerId,
loanProductId: loanRequestData.loanProductId,
requestedAmount: loanRequestData.requestedAmount,
purpose: loanRequestData.purpose || 'PERSONAL',
tenurePreference: loanRequestData.tenurePreference,
eligibilityAnswers: loanRequestData.eligibilityAnswers || [],
additionalNotes: loanRequestData.additionalNotes || '',
},
{
headers: {
'X-Auth-Token': accessToken,
'x-idempotency-key': `key-${Date.now()}`,
'x-fapi-auth-date': new Date().toISOString(),
'x-fapi-customer-ip-address': '192.168.1.1',
'x-fapi-interaction-id': `interaction-${Date.now()}`,
'Content-Type': 'application/json',
},
}
);
console.log('Loan application created successfully!');
console.log('Application ID:', response.data.data.loanApplicationId);
console.log('Status:', response.data.data.status);
console.log('Requested Amount:', response.data.data.requestedAmount);
if (response.data.data.nextSteps && response.data.data.nextSteps.length > 0) {
console.log('\nNext Steps:');
response.data.data.nextSteps.forEach((step, index) => {
console.log(` ${index + 1}. ${step}`);
});
}
return response.data.data;
} catch (error) {
console.error(
'Failed to create loan application:',
error.response?.data || error.message
);
throw error;
}
}
Body
application/json
Show child attributes
Show child attributes
Response
200
Loan application created successfully
⌘I
