Skip to main content

Cheque Transactions

Process cheque deposits, withdrawals, clearing, bouncing, and cancellations.

Overview

The Cheque Transactions API provides comprehensive cheque processing capabilities including:

  • Deposit: Post cheque deposits in PENDING state
  • Withdrawal: Issue cheques with immediate balance deduction
  • Clearing: Clear pending cheques (finalize transactions)
  • Bouncing: Return dishonored cheques
  • Cancellation: User-initiated stop payments

All commands are part of the BPMCore V2 architecture with complete business logic implementations.

Commands Summary

CommandPurposeState Changes
InitiateChequeDepositCommandPost cheque depositCreates PENDING, increases UnclearedAmount
InitiateChequeWithdrawalCommandIssue chequeCreates PENDING, immediate balance deduction
InitiateClearChequeCommandClear pending chequePENDING → CLEARED/SETTLED, credits balance (deposits)
InitiateBounceChequeCommandBounce dishonored chequePENDING → BOUNCED, restores balance (withdrawals)
InitiateCancelChequeCommandCancel cheque (stop payment)PENDING → CANCELLED, full reversal

Cheque Processing Workflow

Key Behaviors

Asymmetric Processing

Cheque Deposits (wait for clearing):

  • ✅ UnclearedAmount increases immediately
  • ❌ Balance unchanged until clearing
  • 📅 Typical T+2 clearing period

Cheque Withdrawals (immediate deduction):

  • ✅ Balance deducted immediately
  • ✅ Prevents overdrawing
  • 💡 Risk mitigation strategy

Approval Workflow

Overview

Cheque transactions in BankLingo support approval workflow in addition to the standard PENDING clearing state. This provides an additional layer of control before cheques enter the standard clearing cycle.

Two-Level State Management:

  1. Transaction-Level State: Controls whether cheque transaction requires approval before entering clearing cycle

    • requireApproval: false (default) → Transaction enters PENDING clearing immediately
    • requireApproval: true → Transaction awaits approval before entering PENDING clearing
  2. Cheque-Level Clearing State: Standard clearing lifecycle (PENDING → CLEARED/BOUNCED/CANCELLED)

    • Managed via clearing commands (Clear, Bounce, Cancel)
    • Independent of transaction approval state

Transaction Approval States

Direct Clearing Entry (No Approval Required)

When requireApproval is false or omitted (default):

Cheque Deposits:

  • ✅ Transaction enters PENDING clearing immediately
  • ✅ UnclearedChequeAmount increases immediately
  • ✅ Balance unchanged (awaiting clearing via InitiateClearCheque)
  • ✅ Standard T+2 clearing period applies

Cheque Withdrawals:

  • ✅ Transaction enters PENDING clearing immediately
  • ✅ Balance debited immediately (withdrawal issued)
  • ✅ Cheque can be presented for clearing
  • ✅ Can be bounced or cancelled if needed

Approval Required Before Clearing

When requireApproval is true:

Cheque Deposits:

  • ⏳ Transaction enters APPROVAL_PENDING state
  • ⏳ UnclearedChequeAmount NOT increased (awaiting approval)
  • ⏳ Balance unchanged
  • ⏳ Does NOT enter clearing cycle until approved
  • ⏳ After approval → Enters PENDING clearing state
  • ⏳ After approval → UnclearedChequeAmount increases
  • ⏳ Then follows standard clearing workflow

Cheque Withdrawals:

  • ⏳ Transaction enters APPROVAL_PENDING state
  • ⏳ Balance NOT debited (awaiting approval)
  • ⏳ Hold placed to reserve funds (HoldAmount increased)
  • ⏳ Cheque NOT issued until approved
  • ⏳ After approval → Balance debited, cheque issued
  • ⏳ After approval → Enters PENDING clearing state

State Transition with Approval Workflow

Universal Transaction Management Commands

Cheque transactions support the same universal commands as all other transaction types:

1. Approve Transaction (APPROVAL_PENDING → PENDING Clearing)

Command: ApproveTransactionCommand

Purpose: Approves a cheque transaction and moves it into clearing cycle

Request:

{
"commandName": "ApproveTransactionCommand",
"data": {
"transactionKey": "CHQ123456",
"approverNotes": "Cheque verified. Approved for clearing."
}
}

Effect on Cheque Deposits:

  • ✅ Transaction state: APPROVAL_PENDING → PENDING (Clearing)
  • ✅ UnclearedChequeAmount increased by deposit amount
  • ✅ Cheque enters clearing cycle
  • ✅ Balance still unchanged (awaits clearing command)
  • ✅ Can now use InitiateClearCheque after clearing period

