Quick links

Quickstart GuideAPI reference 66 endpointsAuthentication GuideScopes & presets 32 scopesToken lifecycle GuideErrors ReferenceToken console Tool
Documentation menu
QuickstartAuthenticationScopes & presetsToken lifecycleErrorsSecurityJWT & other authAPI referenceToken console

Security model

Security

Treat API tokens as production secrets: minimize authority, preserve one-time delivery, plan immediate rotations, and rely on live identity checks.

256-bit random secretSHA-256 lookup · explicit scope ceiling · live owner checks
v1

Credential properties

The API token is a high-entropy random secret, not a user-chosen password. Its prefix and suffix make the credential recognizable and versioned without weakening its entropy.

32 random bytes

Encoded as 43 base64url characters—256 bits of entropy.

Strict version format

Case-sensitive vou_…v1 parsing rejects malformed variants.

Hash-only storage

Only SHA-256 of the complete plaintext is indexed and retained.

Strict token format
^vou_([A-Za-z0-9_-]{43})\.v1$
Generation & hashing
const secret = randomBytes(32).toString('base64url');
const token = `vou_${secret}.v1`;
const tokenHash = sha256(token);

A slow password hash is unnecessary for a uniformly random 256-bit secret. The indexed SHA-256 digest enables direct lookup without making plaintext recoverable.

Storage and transport

Do

  • Use a server-side secret manager.
  • Inject through protected environment/configuration channels.
  • Send only in the HTTPS bearer header.
  • Give each integration its own credential.
  • Redact headers in traces and error reporting.

Never

  • Browser localStorage or sessionStorage.
  • Frontend source code or public environment variables.
  • URLs, query parameters, or analytics payloads.
  • Logs, screenshots, issue reports, or chat messages.
  • A shared token across staging and production.
The docs tools are deliberately ephemeral.The playground and token console keep credentials in JavaScript memory only. Reloading or navigating away clears them.

Defense in depth on every request

01Valid token recordFormat · hash · version · active · unexpired
02Live ownerPresent · active · MERCHANT · still owns merchant
03Live merchantPresent · ACTIVE · bound tenant
04Effective permissionRoute scope · role guard · merchant permission

This revalidation means a leaked token loses utility when its owner is suspended, role changes, merchant ownership changes, or the merchant becomes inactive—even if the stored token record itself was never edited.

Rotation and incident response

1Assess

Identify the token record by safe metadata and understand its current scopes and consumers.

2Rotate or revoke

Rotate when the integration continues; revoke when it must stop. Old plaintext becomes invalid immediately.

3Distribute

Move the new one-time secret through your controlled secret-delivery process.

4Verify

Confirm expected calls succeed and the prior credential receives 401.

There is no overlap window.Rotation is atomic and immediately invalidates the old hash. Schedule a controlled cutover to avoid integration downtime.

Operational visibility and limits

Last observed use

lastUsedAt, bounded IP, and bounded user agent update at most once every five minutes.

Lifecycle metadata

Generation, rotation time, expiry, revocation time/reason, and timestamps remain visible.

No request history

There is no per-token request trail or API-token audit-event collection.

No per-token rate limit is added by this system. Existing global and route throttles continue to apply, but API.md does not publish numeric limits or rate-limit headers.