Cheque Operations API
Complete developer guide for all cheque-related operations in BankLingo, including transaction processing, registration management, and clearing queries.
API Categories
1. Cheque Transaction Commands (BPMCore V2)
Process cheque transactions through their complete lifecycle - from deposit/withdrawal to clearing and settlement.
Implementation: CB.Administration.Api/Commands/BPMCore/Tellering/AdministrationCoreTelleringChequeCommandHandlers.cs
| Command | Purpose | Endpoint |
|---|---|---|
| InitiateChequeDepositCommand | Deposit a cheque (PENDING state) | POST /api/bpm/cmd |
| InitiateChequeWithdrawalCommand | Issue cheque withdrawal | POST /api/bpm/cmd |
| InitiateClearChequeCommand | Clear pending cheque (PENDING → CLEARED) | POST /api/bpm/cmd |
| InitiateBounceChequeCommand | Bounce cheque (reversal) | POST /api/bpm/cmd |
| InitiateCancelChequeCommand | Cancel cheque (user-initiated reversal) | POST /api/bpm/cmd |
Key Features:
- ✅ Complete V2 BPMCore implementation
- ✅ Transaction impact tracking
- ✅ Multi-day clearing cycle support
- ✅ Asymmetric deposit/withdrawal handling
- ✅ Local vs remote cheque processing
- ✅ UnclearedChequeAmount tracking
Cheque book registration commands have been replaced by the more comprehensive Book Registers system in BPMCore V2.
Book Registers provide expanded functionality:
- ✅ Manages 3 book types: Cheque books, Deposit Slips, Withdrawal Slips
- ✅ Enhanced security with BLOCKED state for fraud prevention
- ✅ Unified management for all physical banking instruments
- ✅ Modern BPMCore V2 architecture with Redis caching
For cheque book management, use:
- CreateBookRegisterCommand (with
bookType=1for cheques) - ActivateBookRegisterCommand
- DeactivateBookRegisterCommand
- BlockBookRegisterCommand (NEW - security feature)
See the Book Registers documentation for complete details.
2. Cheque Clearing Queries
Query pending cheques and clearing requests for processing and monitoring.
| Query | Purpose | Endpoint |
|---|---|---|
| GetUnclearedChequeQuery | Get pending cheques for account | POST /api/bpm/cmd |
| GetAllChequeClearingRequestsQuery | Get all pending clearing requests | POST /api/bpm/cmd |
Key Features:
- ✅ Filter by account, date range, status
- ✅ Pagination support
- ✅ Real-time clearing status
Common Endpoints
All cheque operations use the unified BPMCore command endpoint:
POST /api/bpm/cmd
Content-Type: application/json
Authorization: Bearer {token}
Request Structure
{
"commandName": "InitiateChequeDepositCommand",
"data": {
// Command-specific parameters
}
}
Response Structure
{
"isSuccessful": true,
"message": "Operation completed successfully",
"statusCode": "00",
"data": {
// Command-specific response data
}
}
Authentication
All cheque operations require authentication:
Authorization: Bearer {access_token}
Obtain access token via Admin Login or Authenticator Login.
Cheque Processing Lifecycle
1. Cheque Book Issuance
CREATE REGISTRATION (Inactive)
→ ACTIVATE REGISTRATION
→ Customer receives cheque book
→ Cheques can be used
2. Cheque Deposit Processing
INITIATE DEPOSIT (PENDING)
→ Cheque submitted to clearing house
→ CLEAR CHEQUE (PENDING → CLEARED)
→ Funds credited to account
OR
INITIATE DEPOSIT (PENDING)
→ Clearing fails
→ BOUNCE CHEQUE (PENDING → BOUNCED)
→ Account debited (if instant credit given)
3. Cheque Withdrawal Processing
INITIATE WITHDRAWAL (PENDING)
→ Account debited immediately
→ Cheque presented by beneficiary
→ CLEAR CHEQUE (PENDING → CLEARED)
→ Settlement completed
OR
INITIATE WITHDRAWAL (PENDING)
→ Customer requests cancellation
→ CANCEL CHEQUE (PENDING → CANCELLED)
→ Account credited (reversal)
Key Entities
ChequeClearingTransaction
Represents a cheque in the clearing process.
Key Fields:
ChequeNo: Cheque serial numberChequeAmount: Transaction amountChequeClearingState: PENDING | CLEARED | BOUNCED | CANCELLEDChequeClearingTransactionType: DEPOSIT | WITHDRAWALDepositAccountNumber: Account numberTillAccountId: Associated till (for teller transactions)RequestDate: When cheque was submittedCBSTransactionId: Parent transaction reference
ChequeRegistration
Represents an issued cheque book.
Key Fields:
DepositAccountId: Account that owns the bookStartSerialNumber: First cheque numberEndSerialNumber: Last cheque numberNumberOfLeaves: Total cheques in bookIsActive: Active statusIssuedDate: Date issuedChequeRegistrationStatus: ACTIVE | NOT_ACTIVE
Error Codes
| Code | Message | Cause | Resolution |
|---|---|---|---|
| 00 | Success | Operation successful | None |
| 05 | Account inactive | Account not ACTIVE | Activate account |
| 12 | Invalid cheque data | Invalid amount/number | Verify cheque details |
| 14 | Invalid bank code | Bank not found | Check bank code |
| 26 | Duplicate cheque | Already processed | Check transaction history |
| 27 | Stale cheque | Cheque > 6 months old | Request new cheque |
| 28 | Post-dated cheque | Date in future | Wait until cheque date |
| 51 | Insufficient funds | Low balance | Deposit funds |
| 57 | Cheque stopped/stolen | Stop payment set | Contact issuer |
| 58 | Signature mismatch | Invalid signature | Verify signature |
| 91 | System error | Technical failure | Retry or contact support |
Best Practices
For Developers
- State Machine: Always follow proper state transitions (PENDING → CLEARED/BOUNCED/CANCELLED)
- Impact Tracking: Use TransactionImpactRecord for all balance changes
- Idempotency: Use unique transaction keys to prevent duplicates
- Error Handling: Implement retry logic for network failures
- Async Processing: Use background jobs for clearing operations
- Validation: Verify cheque registration is active before processing
For Operations
- Monitor Clearing Queue: Review pending cheques daily
- Serial Number Management: Avoid overlapping ranges
- Deactivation Process: Deactivate lost/stolen books immediately
- Audit Trail: Maintain complete history of all operations
- Reconciliation: Daily reconciliation of cleared vs pending
- Security: Monitor for suspicious patterns (multiple bounces, large amounts)
Related Documentation
- Transaction Processing - Cheque - Product documentation
- Teller Transactions - Teller-based cheque operations
- Deposit Accounts - Account management
- Book Registers - Book register management (cheque books, slips)
Support
For technical support or questions: