FinSim

Break payment networks before real money moves.

Connect independent financial services over finsim/v1, inject timeouts and duplicate deliveries, and watch distributed payments reconcile safely.

Apache 2.0 · Pre-alpha · provenance: SYNTHETIC
bank-a$1,000 -> $900.00
DEBIT $100 OK
FinSim HubUNKNOWN
ACK LOST
bank-b$600.00 (unacked)

bank-b credited $100.00, then its response dropped. FinSim isolates the transfer in UNKNOWN and blocks naive retries with 409 RECONCILIATION_REQUIRED.

Break payment networks before real money moves.

Payment systems are easy to demonstrate. Distributed failures are harder to understand.

A successful payment proves services can communicate. A failed payment tests whether the network can recover without losing money, duplicating credits, or guessing.

Model independent financial participants

Connect independently operated institutions through the versioned finsim/v1 HTTP contract while each participant retains ownership of its own account state.

finsim/v1 HTTP/JSON · Independent state ownership

Inject distributed-system failures on demand

Experiment with controlled DELAY, TIMEOUT, DUPLICATE_DELIVERY, and RESPONSE_LOST_AFTER_PROCESSING rules, plus replayable finsim/scenario/v1 fixtures.

Seeded PRNG · finsim scenario run --verify-replay

Treat UNKNOWN as a first-class outcome

A timeout never proves a payment failed. FinSim isolates uncertain transactions in UNKNOWN, blocks unsafe retries with 409 RECONCILIATION_REQUIRED, and resolves outcomes forward through ADR 0001.

ADR 0001 · Zero duplicate credits

Observe transaction behavior end to end

Inspect state transitions, participant calls, injected faults, and recovery queries through structured execution traces and the Simulation Cockpit.

GET /api/v1/transfers/{id}/trace

One transaction. Multiple services. Unexpected outcomes.

Step through a $100 transfer from bank-a to bank-b to see how ADR 0001 resolves an ambiguous timeout without creating a duplicate credit.

1. bank-a confirms DEBIT

FinSim submits the DEBIT leg to bank-a via POST /finsim/v1/payments with an Idempotency-Key. bank-a deducts $100.00 and returns 201 Created (200 OK on replay).

POST /finsim/v1/payments
Idempotency-Key: idem-9f2a-debit
{ "direction": "DEBIT", "accountReference": "acct-a-001", "money": { "amount": "100.00", "currency": "USD" }, "reference": "tx_9f2a", "provenance": "SYNTHETIC" }
-> 201 Created { "transactionId": "tx_9f2a", "direction": "DEBIT", "status": "COMPLETED", "provenance": "SYNTHETIC" }

A timeout is not proof of failure. Establish the outcome before deciding what happens next.

Explore UNKNOWN Reconciliation

Bring your own financial service.

Implement the four versioned finsim/v1 endpoints in any language and check conformance with finsim verify --url.

Repository pathsamples/bank-java/
StackJava 21, Spring Boot
Runtime wiringDefault bank-a (:9001) and bank-b (:9002) in docker compose up
Authoritative speccontract/finsim-v1.openapi.yaml
finsim verify --url http://localhost:9001
# Four required finsim/v1 participant endpoints
GET  /finsim/v1/institution/health
GET  /finsim/v1/institution/capabilities
POST /finsim/v1/payments              # direction: "DEBIT" | "CREDIT"
GET  /finsim/v1/payments/{transactionId}?leg=DEBIT|CREDIT

# Every simulated institution and balance carries:
"provenance": "SYNTHETIC"

See distributed transactions, not just API responses.

Run the Milestone 1 Simulation Cockpit (web/) with zero backend dependencies in Demo Mode, or toggle to Live API against Docker Compose.

StageParticipantOffsetSpanOutcome
TRANSFER_ACCEPTEDFinSim Core+0 ms
ACCEPTED
DEBIT_REQUESTbank-a+14 ms
200 OK
CREDIT_REQUESTbank-b+38 ms
RESPONSE_LOST -> UNKNOWN
RESOLVE_QUERYbank-b+92 ms
COMPLETED

Built for engineers, classrooms, and open-source contributors.

Payment and backend engineers

Experiment with idempotency, timeouts, duplicate deliveries, and reconciliation without touching production payment rails.

Universities and educators

Teach distributed systems through financial transaction lifecycles, independent services, and reproducible lab exercises.

Researchers

Study consistency, failure recovery, and deterministic scenario replay using synthetic data.

Open-source developers

Build participant implementations, simulation modules, property-based tests, and declarative scenarios.

A simulation environment, not a production payment network.

FinSim is Apache 2.0 open source. It does not move real money, connect to live banking rails, or certify regulatory compliance. Every simulated institution, account, and balance carries "provenance": "SYNTHETIC".

{
  "project": "FinSim",
  "license": "Apache-2.0",
  "provenance": "SYNTHETIC",
  "liveBankingRails": false
}