Effect on Cheque Withdrawals:

  • ✅ Transaction state: APPROVAL_PENDING → PENDING (Clearing)
  • ✅ Hold released (HoldAmount decreased)
  • ✅ Balance debited (withdrawal amount)
  • ✅ Cheque issued and can be presented
  • ✅ Can be bounced or cancelled if dishonored

2. Reject Transaction (APPROVAL_PENDING → CANCELLED)

Command: RejectTransactionCommand

Purpose: Rejects a cheque transaction before entering clearing cycle

Request:

{
"commandName": "RejectTransactionCommand",
"data": {
"transactionKey": "CHQ123456",
"rejectionReason": "Cheque signature does not match specimen. Rejected."
}
}

Effect:

  • ❌ Transaction state: APPROVAL_PENDING → CANCELLED
  • ❌ Deposits: UnclearedChequeAmount unchanged (never entered clearing)
  • ❌ Withdrawals: Hold released, balance unchanged
  • ❌ Cheque transaction voided
  • ❌ Does NOT enter clearing cycle

3. Cancel Transaction (APPROVAL_PENDING → CANCELLED)

Command: CancelTransactionCommand

Purpose: Cancels a cheque transaction before approval

Request:

{
"commandName": "CancelTransactionCommand",
"data": {
"transactionKey": "CHQ123456",
"cancellationReason": "Customer request - duplicate cheque submitted"
}
}

Effect:

  • ❌ Same as Reject Transaction
  • ❌ Transaction cancelled before entering clearing
  • ❌ No impact on clearing cycle

4. Reverse Transaction (After CLEARED/BOUNCED/CANCELLED)

Command: ReverseTransactionCommand

Purpose: Reverses a fully completed cheque transaction

Request:

{
"commandName": "ReverseTransactionCommand",
"data": {
"transactionKey": "CHQ123456",
"reversalReason": "Cheque was cleared to wrong account. Reversing transaction."
}
}

Effect:

  • ⏪ Reverses completed cheque transaction
  • ⏪ Uses TransactionImpactRecord for intelligent reversal
  • ⏪ Deposits: Balance debited (reverses clearing credit)
  • ⏪ Withdrawals: Balance credited (reverses withdrawal debit)
  • ⏪ Complete audit trail maintained

Note: Use cheque-specific clearing commands (Clear, Bounce, Cancel) for PENDING cheques. Use Reverse for already CLEARED transactions.

Approval Workflow Use Cases

When to Use requireApproval = true

Cheque Deposits:

  1. High-Value Cheques

    • Cheques exceeding approval threshold (e.g., > ₦500,000)
    • Third-party cheques requiring verification
    • Foreign cheques requiring special clearing
  2. Risk Management

    • Suspicious cheque patterns
    • First-time large cheques from new customers
    • Cheques from high-risk payers
    • Post-dated cheques requiring manager approval
  3. Compliance

    • Cheques requiring dual authorization
    • AML flagged cheques
    • Cheques requiring special documentation

Cheque Withdrawals:

  1. High-Value Withdrawals

    • Large cheque issuance (e.g., > ₦1,000,000)
    • Cashier's cheques requiring authorization
    • Manager's cheques
  2. Operational Controls

    • Dormant account cheque withdrawals
    • Third-party cheque issuance
    • Emergency or irregular cheque withdrawals
  3. Fraud Prevention

    • Unusual withdrawal patterns
    • Cheques issued outside normal business hours
    • High-risk account cheque withdrawals

When to Use requireApproval = false (Direct Clearing)

Standard Operations:

  • Routine cheque deposits within limits
  • Regular cheque withdrawals by account holders
  • Established customer transactions
  • Low-risk, low-value cheques

Configuration Recommendations

Approval Thresholds for Cheque Transactions:

Transaction TypeDirect ClearingApproval Required
Cheque Deposit≤ ₦500,000> ₦500,000
Cheque Withdrawal≤ ₦1,000,000> ₦1,000,000
Third-Party ChequeNeverAlways
Post-Dated ChequeNeverAlways
Foreign ChequeNeverAlways
Dormant AccountNeverAlways

Relationship Between Approval and Clearing

