- Public keys can be used on the client side (front-end) and only allow limited actions.
- Secret keys, on the other hand, provide full access to the FedaPay API. Anyone with this key can act on behalf of your account.
Best practices to protect your secret API keys
1. Store your keys in a secure environment Secret API keys must be stored exclusively in:- environment variables;
- secure secret management services (Key Management System – KMS, vaults, secrets managers, etc.).
- storing them in plain text within your source code;
- placing them in unsecured local files;
- copying them into unencrypted collaboration tools.
- restricted only to individuals and systems that truly need them;
- governed by a clear internal policy (who can create, view, or rotate a key).
- regularly reviewing access permissions;
- removing unnecessary privileges;
- auditing internal usage when in doubt.
- via email;
- through instant messaging applications;
- in support tickets or screenshots.
- through developers’ machines;
- via compromised third-party tools;
- or due to configuration errors.
- mobile applications;
- browser-side JavaScript;
- SDKs distributed to third parties.
- public keys designed for this purpose;
- or secure intermediary server endpoints.
- rotating your keys periodically, even without an incident;
- implementing a clear replacement process (old → new key).
- identify exactly where your keys are used;
- respond quickly in case of compromise;
- reduce the impact of unauthorized access.
- API requests made using your keys;
- the use of live keys in unexpected contexts (e.g., test environment).
- sandbox keys are used only in test environments;
- live keys are not unnecessarily exposed.
- Regenerate the affected key immediately from your FedaPay dashboard.
- Replace the key in all your integrations.
- Disable the old key once the new one is operational.
- Investigate the root cause of the incident to prevent recurrence.
Maintaining a high level of security over time
API key security is not a one-time action, but an ongoing process. We recommend:- keeping your internal documentation up to date;
- regularly training your technical teams;
- reviewing your practices whenever your integration evolves.

