Skip to content

Place a batch of loans on cover and pay for it in one call

POST
/credit-life/policies/{policyId}/loans/pay

Authorizations

BearerAuth
Type
HTTP (bearer)

Parameters

Path Parameters

policyId*
Type
string
Required

Request Body

application/json
JSON
{
  
"loans": [
  
  
{
  
  
  
"fullName": "string",
  
  
  
"nrcNumber": "string",
  
  
  
"dateOfBirth": "string",
  
  
  
"amount": 0,
  
  
  
"startDate": "string",
  
  
  
"endDate": "string",
  
  
  
"partnerLoanReference": "string",
  
  
  
"interestRate": 0
  
  
}
  
],
  
"payment": {
  
  
"reference": "string",
  
  
"mobileMoneyAccountNumber": "string",
  
  
"cardDetails": {
  
  
  
"city": "string",
  
  
  
"country": "string",
  
  
  
"address": "string",
  
  
  
"zip": 0
  
  
}
  
}
}

Responses

The batch and the collection started against it. Unlike the ordinary submit endpoint the batch comes back Pending and NOT on risk: on a prepaid policy the premium is what incepts cover. Poll GET /payments/transactions/{reference}/status — when the gateway confirms, the loans go on risk and the premium is receipted in one step, with no further call from you.

application/json
JSON
{
  
"schedule": {
  
  
"id": "string",
  
  
"number": "string",
  
  
"status": "string",
  
  
"type": "string",
  
  
"totalLoans": 0,
  
  
"loanAmount": 0,
  
  
"netPremium": 0,
  
  
"levy": 0,
  
  
"grossPremium": 0,
  
  
"amountReceipted": 0,
  
  
"outstandingPremium": 0,
  
  
"currency": "string",
  
  
"createdAt": "string",
  
  
"loans": [
  
  
  
{
  
  
  
  
"id": {
  
  
  
  
},
  
  
  
  
"clientName": {
  
  
  
  
},
  
  
  
  
"nrcNumber": {
  
  
  
  
},
  
  
  
  
"amount": {
  
  
  
  
},
  
  
  
  
"coveredAmount": {
  
  
  
  
},
  
  
  
  
"premiumRate": {
  
  
  
  
},
  
  
  
  
"netPremium": {
  
  
  
  
},
  
  
  
  
"levy": {
  
  
  
  
},
  
  
  
  
"grossPremium": {
  
  
  
  
},
  
  
  
  
"status": {
  
  
  
  
},
  
  
  
  
"startDate": {
  
  
  
  
},
  
  
  
  
"endDate": {
  
  
  
  
},
  
  
  
  
"partnerLoanReference": {
  
  
  
  
},
  
  
  
  
"interestRate": {
  
  
  
  
}
  
  
  
}
  
  
],
  
  
"skipped": [
  
  
  
{
  
  
  
  
"nrcNumber": {
  
  
  
  
},
  
  
  
  
"partnerLoanReference": {
  
  
  
  
},
  
  
  
  
"existingLoanId": {
  
  
  
  
}
  
  
  
}
  
  
]
  
},
  
"payment": {
  
  
"status": "string",
  
  
"message": "string",
  
  
"txnId": "string",
  
  
"referenceId": "string",
  
  
"redirectUrl": "string",
  
  
"warnings": [
  
  
  
"string"
  
  
]
  
}
}

Playground

Authorization
Variables
Key
Value
Body

Samples

Built with ❤️ by Hobbiton Technologies