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?
- A v7 UUID transaction ID is time-ordered (helpful when scanning a ledger) and unique, so a retried charge cannot post twice.
- Pair it with the idempotency key from the request that created it.
How to generate
- Generate a v7 UUID per transaction.
- Store it as the ledger primary key.
- Reject any duplicate (same idempotency key).
Use Cases
- Payments and refunds.
- Ledger postings.
- Settlement batches.
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-orderedFrequently 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
UUID v1 GeneratorUUID v3 GeneratorUUID v4 GeneratorUUID v5 GeneratorUUID v6 GeneratorUUID v7 GeneratorUUID v8 GeneratorBulk UUID GeneratorShort UUID GeneratorUUID ValidatorUUID FormatterUUID as a Primary KeyUUID Database IDUUID Foreign KeyUUID Shard KeyUUID Partition KeyUUID in a Composite KeyUUID Surrogate KeyUUID API KeyUUID Session TokenUUID Access TokenUUID Refresh TokenUUID Idempotency KeyUUID Request IDUUID Correlation IDUUID Trace IDUUID CSRF TokenUUID NonceUUID FilenameUUID Object KeyUUID S3 KeyUUID Upload IDUUID Cache KeyUUID Blob NameUUID Temp FileUUID User IDUUID Account IDUUID Customer IDUUID Device IDUUID Tenant IDUUID Client IDUUID Anonymous IDUUID Member IDUUID Message IDUUID Event IDUUID Job IDUUID Task IDUUID Queue Message IDUUID Transaction IDUUID Order IDUUID Invoice IDUUID Payment IDUUID Reset TokenUUID Verification TokenUUID Invite CodeUUID API SecretUUID Share LinkUUID Magic LinkUUID Node IDUUID Worker IDUUID Lock IDUUID Cluster IDUUID Test DataUUID Seed DataUUID FixtureUUID Mock IDUUID Placeholder IDUUID Sample ID