Important: The approval workflow (requireApproval) is separate from the clearing workflow:

  1. Approval Level (Transaction Control):

    • Controls entry into clearing cycle
    • Uses universal commands (Approve, Reject, Cancel, Reverse)
    • Optional additional control layer
  2. Clearing Level (Cheque-Specific):

    • Manages cheque lifecycle (PENDING → CLEARED/BOUNCED/CANCELLED)
    • Uses cheque-specific commands (Clear, Bounce, Cancel)
    • Always required for cheque processing

Example Flow:

Cheque Deposit with Approval:
1. Submit InitiateChequeDeposit (requireApproval: true)
→ State: APPROVAL_PENDING
→ UnclearedAmount: No change

2. Approve Transaction (ApproveTransactionCommand)
→ State: PENDING (enters clearing)
→ UnclearedAmount: Increased

3. Clear Cheque (InitiateClearCheque) [after T+2]
→ State: CLEARED
→ Balance: Credited
→ UnclearedAmount: Decreased

1. Cheque Deposit

Post a cheque deposit transaction in PENDING state.

Request

POST /api/bpm/cmd
{
"commandName": "InitiateChequeDepositCommand",
"data": {
"accountEncodedKey": "1001234567",
"amount": 50000.00,
"chequeNo": "CH123456",
"tillId": "TILL001",
"referenceId": "REF2025123001",
"requireApproval": false,
"remarks": "Customer cheque deposit"
}
}

Parameters

ParameterTypeRequiredDescription
accountEncodedKeystringYesAccount number or encoded key
amountdecimalYesDeposit amount (must be > 0)
chequeNostringYesCheque number
tillIdstringNoTill ID or encoded key
referenceIdstringNoExternal reference
requireApprovalbooleanNoWhether transaction requires approval before clearing. Default: false
remarksstringNoTransaction notes

Business Logic

  1. Validation:

    • Amount must be > 0
    • Account must exist and not be frozen/locked
    • Till must be OPENED (if provided)
    • Till currency must match account currency
  2. State Changes:

    • Creates ChequeClearingTransaction in PENDING state
    • Increases UnclearedChequeAmount by deposit amount
    • Balance unchanged (waiting for clearing)
    • Records transaction impacts for audit
  3. Transaction Type: DEPOSIT

Response (200 OK)

{
"commandName": "InitiateChequeDepositCommand",
"status": "Success",
"data": {
"chequeClearingId": "550e8400-e29b-41d4-a716-446655440000",
"accountNumber": "1001234567",
"amount": 50000.00,
"chequeNo": "CH123456",
"transactionType": "DEPOSIT",
"state": "PENDING",
"transactionDate": "2025-12-31T10:30:00Z",
"unclearedChequeAmount": 50000.00,
"currentBalance": 1000000.00
}
}

Account State Impact

The following diagram illustrates how cheque deposits affect account balances through a two-stage process:

Key Points:

  • Stage 1 (Deposit): Transaction created in PENDING state, UnclearedChequeAmount increases, actual balance unchanged
  • Stage 2 (Clearing): Balance credited, UnclearedChequeAmount reduced, funds become available

Example: Basic Deposit

const response = await fetch('https://api.banklingo.com/api/bpm/cmd', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({
commandName: 'InitiateChequeDepositCommand',
data: {
accountEncodedKey: '1001234567',
amount: 50000.00,
chequeNo: 'CH123456',
tillId: 'TILL001',
remarks: 'Customer cheque deposit'
}
})
});

2. Cheque Withdrawal

Issue a cheque (withdrawal) with immediate balance deduction.

Request

{
"commandName": "InitiateChequeWithdrawalCommand",
"data": {
"accountEncodedKey": "1001234567",
"amount": 75000.00,
"chequeNo": "CH789012",
"tillId": "TILL001",
"payeeName": "ABC Suppliers Ltd",
"referenceId": "REF2025123002",
"requireApproval": false,
"remarks": "Payment to supplier"
}
}

Parameters

ParameterTypeRequiredDescription
accountEncodedKeystringYesAccount number or encoded key
amountdecimalYesWithdrawal amount (must be > 0)
chequeNostringYesCheque number
payeeNamestringNoName of the payee
tillIdstringNoTill ID or encoded key
referenceIdstringNoExternal reference
requireApprovalbooleanNoWhether transaction requires approval before clearing. Default: false
remarksstringNoTransaction notes
tillIdstringNoTill ID or encoded key
payeeNamestringNoPayee/beneficiary name
referenceIdstringNoExternal reference
remarksstringNoTransaction notes

