Skip to content
All questionsSecurity

What to do if the secret key ends up in the wrong hands?

Reissue the key in the dashboard: the old value stops working immediately and the new one is shown once. After that, update it everywhere it is configured and check whether anyone managed to use the leak.

The order of actions

  • Reissue the key in the store keys section and save the new value at once — it will not be shown again.
  • Update it in module settings, environment variables and any service that calls the API.
  • Review operations since the leak for payments and refunds you did not initiate.
  • Change passwords and enable two-factor authentication if dashboard access leaked too.

What exactly the key gives at MulenPay

The dashboard issues two keys: an API key for REST API requests and a secret key for signing webhooks. With a leaked API key an outsider can create payments on behalf of the store and issue refunds on your transactions; with the secret key they can forge payment notifications — "paying" for orders no money ever came for. The key cannot change the payout details: that is done only from the dashboard, so a leaked key and a leaked password are two separate problems. After a reissue the old key is rejected instantly; webhooks are signed with the new one from then on, so until you update your side, notifications about genuine payments will fail the check — update both sides at once.

Example: a developer commits .env with the key to a public repository. Five minutes later the key is reissued in the dashboard, placed on the server, and the module is restarted. An export of the last hour's transactions shows no refunds or payments the store did not create. The file is purged from the repository history and .env goes into .gitignore. Had the export shown a stranger's refund, the next step would be an email to support@mulenpay.com with the transaction number.

How to tell the key leaked

  • The key showed up in a repository, a chat or a screenshot.
  • Operations appeared that none of your services created.
  • Notifications arrive at an address you never configured.

How to avoid a repeat

  • Keep keys in environment variables, not in code or version-controlled configs.
  • Reissue keys when an employee with access leaves.

Integration details: the payment API page. How to store keys so this does not happen is covered separately.

Payment APISee how this works at MulenPay

More questions on this topic

Still have questions?

Write to us — we will answer and help you start accepting payments.

Let’s talk about your project

Setup, pricing or support — choose the way you prefer to get in touch.

Write to the team

Your name and one contact are enough. Add details if you wish.

How should we contact you?

By clicking the button you agree to the processing of personal data.

TelegramTelegram