Skip to main content
A UUID v4 is 122 random bits formatted as 36 characters. Collisions are so unlikely you can treat generated values as unique without coordinating between services.

Where these are useful in an integration

  • Idempotency keys. Bitnob endpoints that move money take a client-generated reference, which on most of them stops a retried request creating a duplicate. See Idempotency and references.
  • References. Your own transaction reference, echoed back on webhooks for reconciliation.
  • Nonces. Request signing needs a unique value per request.

Generating them in code

For idempotency keys, a composite key such as withdrawal-cust12345-001 is often better than a bare UUID: it is derived from the operation, so a retry after a crash regenerates the same key, while a fresh UUID would not.