Business Logic

  1. Validation:

    • Amount must be > 0
    • Account must have sufficient balance
    • Account must not be frozen/locked
    • Till must be OPENED (if provided)
  2. State Changes:

    • Creates ChequeClearingTransaction in PENDING state
    • Deducts balance IMMEDIATELY (not waiting for clearing)
    • Transaction type: WITHDRAWAL
    • Records payee name for tracking
  3. Critical Difference: Unlike deposits, withdrawals affect balance immediately to prevent overdrawing.

Response (200 OK)

{
"commandName": "InitiateChequeWithdrawalCommand",
"status": "Success",
"data": {
"chequeClearingId": "660e8400-e29b-41d4-a716-446655440000",
"accountNumber": "1001234567",
"amount": 75000.00,
"chequeNo": "CH789012",
"transactionType": "WITHDRAWAL",
"state": "PENDING",
"payeeName": "ABC Suppliers Ltd",
"transactionDate": "2025-12-31T11:00:00Z",
"currentBalance": 925000.00
}
}

Account State Impact

The following diagram illustrates how cheque withdrawals affect account balances and the possible outcomes:

Key Points:

  • Immediate Deduction: Unlike deposits, withdrawal amount is deducted immediately from balance
  • Cleared Path: Transaction moves to SETTLED state, balance remains deducted
  • Bounced Path: Transaction reversed, funds restored to account

Example: Issue Cheque

const response = await fetch('https://api.banklingo.com/api/bpm/cmd', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({
commandName: 'InitiateChequeWithdrawalCommand',
data: {
accountEncodedKey: '1001234567',
amount: 75000.00,
chequeNo: 'CH789012',
payeeName: 'ABC Suppliers Ltd',
remarks: 'Payment to supplier'
}
})
});

3. Clear Cheque

Clear a pending cheque (finalize transaction).

Request

{
"commandName": "InitiateClearChequeCommand",
"data": {
"chequeClearingId": "550e8400-e29b-41d4-a716-446655440000",
"clearingReference": "NIBSS202512310001",
"remarks": "T+2 clearing completed"
}
}

Parameters

ParameterTypeRequiredDescription
chequeClearingIdstringYesCheque clearing transaction ID (GUID)
clearingReferencestringNoClearing house reference
remarksstringNoClearing notes

Business Logic

  1. Validation:

    • Cheque clearing transaction must exist
    • Must be in PENDING state
    • Cannot clear already CLEARED/BOUNCED/CANCELLED cheques
  2. State Changes for DEPOSITS:

    • State: PENDING → CLEARED
    • Credits account balance by deposit amount
    • Reduces UnclearedChequeAmount by deposit amount
    • Records clearing reference and timestamp
  3. State Changes for WITHDRAWALS:

    • State: PENDING → SETTLED
    • Balance already deducted (no change)
    • Marks withdrawal as finalized

Response (200 OK)

{
"commandName": "InitiateClearChequeCommand",
"status": "Success",
"data": {
"chequeClearingId": "550e8400-e29b-41d4-a716-446655440000",
"previousState": "PENDING",
"newState": "CLEARED",
"accountNumber": "1001234567",
"amount": 50000.00,
"transactionType": "DEPOSIT",
"clearedDate": "2025-12-31T15:00:00Z",
"clearingReference": "NIBSS202512310001",
"newBalance": 1050000.00,
"newUnclearedAmount": 0.00
}
}

Clearing Timeline

DayEventStateBalanceUnclearedAmount
T+0Deposit receivedPENDING₦1,000,000₦50,000
T+1Clearing house processingPENDING₦1,000,000₦50,000
T+2Clearing confirmedCLEARED₦1,050,000₦0

Example: Clear Deposit

// After receiving clearing confirmation from NIBSS/clearing house
const response = await fetch('https://api.banklingo.com/api/bpm/cmd', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({
commandName: 'InitiateClearChequeCommand',
data: {
chequeClearingId: '550e8400-e29b-41d4-a716-446655440000',
clearingReference: 'NIBSS202512310001',
remarks: 'T+2 clearing completed'
}
})
});

4. Bounce Cheque

Bounce (dishonor) a pending cheque.

Request

{
"commandName": "InitiateBounceChequeCommand",
"data": {
"chequeClearingId": "550e8400-e29b-41d4-a716-446655440000",
"bounceReason": "INSUFFICIENT_FUNDS",
"bounceReference": "NIBSS202512310002",
"remarks": "Returned - insufficient funds"
}
}

Parameters

