Skip to content
All questionsSecurity

Why are payment notifications signed?

The address that receives payment notifications is available to anyone who knows it. Without an authenticity check the store would trust an outside request too — so the notification is signed with the secret key, and the handler on the store side must verify that signature.

What happens without verification

  • Anyone who knows the handler address and an order id can post a "successful payment" to it.
  • The store marks the order paid and ships the goods, while no money arrives.
  • The discrepancy surfaces only when reconciling with the Payouts section — that is, late.

How the signature is verified

  • The secret key is known only to you and the service — it is never sent in API requests.
  • A signature is computed from the notification data and the key and sent along with the notification.
  • The handler computes it too and compares: on mismatch the request is rejected with 401.

How it is arranged at MulenPay

MulenPay webhooks are signed with the store's secret key from the dashboard; REST API requests use a separate API key, and the secret key is never sent with them. The algorithm and field order are documented at docs.mulenpay.com; how the ready-made modules handle it is described in each platform's guide — for Drupal and MODX you add the signature check yourself. If you write the handler yourself:

  1. Read the request body as is, before parsing the JSON: the signature covers the raw bytes.
  2. Compute the checksum with the documented algorithm and your secret key.
  3. Compare it with the signature from the notification using a constant-time function.
  4. Only after a match touch the order; on a mismatch answer 401 and log it.

Example: a competitor finds the handler address in the checkout page source and posts "order 2210 paid". The handler computes the signature with the real key, gets a different value, answers 401 and logs the attempt; the order stays unpaid and nothing is shipped.

What to check in your code

  • The signature is verified before anything is done with the order, not after.
  • Comparison uses a timing-safe function rather than plain string equality.
  • A failed request is rejected rather than silently ignored — otherwise nobody notices the problem.
  • The amount and order number are checked against your database: the signature proves the sender, not the order.

Integration details are on the payment API page. What to do if the secret key leaks 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