Create NIBSS GSI Mandate from Loan
Overview​
The CreateNibssGSIMandateFromLoanCommand creates a GSI mandate batch pre-populated from an existing Loan Quote. The mandate uses the loan product's existing code and name from loanProductConfiguration; branch, payer details, amounts, and schedule are resolved automatically from the loan quote and its collection information.
If the loan quote already has a grouped NIBSS GSI batch, the command reuses that batch and adds only new accounts. It does not create another batch. Repeating the same bank/account pair is idempotent and is reported as skipped.
New entries start in Building (-1). After all accounts have been added, call FinalizeNibssGSIMandateBatchCommand to move the entries to Draft (0, Ready for Submission), making them eligible for the background submission job.
Command Details​
- Command:
CreateNibssGSIMandateFromLoanCommand - Type: Command
API Endpoint​
POST /api/bpm/cmd
Request Structure​
Required fields (cannot be sourced from the loan quote)​
| Field | Type | Required | Description |
|---|---|---|---|
loanQuoteId | long | Yes | ID of the existing Loan Quote to source mandate data from |
organisationCode | string | Yes | Organisation code for the mandate |
clientCode | string | Yes | Client identifier code |
accounts | array | Yes | Bank accounts to attach (see below) |
Optional fields​
| Field | Type | Required | Description |
|---|---|---|---|
narration | string | No | Payment narration / description |
payerAddress | string | No | Optional override. When omitted, the latest usable SelfServiceAddressInformation row for the loan customer is formatted and used. |
tag | string | No | Optional tag for categorisation |
Each item in accounts​
| Field | Type | Required | Description |
|---|---|---|---|
accountNumber | string | Yes | Account number |
bvn | string | Yes | Bank Verification Number — all accounts must share the same BVN |
bankCode | string | Yes | CBN bank code |
accountName | string | Yes | Account holder name |
Auto-populated from Loan Quote​
The following fields are resolved automatically and do not need to be supplied:
| Field | Resolved from |
|---|---|
loanProductCode | LoanQuote.LoanProductCode |
productCode | The matching loanProductConfiguration.loanProducts[].code |
productName | The matching loanProductConfiguration.loanProducts[].name |
branchCode | LoanQuote.SelfServiceBranch.Code |
payerName | LoanQuote.SelfServiceUser.UserDetail.DisplayName |
payerAddress | Request override, otherwise the latest LoanQuote.SelfServiceUser.AddressInformations row (the same source exposed by GetCustomerAddressDetailsQuery) |
mobileNumber | LoanQuote.SelfServiceUser.UserDetail.MobileNumber |
emailAddress | LoanQuote.SelfServiceUser.EmailAddress |
amount | CollectionInfo.TotalCollectionAmount or LoanQuote.RepaymentAmount |
debitAmount | CollectionInfo.AmountPerCollection |
numberOfInstallments | CollectionInfo.RepaymentCount |
startDate | CollectionInfo.CollectionStartDate or LoanQuote.StartDate |
endDate | LoanQuote.EndDate |
subscriberCode | LoanQuote.RequestId; the stored value is unchanged, while the outbound NIBSS value is padded when shorter than 10 characters |
Validations​
-
Accounts appended later must use the same BVN as every existing account in the batch.
-
Accounts can only be appended while every entry is still
Buildingand has no NIBSSMandateCode. -
The persisted bank code is the configured
nibssMandateBankCode, not the caller's unvalidated value. -
All accounts in the
accountsarray must have the same BVN — cross-BVN GSI batches are rejected. -
amountmust equaldebitAmount × numberOfInstallments. -
startDatemust not be in the past. -
Required fields resolved from the loan quote that are
nullor empty will return a descriptive error. -
A non-empty payer address is required. If neither the request nor the customer's saved address supplies one, the command returns
NIBSS_PAYER_ADDRESS_REQUIREDbefore inserting a mandate or batch. -
The normal loan request ID remains stored unchanged (for example,
PR-2-163). At submission time only, its final numeric segment is left-padded with zeroes until the complete NIBSSsubscriberCodeis at least 10 characters (PR-2-163becomesPR-2-00163). Values already between 10 and 20 characters are not padded.
Product classification configuration​
The loan quote already supplies LoanProductCode. That code must exist in loanProductConfiguration; the same configured code, name, and description classify the NIBSS GSI mandate. No separate mandate-product list or mapping is required.
# loanProductConfiguration
loanProducts:
- name: Payroll
code: PR-1
description: Payroll loan repayment mandate
# The code and name above are also used for the GSI mandate classification.
# other loan settings...
Try It Out​
/api/bpm/cmdCreateNibssGSIMandateFromLoanCommandResponse Structure​
{
"isSuccessful": true,
"statusCode": "00",
"message": "NIBSS GSI mandate batch created from loan quote 1001 with 2 mandate(s).",
"data": {
"batchId": 42,
"batchName": "NIBSS-GSI-L1001-240626120000",
"loanQuoteId": 1001,
"isGroupedGSIMandate": true,
"serviceProvider": "NIBSS",
"totalMandates": 2,
"autoPopulatedFields": {
"loanProductCode": "PR-1",
"productCode": "PR-1",
"productName": "Payroll",
"branchCode": "BR-001",
"payerName": "John Doe",
"payerAddress": "15 Marina Street, Lagos",
"mobileNumber": "08012345678",
"emailAddress": "john@example.com",
"amount": 1200000.00,
"debitAmount": 100000.00,
"numberOfInstallments": 12,
"startDate": "2026-07-01",
"endDate": "2027-06-30"
},
"mandates": [
{
"clientCode": "CLT-001",
"payerName": "John Doe",
"account": { "accountNumber": "0012345678", "bankCode": "058", "accountName": "John Doe" }
}
]
}
}
Related Operations​
- Create NIBSS GSI Mandate — Manually supply all fields
- Manage a NIBSS GSI Batch — Add accounts and finalize the batch for submission