ParameterTypeRequiredDescription
chequeClearingIdstringYesCheque clearing transaction ID (GUID)
bounceReasonstringYesReason code (see table below)
bounceReferencestringNoClearing house return reference
remarksstringNoBounce notes

Bounce Reasons

CodeDescriptionCommon Scenario
INSUFFICIENT_FUNDSInsufficient fundsMost common reason
ACCOUNT_CLOSEDAccount closedAccount no longer active
SIGNATURE_MISMATCHSignature mismatchSignature doesn't match records
POST_DATEDPost-dated chequePresented before date
STALE_CHEQUEStale chequeOlder than 6 months
STOPPED_BY_DRAWERStopped by drawerCustomer stop payment
REFER_TO_DRAWERRefer to drawerContact account holder
EFFECTS_NOT_CLEAREDEffects not clearedPrior cheque not cleared

Business Logic

  1. Validation:

    • Cheque clearing transaction must exist
    • Must be in PENDING state
    • Cannot bounce already CLEARED/BOUNCED/CANCELLED cheques
    • Bounce reason is mandatory
  2. State Changes for DEPOSITS:

    • State: PENDING → BOUNCED
    • Reduces UnclearedChequeAmount by deposit amount
    • Balance remains unchanged (was never credited)
    • Records bounce reason and reference
  3. State Changes for WITHDRAWALS:

    • State: PENDING → CANCELLED
    • Restores account balance by withdrawal amount
    • Records bounce reason and reference
    • Customer notified of returned cheque

Response (200 OK)

{
"commandName": "InitiateBounceChequeCommand",
"status": "Success",
"data": {
"chequeClearingId": "550e8400-e29b-41d4-a716-446655440000",
"previousState": "PENDING",
"newState": "BOUNCED",
"accountNumber": "1001234567",
"amount": 50000.00,
"transactionType": "DEPOSIT",
"bounceReason": "INSUFFICIENT_FUNDS",
"bounceReference": "NIBSS202512310002",
"bouncedDate": "2025-12-31T16:00:00Z",
"newBalance": 1000000.00,
"newUnclearedAmount": 0.00
}
}

Example: Bounce Deposit

const response = await fetch('https://api.banklingo.com/api/bpm/cmd', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({
commandName: 'InitiateBounceChequeCommand',
data: {
chequeClearingId: '550e8400-e29b-41d4-a716-446655440000',
bounceReason: 'INSUFFICIENT_FUNDS',
bounceReference: 'NIBSS202512310002',
remarks: 'Returned by paying bank - insufficient funds'
}
})
});

5. Cancel Cheque

Cancel a pending cheque (user-initiated stop payment).

Request

{
"commandName": "InitiateCancelChequeCommand",
"data": {
"chequeClearingId": "550e8400-e29b-41d4-a716-446655440000",
"cancellationReason": "CUSTOMER_REQUEST",
"remarks": "Stop payment requested by customer"
}
}

Parameters

ParameterTypeRequiredDescription
chequeClearingIdstringYesCheque clearing transaction ID (GUID)
cancellationReasonstringYesCancellation reason code
remarksstringNoCancellation notes

Cancellation Reasons

CodeDescriptionAuthorization Required
CUSTOMER_REQUESTCustomer stop paymentYes (customer signature)
DUPLICATE_ENTRYDuplicate transactionYes (branch manager)
LOST_CHEQUELost/stolen chequeYes (police report)
WRONG_AMOUNTIncorrect amountYes (branch manager)
FRAUD_PREVENTIONSuspected fraudYes (security officer)
ACCOUNT_ERRORAccount errorYes (operations manager)
SYSTEM_ERRORSystem errorYes (IT manager)
COMPLIANCE_HOLDCompliance holdYes (compliance officer)

Business Logic

  1. Validation:

    • Cheque clearing transaction must exist
    • Must be in PENDING state
    • Cannot cancel already CLEARED/BOUNCED/CANCELLED cheques
    • Cancellation reason is mandatory
  2. State Changes:

    • State: PENDING → CANCELLED
    • Full reversal of all impacts:
      • Deposits: Reduce UnclearedChequeAmount
      • Withdrawals: Restore balance
    • Records cancellation reason and authorization
    • Customer notified of cancellation
  3. Difference from Bounce:

    • Cancel: User-initiated, proactive stop payment
    • Bounce: System-initiated, reactive return

Response (200 OK)

