Accept Loan Terms
curl --request PUT \
--url https://{tenant}.fincode.software/api/v1/services/user/accept-terms-and-conditions/{loanApplicationId}import requests
url = "https://{tenant}.fincode.software/api/v1/services/user/accept-terms-and-conditions/{loanApplicationId}"
response = requests.put(url)
print(response.text)const options = {method: 'PUT'};
fetch('https://{tenant}.fincode.software/api/v1/services/user/accept-terms-and-conditions/{loanApplicationId}', 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/v1/services/user/accept-terms-and-conditions/{loanApplicationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.fincode.software/api/v1/services/user/accept-terms-and-conditions/{loanApplicationId}"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{tenant}.fincode.software/api/v1/services/user/accept-terms-and-conditions/{loanApplicationId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.fincode.software/api/v1/services/user/accept-terms-and-conditions/{loanApplicationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_bodyAPI Endpoints
Accept Loan Terms
Allows customers to accept loan terms and conditions, which triggers automatic loan disbursement.
PUT
/
user
/
accept-terms-and-conditions
/
{loanApplicationId}
Accept Loan Terms
curl --request PUT \
--url https://{tenant}.fincode.software/api/v1/services/user/accept-terms-and-conditions/{loanApplicationId}import requests
url = "https://{tenant}.fincode.software/api/v1/services/user/accept-terms-and-conditions/{loanApplicationId}"
response = requests.put(url)
print(response.text)const options = {method: 'PUT'};
fetch('https://{tenant}.fincode.software/api/v1/services/user/accept-terms-and-conditions/{loanApplicationId}', 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/v1/services/user/accept-terms-and-conditions/{loanApplicationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.fincode.software/api/v1/services/user/accept-terms-and-conditions/{loanApplicationId}"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{tenant}.fincode.software/api/v1/services/user/accept-terms-and-conditions/{loanApplicationId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.fincode.software/api/v1/services/user/accept-terms-and-conditions/{loanApplicationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_bodyThis endpoint runs when customers accept the terms and conditions for an approved loan offer. Upon acceptance, the loan is automatically disbursed to the customer.
Request Headers
Path Parameters
The unique identifier (UUID) of the loan application for which terms are being accepted.
Code Examples
curl --location --request PUT 'https://{your-domain}.fincode.software/api/v1/services/user/accept-terms-and-conditions/123e4567-e89b-12d3-a456-426614174000' \
--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'
const axios = require('axios');
const BASE_URL = 'https://{your-domain}.fincode.software/api/v1/services/user';
async function acceptTermsAndConditions(accessToken, loanApplicationId) {
try {
const response = await axios.put(
`${BASE_URL}/accept-terms-and-conditions/${loanApplicationId}`,
{},
{
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()}`,
},
}
);
return response.data.data;
} catch (error) {
console.error(
'Failed to accept terms and conditions:',
error.response?.data || error.message
);
throw error;
}
}
