UUID Use Case

UUID Transaction ID

Financial movements must be traceable and never double-applied. A UUID transaction ID is the anchor of that audit trail.

AuditableIdempotentv7 for time

Generated locally with the Web Crypto API — nothing leaves your browser.

What Is UUID Transaction ID?

How to generate

  1. Generate a v7 UUID per transaction.
  2. Store it as the ledger primary key.
  3. Reject any duplicate (same idempotency key).

Use Cases

Code Examples

PostgreSQL
SELECT uuid_generate_v7();  -- time-ordered primary key (pg_uuidv7 / uuid6 ext)
JavaScript
import { v7 as uuidv7 } from 'uuid';
const id = uuidv7(); // time-ordered

Frequently Asked Questions

v4 or v7 for transactions?
v7 gives time-ordering that suits ledger scans; either is unique enough to prevent duplicates.
Transaction ID vs idempotency key?
The key is per-request (retries share it); the transaction ID is the resulting record's id.

Related tools