{
"commandName": "InitiateCancelChequeCommand",
"status": "Success",
"data": {
"chequeClearingId": "550e8400-e29b-41d4-a716-446655440000",
"previousState": "PENDING",
"newState": "CANCELLED",
"accountNumber": "1001234567",
"amount": 75000.00,
"transactionType": "WITHDRAWAL",
"cancellationReason": "CUSTOMER_REQUEST",
"cancelledDate": "2025-12-31T14:00:00Z",
"restoredBalance": 1000000.00
}
}

Example: Stop Payment

const response = await fetch('https://api.banklingo.com/api/bpm/cmd', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({
commandName: 'InitiateCancelChequeCommand',
data: {
chequeClearingId: '660e8400-e29b-41d4-a716-446655440000',
cancellationReason: 'CUSTOMER_REQUEST',
remarks: 'Customer stop payment - cheque lost'
}
})
});

Error Responses

400 Bad Request - Invalid Amount

{
"commandName": "InitiateChequeDepositCommand",
"status": "Failed",
"errors": ["Amount must be greater than zero"]
}

404 Not Found - Account Not Found

{
"commandName": "InitiateChequeDepositCommand",
"status": "Failed",
"errors": ["Account not found: 1001234567"]
}

400 Bad Request - Account Frozen

{
"commandName": "InitiateChequeDepositCommand",
"status": "Failed",
"errors": ["Account 1001234567 is frozen and cannot accept deposits"]
}

400 Bad Request - Insufficient Balance

{
"commandName": "InitiateChequeWithdrawalCommand",
"status": "Failed",
"errors": ["Insufficient balance for withdrawal"]
}

400 Bad Request - Invalid State

{
"commandName": "InitiateClearChequeCommand",
"status": "Failed",
"errors": ["Cannot clear cheque in state: CLEARED. Must be PENDING"]
}

Status Codes

CodeDescription
200Success - Transaction processed
400Bad Request - Validation error
404Not Found - Account/Till/Cheque not found
500Internal Server Error

Integration Examples

TypeScript: Daily Clearing Batch

interface ClearingConfirmation {
chequeNo: string;
chequeClearingId: string;
status: 'CLEARED' | 'RETURNED';
returnReason?: string;
reference: string;
}

async function processDailyClearing(confirmations: ClearingConfirmation[]) {
console.log(`🔄 Processing ${confirmations.length} clearing confirmations`);

for (const confirmation of confirmations) {
try {
if (confirmation.status === 'CLEARED') {
// Clear cheque
await fetch('https://api.banklingo.com/api/bpm/cmd', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({
commandName: 'InitiateClearChequeCommand',
data: {
chequeClearingId: confirmation.chequeClearingId,
clearingReference: confirmation.reference,
remarks: 'T+2 clearing confirmed by NIBSS'
}
})
});
console.log(`✅ Cleared: ${confirmation.chequeNo}`);
} else {
// Bounce cheque
await fetch('https://api.banklingo.com/api/bpm/cmd', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({
commandName: 'InitiateBounceChequeCommand',
data: {
chequeClearingId: confirmation.chequeClearingId,
bounceReason: confirmation.returnReason,
bounceReference: confirmation.reference,
remarks: `Returned by clearing house: ${confirmation.returnReason}`
}
})
});
console.log(`🔄 Bounced: ${confirmation.chequeNo} - ${confirmation.returnReason}`);
}
} catch (error) {
console.error(`❌ Error processing ${confirmation.chequeNo}:`, error);
}
}
}

C#: Stop Payment Workflow

Code Removed

Implementation details removed for security.

Contact support for implementation guidance.


Approval Workflow Examples

Example 1: High-Value Cheque Deposit with Approval

Step 1: Submit Cheque Deposit Requiring Approval

{
"commandName": "InitiateChequeDepositCommand",
"data": {
"accountEncodedKey": "1001234567",
"amount": 5000000.00,
"chequeNo": "CH999888",
"requireApproval": true,
"remarks": "High-value cheque deposit - requires manager approval per bank policy"
}
}

Response:

{
"status": "Success",
"data": {
"transactionKey": "CHQ2026001001",
"state": "APPROVAL_PENDING",
"unclearedChequeAmount": 0,
"balance": 10000000.00,
"message": "Cheque deposit awaiting approval"
}
}

Account State:

  • ⏳ Transaction in APPROVAL_PENDING state
  • ⏳ UnclearedChequeAmount: ₦0 (not increased yet)
  • ⏳ Balance: ₦10,000,000 (unchanged)
  • ⏳ Cheque NOT in clearing cycle

