Skip to content

Loan Repayment API

Loan Repayment API - POST REQUEST

Test API Endpoint

POST https://apitest.fedacash.com/api/salaryadvance/v1/test/employee-loan-repayment

Live API Endpoint

POST https://api.fedacash.com/api/salaryadvance/v1/test/employee-loan-repayment

Request Headers

  • Authorization: Bearer your_secret_key
  • Content-Type: application/json

Sample Curl -Request Body

curl -X POST "https://apitest.fedacash.com/api/salaryadvance/v1/test/employee-loan-repayment"
-H "Authorization: Bearer YOUR_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d {
"email": "john.doe@example.com",
"first_name": "John",
"last_name": "Doe",
"phone": "234123456789",
"amount": 5000
}

Success Response

{
"success": true,
"message": "Employee loan repayment process completed successfully",
"data": {
"create_customer": {
"status": true,
"message": "Customer created successfully",
"data": {
"id": 1,
"email": "john.doe@example.com",
"first_name": "John",
"last_name": "Doe",
"phone": "234123456789",
"createdAt": "2024-06-30 10:00:00"
}
},
"fetch_customer": {
"status": true,
"message": "Customer fetched successfully",
"data": {
"id": 1,
"email": "john.doe@example.com",
"first_name": "John",
"last_name": "Doe",
"phone": "234123456789",
"createdAt": "2024-06-30 10:00:00"
}
},
"initialize_transaction": {
"status": true,
"message": "Transaction initialized successfully",
"data": {
"authorization_url": "https://paystack.com/transaction/authorization_url",
"access_code": "ACCESS_CODE",
"reference": "TRANSACTION_REFERENCE"
}
}
}
}

Error Response

{
"success": false,
"message": "Failed to process employee loan repayment",
"data": {
"create_customer": {
"error": "Create Customer API request failed"
},
"fetch_customer": {
"error": "Fetch Customer API request failed"
},
"initialize_transaction": {
"error": "Initialize Transaction API request failed"
}
}
}