Bearer token rotation
How Bearer token rotation works in Paycux, what it is for, and the smallest setup that gets it running.
Overview
Bearer token rotation is part of the Paycux platform. This page explains what it does, when to reach for it, and the smallest working setup you can ship.
Everything below applies to both environments. Build and test in staging, then promote the same configuration to production without changing your code — only the API key and client ID differ.
Why this matters
Why this matters is handled by Bearer token rotation rather than by your application code. Paycux exposes it through the same API surface as the rest of the platform, so the client you already configured needs no additional setup.
Configuration lives in the dashboard and is versioned per environment. Change it in staging, confirm the behaviour, then apply the same change to production.
Managing tokens in the Dashboard
Access tokens are JWTs signed with a rotating key. Verify them against the JWKS endpoint for your client rather than a pinned public key, so rotation never causes an outage.
1https://api.paycux.com/sso/jwks/client_01M4KXD1PZXFWGWE9ZKPCQRAQ
Cache the key set and re-fetch on an unknown key ID. Reject any token whose issuer, audience or expiry does not match what you expect.
Managing tokens in the Admin Portal
Managing tokens in the Admin Portal applies specifically to Bearer token rotation. It behaves the same in both environments, and the values it depends on are visible in the dashboard for the environment you have selected.
If the behaviour you see does not match this description, check which environment your API key belongs to before anything else — a staging key against production data is the most common cause.
Zero-downtime rotation
Zero-downtime rotation is handled by Bearer token rotation rather than by your application code. Paycux exposes it through the same API surface as the rest of the platform, so the client you already configured needs no additional setup.
Configuration lives in the dashboard and is versioned per environment. Change it in staging, confirm the behaviour, then apply the same change to production.
Migration
Migrations run alongside your current system rather than replacing it in one step. Import the accounts you already have, run both paths in parallel, then cut over once the numbers agree.
- 1Export your existing users with their stable identifiers and email addresses.
- 2Import them into Paycux; imported users keep their original ID under
external_idso your foreign keys stay valid. - 3Send new sign-ins through Paycux while old sessions continue to work.
- 4Retire the old path once sign-in volume through Paycux matches your baseline.