Repay Loan
curl --request PUT \
--url https://ge-exchange-staging-1.herokuapp.com/v1/api/borrower/credit/loan/{loanId}/repay \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "<string>",
"cancel": true
}
'import requests
url = "https://ge-exchange-staging-1.herokuapp.com/v1/api/borrower/credit/loan/{loanId}/repay"
payload = {
"amount": "<string>",
"cancel": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({amount: '<string>', cancel: true})
};
fetch('https://ge-exchange-staging-1.herokuapp.com/v1/api/borrower/credit/loan/{loanId}/repay', 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://ge-exchange-staging-1.herokuapp.com/v1/api/borrower/credit/loan/{loanId}/repay",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '<string>',
'cancel' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://ge-exchange-staging-1.herokuapp.com/v1/api/borrower/credit/loan/{loanId}/repay"
payload := strings.NewReader("{\n \"amount\": \"<string>\",\n \"cancel\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://ge-exchange-staging-1.herokuapp.com/v1/api/borrower/credit/loan/{loanId}/repay")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"<string>\",\n \"cancel\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ge-exchange-staging-1.herokuapp.com/v1/api/borrower/credit/loan/{loanId}/repay")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"<string>\",\n \"cancel\": true\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Loan repayment processed successfully",
"data": {
"id": "67f67f0f8b28995e47bed8db",
"borrower": "67d3267b6b2f7dfc493db74a",
"creditor": "624598bd83067c00f691c0ca",
"amount": 840000,
"currency": "NGN",
"repayment_amount": 796000,
"repayment_date": "Wed Jul 09 2025 15:07:06 GMT+0100 (West Africa Standard Time)",
"interest_rate": 0.3,
"duration": 3,
"status": "ACTIVE",
"grace_period": 5,
"grace_period_unit": "DAYS",
"reason": "Personal Use",
"created_at": "2025-04-09T14:07:11.828Z",
"updated_at": "2025-04-09T14:07:36.091Z",
"collaterals": [
{
"name": "CredPal2",
"token_id": "67e30ac4c6ee9dd9cc0fe0e4",
"quantity": 0
},
{
"name": "CredPal",
"token_id": "66b3dd8b7f741f367b960f26",
"quantity": 52.36842105263158
}
]
}
}
Credit Loan
Repay Loan
Creates a new loan using specified collateral against a matched loan configuration.
PUT
/
api
/
borrower
/
credit
/
loan
/
{loanId}
/
repay
Repay Loan
curl --request PUT \
--url https://ge-exchange-staging-1.herokuapp.com/v1/api/borrower/credit/loan/{loanId}/repay \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "<string>",
"cancel": true
}
'import requests
url = "https://ge-exchange-staging-1.herokuapp.com/v1/api/borrower/credit/loan/{loanId}/repay"
payload = {
"amount": "<string>",
"cancel": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({amount: '<string>', cancel: true})
};
fetch('https://ge-exchange-staging-1.herokuapp.com/v1/api/borrower/credit/loan/{loanId}/repay', 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://ge-exchange-staging-1.herokuapp.com/v1/api/borrower/credit/loan/{loanId}/repay",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '<string>',
'cancel' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://ge-exchange-staging-1.herokuapp.com/v1/api/borrower/credit/loan/{loanId}/repay"
payload := strings.NewReader("{\n \"amount\": \"<string>\",\n \"cancel\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://ge-exchange-staging-1.herokuapp.com/v1/api/borrower/credit/loan/{loanId}/repay")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"<string>\",\n \"cancel\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ge-exchange-staging-1.herokuapp.com/v1/api/borrower/credit/loan/{loanId}/repay")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"<string>\",\n \"cancel\": true\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Loan repayment processed successfully",
"data": {
"id": "67f67f0f8b28995e47bed8db",
"borrower": "67d3267b6b2f7dfc493db74a",
"creditor": "624598bd83067c00f691c0ca",
"amount": 840000,
"currency": "NGN",
"repayment_amount": 796000,
"repayment_date": "Wed Jul 09 2025 15:07:06 GMT+0100 (West Africa Standard Time)",
"interest_rate": 0.3,
"duration": 3,
"status": "ACTIVE",
"grace_period": 5,
"grace_period_unit": "DAYS",
"reason": "Personal Use",
"created_at": "2025-04-09T14:07:11.828Z",
"updated_at": "2025-04-09T14:07:36.091Z",
"collaterals": [
{
"name": "CredPal2",
"token_id": "67e30ac4c6ee9dd9cc0fe0e4",
"quantity": 0
},
{
"name": "CredPal",
"token_id": "66b3dd8b7f741f367b960f26",
"quantity": 52.36842105263158
}
]
}
}
The id of the loan being repaid.
Amount that was repaid by the customer outside the platform
is the loan a cancelled loan or not
{
"status": "success",
"message": "Loan repayment processed successfully",
"data": {
"id": "67f67f0f8b28995e47bed8db",
"borrower": "67d3267b6b2f7dfc493db74a",
"creditor": "624598bd83067c00f691c0ca",
"amount": 840000,
"currency": "NGN",
"repayment_amount": 796000,
"repayment_date": "Wed Jul 09 2025 15:07:06 GMT+0100 (West Africa Standard Time)",
"interest_rate": 0.3,
"duration": 3,
"status": "ACTIVE",
"grace_period": 5,
"grace_period_unit": "DAYS",
"reason": "Personal Use",
"created_at": "2025-04-09T14:07:11.828Z",
"updated_at": "2025-04-09T14:07:36.091Z",
"collaterals": [
{
"name": "CredPal2",
"token_id": "67e30ac4c6ee9dd9cc0fe0e4",
"quantity": 0
},
{
"name": "CredPal",
"token_id": "66b3dd8b7f741f367b960f26",
"quantity": 52.36842105263158
}
]
}
}
Was this page helpful?
⌘I
