feat(clearing): add CTS/NACH clearing modules with real NPCI integration
Fineract Build & Cucumber tests (without E2E tests) / verify (main, build-core) (push) Canceled after 0s
Fineract Build & Cucumber tests (without E2E tests) / verify (main, cucumber) (push) Canceled after 0s
Fineract Build & Cucumber tests (without E2E tests) / verify (progressive-loan, build-progressive-loan) (push) Canceled after 0s
Fineract Docker Builds / build (false, docker-compose-postgresql.yml, postgresql) (push) Canceled after 0s
Fineract Docker Builds / build (true, docker-compose.yml, mariadb) (push) Canceled after 0s
Fineract Documentation build / build (push) Canceled after 0s
Fineract E2E Tests / E2E Tests (Shard 1 of 10) (push) Canceled after 0s
Fineract E2E Tests / E2E Tests (Shard 10 of 10) (push) Canceled after 0s
Fineract E2E Tests / E2E Tests (Shard 2 of 10) (push) Canceled after 0s
Fineract E2E Tests / E2E Tests (Shard 3 of 10) (push) Canceled after 0s
Fineract E2E Tests / E2E Tests (Shard 4 of 10) (push) Canceled after 0s
Fineract E2E Tests / E2E Tests (Shard 5 of 10) (push) Canceled after 0s
Fineract E2E Tests / E2E Tests (Shard 6 of 10) (push) Canceled after 0s
Fineract E2E Tests / E2E Tests (Shard 7 of 10) (push) Canceled after 0s
Fineract E2E Tests / E2E Tests (Shard 8 of 10) (push) Canceled after 0s
Fineract E2E Tests / E2E Tests (Shard 9 of 10) (push) Canceled after 0s
Fineract Cargo & Unit- & Integration tests - MariaDB / test (test-core-1) (push) Canceled after 0s
Fineract Cargo & Unit- & Integration tests - MariaDB / test (test-core-2) (push) Canceled after 0s
Fineract Cargo & Unit- & Integration tests - MariaDB / test (test-core-3) (push) Canceled after 0s
Fineract Cargo & Unit- & Integration tests - MariaDB / test (test-core-4) (push) Canceled after 0s
Fineract Cargo & Unit- & Integration tests - MariaDB / test (test-core-5) (push) Canceled after 0s
Fineract Cargo & Unit- & Integration tests - MySQL / test (test-core-1) (push) Canceled after 0s
Fineract Cargo & Unit- & Integration tests - MySQL / test (test-core-2) (push) Canceled after 0s
Fineract Cargo & Unit- & Integration tests - MySQL / test (test-core-3) (push) Canceled after 0s
Fineract Cargo & Unit- & Integration tests - MySQL / test (test-core-4) (push) Canceled after 0s
Fineract Cargo & Unit- & Integration tests - MySQL / test (test-core-5) (push) Canceled after 0s
Fineract Cargo & Unit- & Integration tests - PostgreSQL / test (test-core-1) (push) Canceled after 0s
Fineract Cargo & Unit- & Integration tests - PostgreSQL / test (test-core-2) (push) Canceled after 0s
Fineract Cargo & Unit- & Integration tests - PostgreSQL / test (test-core-3) (push) Canceled after 0s
Fineract Cargo & Unit- & Integration tests - PostgreSQL / test (test-core-4) (push) Canceled after 0s
Fineract Cargo & Unit- & Integration tests - PostgreSQL / test (test-core-5) (push) Canceled after 0s
Fineract Liquibase Only mode - PostgreSQL / test (push) Canceled after 0s
Fineract Messaging Smoke Tests / Smoke Test with ActiveMQ (push) Canceled after 0s
Fineract Messaging Smoke Tests / Smoke Test with Kafka (push) Canceled after 0s

- Inward/outward CTS clearing (capture, validate, settle, dishonour), positive pay,
  settlement/reconciliation, and NACH clearing modules
- Real, separate NPCI clearing-house integration: hybrid RSA+AES envelope crypto,
  bank self-registration, outward batch submission, and an inward push webhook
- Outward clearing is now session-batched: a 2-hourly scheduled job (plus the
  existing manual "Send Pending Batch" fallback) bundles CAPTURED cheques instead
  of sending them one at a time
