POST
/
external
/
request-loan
curl --request POST \
--url https://direct-pub-api.directgh.com/api/v1/external/request-loan \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 50000,
"tenure": 6,
"narration": "Business expansion loan",
"userId": "550e8400-e29b-41d4-a716-446655440000",
"callbackUrl": "https://your-institution.com/api/loan-callbacks"
}
'
{
"id": "660e8400-e29b-41d4-a716-446655440000",
"reference": "LOAN-2024-001234",
"amount": 50000,
"interest": 15000,
"totalRepayment": 65000,
"tenure": 6,
"narration": "Business expansion loan",
"userMonthlyIncome": 150000,
"status": "PENDING_APPROVAL",
"user": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"firstName": "John",
"lastName": "Doe",
"otherName": "Michael",
"email": "john.doe@example.com",
"mobileNumber": "+233241234567",
"createdAt": "2024-01-15T10:30:00Z"
},
"createdAt": "2024-01-20T14:45:00Z"
}

Authorizations

Authorization
string
header
required

HMAC signature authentication. The Authorization header must contain your public key and HMAC signature in the format: public_key:signature

Format: Authorization: public_key:signature

Example: Authorization: pub_abc123xyz:abc123def456ghi789...

The signature is generated by creating an HMAC hash of the request body (JSON stringified) using your secret key. Contact your account manager to obtain your public key and secret key for generating signatures.

Body

application/json
amount
number
required

Loan amount requested (must be a positive number)

Required range: x >= 0.01
Example:

50000

tenure
integer
required

Loan tenure in months (must be a positive integer)

Required range: x >= 1
Example:

6

narration
string
required

Description or purpose of the loan

Example:

"Business expansion loan"

userId
string<uuid>
required

Unique identifier of the institution member requesting the loan

Example:

"550e8400-e29b-41d4-a716-446655440000"

callbackUrl
string<uri>
required

URL where loan status updates will be sent via POST requests

Example:

"https://your-institution.com/api/loan-callbacks"

Response

Loan request created successfully

Loan details including status, user information, and repayment terms

id
string<uuid>

Unique identifier of the loan

Example:

"660e8400-e29b-41d4-a716-446655440000"

reference
string

Human-readable loan reference number

Example:

"LOAN-2024-001234"

amount
number

Loan amount

Example:

50000

interest
number

Total interest amount for the loan

Example:

15000

totalRepayment
number

Total amount to be repaid

Example:

65000

tenure
integer

Loan tenure in months

Example:

6

narration
string | null

Loan description or purpose

Example:

"Business expansion loan"

userMonthlyIncome
number

Monthly income of the loan applicant

Example:

150000

status
enum<string>

Current status of the loan

Available options:
PROCESSING,
PENDING_APPROVAL,
REJECTED,
DISBURSED,
ACTIVE,
COMPLETED,
DEFAULTED
Example:

"PENDING_APPROVAL"

user
object

User information of the loan applicant

createdAt
string<date-time> | null

Date and time when the loan was created

Example:

"2024-01-20T14:45:00Z"