POST
Loan Request
Initiate a new loan application for an existing customer.
POST/v2/loans/request
Use this endpoint to create a new loan application. The request will automatically be placed in a PENDING state, awaiting manual or automated approval based on your institution's configured workflows.
Headers
| Header | Required | Description |
|---|---|---|
Authorization | YES | Bearer token containing your secret API key. |
Content-Type | YES | Must be set to application/json. |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
customer_id | string | YES | The unique ID of the customer applying for the loan. |
amount | number | YES | The principal amount of the loan being requested. |
tenor | integer | YES | The duration of the loan in months. |
interest_rate | number | YES | The monthly interest rate to be applied (e.g., 2.5 for 2.5%). |
purpose | string | NO | A brief description of why the loan is being requested. |
Example Request
cURL
curl -X POST "https://sandbox.hexcore.io/v2/loans/request" \-H "Authorization: Bearer sk_test_your_secret_key" \-H "Content-Type: application/json" \-d '{ "customer_id": "cus_8f92jdl29skw", "amount": 500000, "tenor": 12, "interest_rate": 3.0, "purpose": "Business Expansion" }'Example Response
JSON (201 Created)
{"status": true,"message": "Loan request submitted successfully","data": {"loan_id": "ln_a1b2c3d4e5f6","customer_id": "cus_8f92jdl29skw","amount": 500000.00,"tenor": 12,"status": "PENDING","created_at": "2026-05-02T10:15:00Z"} }