Custom Roles
How Custom Roles works in Paycux, what it is for, and the smallest setup that gets it running.
Overview
Custom Roles 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 might I use custom roles?
Roles are defined once per project and assigned per organization membership, so the same person can be an admin in one organization and a viewer in another.
Check permissions on the server, in the request path, using the permission slug rather than the role name. Role names change; slugs are stable.
Creating custom roles
Creating custom roles applies specifically to Custom Roles. 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.
Custom role configuration
Custom role configuration is configured per environment in the dashboard, so staging and production can differ while your application code stays identical.
Changes take effect on the next request. There is no deploy step and no cache to clear.
Using custom roles
Using custom roles applies specifically to Custom Roles. 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.
Deleting an environment role
Deleting an environment role applies specifically to Custom Roles. 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.