- Batch-summary read APIs and date/text filters across inward batches, outward
  presentments, and outward batches

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Jaanu423
2026-07-21 15:46:52 +05:30
co-authored by Claude Sonnet 5
parent 383dfdc6e9
commit b433edfdfe
162 changed files with 12826 additions and 63186 deletions
@@ -231,6 +231,176 @@ public class CommandWrapperBuilder {
return this;
}
// ===== Clearing (CTS + NACH) command wrappers =====
public CommandWrapperBuilder createClearingSettlementBatch() {
this.actionName = "CREATE";
this.entityName = "CLEARINGSETTLEMENTBATCH";
this.entityId = null;
this.href = "/clearing/settlement-batches";
return this;
}
public CommandWrapperBuilder postClearingSettlementBatch(final Long settlementBatchId) {
this.actionName = "POST";
this.entityName = "CLEARINGSETTLEMENTBATCH";
this.entityId = settlementBatchId;
this.href = "/clearing/settlement-batches/" + settlementBatchId;
return this;
}
public CommandWrapperBuilder rejectClearingSettlementBatch(final Long settlementBatchId) {
this.actionName = "REJECT";
this.entityName = "CLEARINGSETTLEMENTBATCH";
this.entityId = settlementBatchId;
this.href = "/clearing/settlement-batches/" + settlementBatchId;
return this;
}
public CommandWrapperBuilder createClearingReconciliation() {
this.actionName = "CREATE";
this.entityName = "CLEARINGRECONCILIATION";
this.entityId = null;
this.href = "/clearing/reconciliations";
return this;
}
public CommandWrapperBuilder createInwardClearingBatch() {
this.actionName = "CREATE";
this.entityName = "INWARDCLEARINGBATCH";
this.entityId = null;
this.href = "/ctsclearing/inward-batches";
return this;
}
public CommandWrapperBuilder validateInwardClearingBatch(final Long batchId) {
this.actionName = "VALIDATE";
this.entityName = "INWARDCLEARINGBATCH";
this.entityId = batchId;
this.href = "/ctsclearing/inward-batches/" + batchId;
return this;
}
public CommandWrapperBuilder passInwardClearingItem(final Long itemId) {
this.actionName = "PASS";
this.entityName = "INWARDCLEARINGITEM";
this.entityId = itemId;
this.href = "/ctsclearing/inward-items/" + itemId;
return this;
}
public CommandWrapperBuilder returnInwardClearingItem(final Long itemId) {
this.actionName = "RETURN";
this.entityName = "INWARDCLEARINGITEM";
this.entityId = itemId;
this.href = "/ctsclearing/inward-items/" + itemId;
return this;
}
public CommandWrapperBuilder createPositivePayRegistration() {
this.actionName = "CREATE";
this.entityName = "POSITIVEPAYREGISTRATION";
this.entityId = null;
this.href = "/ctsclearing/positive-pay";
return this;
}
public CommandWrapperBuilder cancelPositivePayRegistration(final Long registrationId) {
this.actionName = "CANCEL";
this.entityName = "POSITIVEPAYREGISTRATION";
this.entityId = registrationId;
this.href = "/ctsclearing/positive-pay/" + registrationId;
return this;
}
public CommandWrapperBuilder sendPendingOutwardClearingBatch() {
this.actionName = "SENDBATCH";
this.entityName = "OUTWARDCLEARINGPRESENTMENT";
this.entityId = null;
this.href = "/ctsclearing/outward-presentments/send-pending-batch";
return this;
}
public CommandWrapperBuilder createOutwardClearingPresentment() {
this.actionName = "CREATE";
this.entityName = "OUTWARDCLEARINGPRESENTMENT";
this.entityId = null;
this.href = "/ctsclearing/outward-presentments";
return this;
}
public CommandWrapperBuilder sendOutwardClearingPresentment(final Long presentmentId) {
this.actionName = "SEND";
this.entityName = "OUTWARDCLEARINGPRESENTMENT";
this.entityId = presentmentId;
this.href = "/ctsclearing/outward-presentments/" + presentmentId;
return this;
}
public CommandWrapperBuilder settleOutwardClearingPresentment(final Long presentmentId) {
this.actionName = "SETTLE";
this.entityName = "OUTWARDCLEARINGPRESENTMENT";
this.entityId = presentmentId;
this.href = "/ctsclearing/outward-presentments/" + presentmentId;
return this;
}
public CommandWrapperBuilder dishonourOutwardClearingPresentment(final Long presentmentId) {
this.actionName = "DISHONOUR";
this.entityName = "OUTWARDCLEARINGPRESENTMENT";
this.entityId = presentmentId;
this.href = "/ctsclearing/outward-presentments/" + presentmentId;
return this;
}
public CommandWrapperBuilder createNachMandate() {
this.actionName = "CREATE";
this.entityName = "NACHMANDATE";
this.entityId = null;
this.href = "/nachclearing/mandates";
return this;
}
public CommandWrapperBuilder cancelNachMandate(final Long mandateId) {
this.actionName = "CANCEL";
this.entityName = "NACHMANDATE";
this.entityId = mandateId;
this.href = "/nachclearing/mandates/" + mandateId;
return this;
}
public CommandWrapperBuilder createNachBatch() {
this.actionName = "CREATE";
this.entityName = "NACHBATCH";
this.entityId = null;
this.href = "/nachclearing/batches";
return this;
}
public CommandWrapperBuilder processNachBatch(final Long batchId) {
this.actionName = "PROCESS";
this.entityName = "NACHBATCH";
this.entityId = batchId;
this.href = "/nachclearing/batches/" + batchId;
return this;
}
public CommandWrapperBuilder passNachTransaction(final Long transactionId) {
this.actionName = "PASS";
this.entityName = "NACHTRANSACTION";
this.entityId = transactionId;
this.href = "/nachclearing/transactions/" + transactionId;
return this;
}
public CommandWrapperBuilder returnNachTransaction(final Long transactionId) {
this.actionName = "RETURN";
this.entityName = "NACHTRANSACTION";
this.entityId = transactionId;
this.href = "/nachclearing/transactions/" + transactionId;
return this;
}
public CommandWrapperBuilder updateCreditBureau() {
this.actionName = "UPDATE";
this.entityName = "ORGANISATIONCREDITBUREAU";
@@ -64,6 +64,7 @@ public enum JobName {
IMPS_DEEMED_RECONCILE("IMPS DEEMED Reconciliation"), //
NEFT_BATCH_PROCESS("NEFT Batch Process"), //
VERIFICATION_TOKEN_CLEANUP("Verification Token Cleanup"), //
OUTWARD_CLEARING_BATCH_SEND("CTS Outward Clearing Batch Send"), //
; //
private final String name;