Step 2: Branch Manager Approves

{
"commandName": "ApproveTransactionCommand",
"data": {
"transactionKey": "CHQ2026001001",
"approverNotes": "Verified customer identity and cheque authenticity. Approved for clearing."
}
}

Response:

{
"status": "Success",
"data": {
"transactionKey": "CHQ2026001001",
"state": "PENDING",
"unclearedChequeAmount": 5000000.00,
"balance": 10000000.00,
"message": "Cheque approved and entered clearing cycle"
}
}

Account State After Approval:

  • ✅ Transaction state: PENDING (clearing)
  • ✅ UnclearedChequeAmount: ₦5,000,000 (increased)
  • ✅ Balance: ₦10,000,000 (still unchanged, awaiting clearing)
  • ✅ Standard T+2 clearing period begins

Step 3: Clear Cheque After T+2

{
"commandName": "InitiateClearChequeCommand",
"data": {
"chequeClearingId": "550e8400-e29b-41d4-a716-446655440000",
"clearingReferenceId": "CLR2026010301",
"remarks": "Cheque cleared successfully"
}
}

Final Account State:

  • ✅ Transaction state: CLEARED
  • ✅ UnclearedChequeAmount: ₦0 (decreased)
  • ✅ Balance: ₦15,000,000 (credited)

Example 2: Rejected Cheque Deposit (Failed Approval)

Step 1: Submit Suspicious Cheque

{
"commandName": "InitiateChequeDepositCommand",
"data": {
"accountEncodedKey": "1001234567",
"amount": 2500000.00,
"chequeNo": "CH777666",
"requireApproval": true,
"remarks": "Cheque deposit - unusual pattern detected, requires compliance review"
}
}

Step 2: Compliance Officer Rejects

{
"commandName": "RejectTransactionCommand",
"data": {
"transactionKey": "CHQ2026001002",
"rejectionReason": "Cheque signature does not match specimen signature. Customer unable to provide additional identification. Transaction rejected per AML policy."
}
}

Response:

{
"status": "Success",
"data": {
"transactionKey": "CHQ2026001002",
"state": "CANCELLED",
"unclearedChequeAmount": 0,
"balance": 10000000.00,
"message": "Cheque deposit rejected and cancelled"
}
}

Final State:

  • ❌ Transaction cancelled (never entered clearing)
  • ❌ UnclearedChequeAmount: ₦0 (never increased)
  • ❌ Balance: ₦10,000,000 (unchanged)
  • ❌ Customer notified of rejection

Example 3: High-Value Cheque Withdrawal with Approval

Step 1: Submit Large Cheque Withdrawal

{
"commandName": "InitiateChequeWithdrawalCommand",
"data": {
"accountEncodedKey": "1001234567",
"amount": 3000000.00,
"chequeNo": "CH555444",
"payeeName": "ABC Construction Ltd",
"requireApproval": true,
"remarks": "Large vendor payment - requires dual authorization"
}
}

Response:

{
"status": "Success",
"data": {
"transactionKey": "CHQ2026001003",
"state": "APPROVAL_PENDING",
"holdAmount": 3000000.00,
"balance": 10000000.00,
"availableBalance": 7000000.00,
"message": "Cheque withdrawal awaiting approval"
}
}

Account State:

  • ⏳ Transaction in APPROVAL_PENDING state
  • ⏳ HoldAmount: ₦3,000,000 (hold placed)
  • ⏳ Balance: ₦10,000,000 (not debited yet)
  • ⏳ Available Balance: ₦7,000,000 (reduced by hold)
  • ⏳ Cheque NOT issued yet

Step 2: Manager Approves Withdrawal

{
"commandName": "ApproveTransactionCommand",
"data": {
"transactionKey": "CHQ2026001003",
"approverNotes": "Verified contract with ABC Construction. Payment authorized. Cheque issued."
}
}

Response:

{
"status": "Success",
"data": {
"transactionKey": "CHQ2026001003",
"state": "PENDING",
"holdAmount": 0,
"balance": 7000000.00,
"availableBalance": 7000000.00,
"message": "Cheque withdrawal approved and issued"
}
}

Final State After Approval:

  • ✅ Transaction state: PENDING (clearing)
  • ✅ HoldAmount: ₦0 (hold released)
  • ✅ Balance: ₦7,000,000 (debited immediately)
  • ✅ Cheque issued to payee
  • ✅ Can be bounced if dishonored by clearing house

Example 4: Cancelled Cheque Withdrawal (Before Approval)

