Field Manual PHP / Laravel reference
← Financial-system patterns

Consistency

Consistency preserves invariants across records and systems.

What it is

Consistency preserves invariants across records and systems.

When to use it

Define the source of truth and what may lag.

Syntax

sum of debits = sum of credits per currency
transaction state matches recorded movements

Example

// Local invariant: debit + credit + record in one transaction.
// External settlement: durable pending/unknown state, stable reference,
// retry-safe processing, and reconciliation.

Common mistakes

A local database transaction cannot atomically commit with an unrelated external provider.

Related topics

Browse Financial-system patterns