POST
/
api
/
credit
/
loan
Create Loan
curl --request POST \
  --url https://ge-exchange-staging-1.herokuapp.com/v1/api/credit/loan \
  --header 'Content-Type: application/json' \
  --data '{
  "user_id": "<string>",
  "duration": 123,
  "currency": "<string>",
  "interest_rate": 123,
  "amount": "<string>",
  "repayment_amount": "<string>",
  "collaterals": [
    {}
  ],
  "loan_configuration_id": "<string>",
  "reason": "<string>"
}'
{
    "status": "success",
    "message": "Loan created successfully",
    "data": {
        "id": "67ef8652ad2aff781bf017c6",
        "borrower": "67d3267b6b2f7dfc493db74a",
        "creditor": "624598bd83067c00f691c0ca",
        "amount": 840000,
        "currency": "NGN",
        "repayment_amount": 1596000,
        "repayment_date": "Fri Jul 04 2025 08:12:11 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-04T07:12:18.561Z",
        "updated_at": "2025-04-04T07:12:18.561Z",
        "collaterals": [
            {
                "name": "CredPal2",
                "token_id": "67e30ac4c6ee9dd9cc0fe0e4",
                "quantity": 10
            },
            {
                "name": "CredPal",
                "token_id": "66b3dd8b7f741f367b960f26",
                "quantity": 100
            }
        ]
    }
}
user_id
string
required
The id of the user who will receive the loan.
duration
number
required
Loan duration in months.
currency
string
required
Loan currency (e.g., “NGN”).
interest_rate
number
required
Interest rate, expressed as a decimal between 0 and 1 (e.g., 0.05 for 5%).
amount
string
required
The amount loaned out to a customer
repayment_amount
string
required
The amount to be paid back by the customer
collaterals
object[]
required
Array of collateral objects with token_id and quantity.
[
    { "token_id": "67e2f7ed702e11a6778681a3", "quantity": 2 }, 
    { "token_id": "67e2f7ed702e11a6778681b3", "quantity": 5 }
]
loan_configuration_id
string
required
ID of the matched loan configuration.
reason
string
Optional reason for the loan.
{
    "status": "success",
    "message": "Loan created successfully",
    "data": {
        "id": "67ef8652ad2aff781bf017c6",
        "borrower": "67d3267b6b2f7dfc493db74a",
        "creditor": "624598bd83067c00f691c0ca",
        "amount": 840000,
        "currency": "NGN",
        "repayment_amount": 1596000,
        "repayment_date": "Fri Jul 04 2025 08:12:11 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-04T07:12:18.561Z",
        "updated_at": "2025-04-04T07:12:18.561Z",
        "collaterals": [
            {
                "name": "CredPal2",
                "token_id": "67e30ac4c6ee9dd9cc0fe0e4",
                "quantity": 10
            },
            {
                "name": "CredPal",
                "token_id": "66b3dd8b7f741f367b960f26",
                "quantity": 100
            }
        ]
    }
}