Step 1: Submit Withdrawal Request

{
"commandName": "InitiateChequeWithdrawalCommand",
"data": {
"accountEncodedKey": "1001234567",
"amount": 500000.00,
"chequeNo": "CH333222",
"payeeName": "XYZ Services",
"requireApproval": true,
"remarks": "Service payment"
}
}

Step 2: Customer Cancels Before Approval

{
"commandName": "CancelTransactionCommand",
"data": {
"transactionKey": "CHQ2026001004",
"cancellationReason": "Customer request - payment method changed to bank transfer instead"
}
}

Response:

{
"status": "Success",
"data": {
"transactionKey": "CHQ2026001004",
"state": "CANCELLED",
"holdAmount": 0,
"balance": 10000000.00,
"availableBalance": 10000000.00,
"message": "Cheque withdrawal cancelled successfully"
}
}

Final State:

  • ❌ Transaction cancelled (before approval)
  • ❌ HoldAmount: ₦0 (hold released)
  • ❌ Balance: ₦10,000,000 (unchanged)
  • ❌ Cheque not issued

Example 5: Complete Workflow - Deposit with Approval and Clearing

Timeline: Day 1 - Deposit Submission

{
"commandName": "InitiateChequeDepositCommand",
"data": {
"accountEncodedKey": "1001234567",
"amount": 1500000.00,
"chequeNo": "CH111222",
"requireApproval": true,
"remarks": "Third-party cheque - requires verification"
}
}

Day 1 Status:

  • State: APPROVAL_PENDING
  • Balance: ₦10,000,000
  • UnclearedAmount: ₦0

Timeline: Day 1 - Manager Approval (2 hours later)

{
"commandName": "ApproveTransactionCommand",
"data": {
"transactionKey": "CHQ2026001005",
"approverNotes": "Third-party cheque verified with issuing bank. Approved."
}
}

Day 1 Status After Approval:

  • State: PENDING (clearing cycle started)
  • Balance: ₦10,000,000
  • UnclearedAmount: ₦1,500,000
  • Clearing deadline: Day 3 (T+2)

Timeline: Day 3 - Cheque Clearing

{
"commandName": "InitiateClearChequeCommand",
"data": {
"chequeClearingId": "550e8400-e29b-41d4-a716-446655440000",
"clearingReferenceId": "CLR2026010501",
"remarks": "Cheque cleared - funds available"
}
}

Day 3 Final Status:

  • State: CLEARED
  • Balance: ₦11,500,000 (credited)
  • UnclearedAmount: ₦0
  • Transaction complete

Example 6: Dormant Account Cheque Withdrawal

{
"commandName": "InitiateChequeWithdrawalCommand",
"data": {
"accountEncodedKey": "9008887777",
"amount": 250000.00,
"chequeNo": "CH999000",
"payeeName": "Account Holder",
"requireApproval": true,
"remarks": "Withdrawal from dormant account (inactive 24 months) - requires special authorization and customer ID verification"
}
}

Expected Workflow:

  1. Transaction enters APPROVAL_PENDING
  2. Compliance officer verifies customer identity
  3. Account reactivation process initiated
  4. Branch manager approves after KYC update
  5. Account status: DORMANT → ACTIVE
  6. Transaction approved: APPROVAL_PENDING → PENDING
  7. Balance debited, cheque issued

Approval Notes Example:

{
"commandName": "ApproveTransactionCommand",
"data": {
"transactionKey": "CHQ2026001006",
"approverNotes": "Customer identity verified with national ID and biometric confirmation. Account reactivated per policy. KYC documents updated. Cheque withdrawal approved."
}
}

Best Practices

For Developers

  1. Always check state before clearing/bouncing/cancelling
  2. Handle errors gracefully with proper error codes
  3. Use transaction impacts for audit trail
  4. Validate currency matching for till operations
  5. Record all references from clearing house

For Tellers/Staff

  1. Verify customer identity for stop payments
  2. Document authorization for cancellations
  3. Check account status before accepting cheques
  4. Validate cheque details (date, amount, signature)
  5. Issue receipts for all transactions

For Operations

  1. Process clearing daily (T+2 standard)
  2. Monitor aged cheques (>5 days pending)
  3. Reconcile with clearing house reports
  4. Track bounce rates per account/branch
  5. Review cancellation patterns for fraud detection

Cheque Book Management

For cheque book registration and management, see Book Registers which provides unified management for cheque books, deposit slips, and withdrawal slips.