Perpetual License · Self-Hosted · Source Code Included

The Java Ledger SDK
Correct by Construction

Build loan ledgers that stay consistent through payment reversals, backdated entries, and out-of-order events — guaranteed by the engine, not by careful coding.

Java 21 · Quarkus / Spring compatible · JavaMoney 256-bit precision · 53 tested invariants

// the_problem

Your ledger isn't wrong today.
It's wrong after the reversal.

Typical In-House Ledger

  • Silent balance corruption on late-arriving payments
  • Hand-coded reversal logic with edge-case gaps
  • Backdated entries break running balances downstream
  • No idempotency — duplicate events corrupt state
  • Interest recalculations fall out of sync after corrections
  • Months of engineering to patch each new scenario

Precise Ledger Pro

  • Automatic rollback & replay on out-of-order events
  • Reversal engine emits signed compensation entries
  • Retroactive reconciliation synchs every downstream balance
  • Composite idempotency keys prevent double-application
  • Interest re-accrual built into the replay cycle
  • One SDK — correct from day one, auditable forever

// capabilities

Six pillars of ledger integrity

Retroactive Rollback + Replay

Backdated activities automatically trigger ledger rollback to the effective date, deterministic re-application of all subsequent activities, and delta-based synchronisation back into the primary ledger.

Reversal Compensation

Every reversal emits a signed compensation entry that mathematically negates the original impact, then rolls back and replays all downstream activities so running balances stay consistent.

Double-Entry Integrity

Every LedgerEntry carries both the component deltas (Δprincipal, Δinterest, Δfee, Δexcess) and the running balance — always consistent, always auditable.

💰

JavaMoney Precision

Built on Moneta with a 256-bit HALF_EVEN MathContext. No IEEE-754 floating point drift — every cent is accounted for across millions of entries.

🔒

Idempotent Application

Composite idempotency keys on every entry prevent double-application on retry storms or duplicate event delivery — critical for event-sourced architectures.

🔨

Pluggable Spread Strategies

Ship with ComputationalSpread (interest-first waterfall) and StaticAllocation. Implement TransactionSpreadStrategy for any custom allocation rule.

// how_it_works

Three-phase deterministic engine

1

Submit Activity

Transaction, SOD accrual, or reversal submitted via API

2

Detect Position

Engine checks if back-dated, reversal, or chronological

3

Rollback · Replay · Sync

Fork, recompute, and reconcile deltas back into primary ledger

LedgerService.applyLedgerActivity()
// Pseudocode — the actual engine branching logic
for each activity in pendingActivities:

  if activity.isBackdated(ledger):
    retroLedger = ledger.rollbackTo(activity.effectiveAt)
    retroLedger.apply(activity)
    replaySubsequent(retroLedger, activitiesAfter)
    ledger.syncWith(retroLedger)  // delta reconciliation

  else if activity.isReversal():
    ledger.addCompensation(negate(originalImpact))
    retroLedger = ledger.rollbackBefore(originalActivity)
    replaySubsequent(retroLedger, activitiesAfter)
    ledger.syncWith(retroLedger)  // delta reconciliation

  else:
    activity.applyTo(ledger)       // chronological — fast path

// integration

Drop into your Java stack in minutes

<!-- Add to your pom.xml -->
<dependency>
  <groupId>io.github.v1bh0r</groupId>
  <artifactId>precise-ledger-pro</artifactId>
  <version>1.0.0</version>
</dependency>
// Apply activities — engine handles backdated & reversals
var ledger = ledgerService.getLedger(loanId);
var clock  = ledgerService.getCurrentLedgerClock(ledger);

ledgerService.applyLedgerActivity(
    ledger, activity, clock, temporalContext
);

// That's it. Balances are correct.
var balance = ledger.getCurrentBalance();
// → Balance[principal=USD 991,000.00, interest=...]

Your code, your servers, your audit trail

  • Perpetual license — keeps working even if your support lapses
  • Full source code included with Business plans for auditing & safe-keeping
  • Self-hosted — deploy on-prem, private cloud, or air-gapped environments
  • Works with any JPA/Hibernate datastore (PostgreSQL, MySQL, Oracle, H2)
  • No phone-home, no telemetry, no vendor lock-in
  • Quarkus, Spring Boot, or standalone — your choice

// pricing

Perpetual license. Yours forever.

One price, deploy anywhere. Every plan includes a perpetual usage license, the 53-test acceptance suite, and your first year of updates & support.

STARTER

$2,999 perpetual

+ $499 / year for support renewal


  • Single production node
  • Compiled JAR artifact
  • Email support (48hr SLA)
  • 1 year of version updates included
  • Full acceptance test suite
  • Self-hosted, no telemetry
Contact Sales

// faq

Frequently asked questions

You pay once and can use the SDK in production forever. There is no subscription required to keep running. The optional annual support renewal gives you access to new versions, security patches, and priority email support.
The Business plan includes full source code access. This is essential for financial institutions that need to audit third-party code, maintain escrow copies, or make customisations. The Starter plan ships as a compiled JAR with full Javadoc and the acceptance test suite.
Yes. While the reference implementation is built on Quarkus, the core ledger engine (Ledger, LedgerService, activity types) is framework-agnostic. It works with any JPA/Hibernate environment including Spring Boot, Micronaut, or plain Java SE.
Any database supported by Hibernate: PostgreSQL (recommended for production), MySQL, Oracle, SQL Server, H2 (testing). The SDK uses standard JPA entities with no database-specific SQL.
Your software continues working — it's a perpetual license. You keep the last version you received. You just won't receive future updates, security patches, or priority support until you renew.

Ready to ship a correct ledger?

See the rollback-replay-sync engine handle reversals and backdated payments in real time, then talk to us about licensing.

View Live Demo Contact Sales