Why is an unchecked payment event such a risk for you?
Without payment webhook verification, an endpoint that accepts any message is an open door. In fact, anyone who knows the address can claim that a refund was completed. As a result, a system that trusts the claim may mark a paid order as refunded. Then the record and the provider disagree, and nobody notices for weeks.
Honest providers cause a new kind of problem for payment webhook verification. For instance, messages arrive late, arrive twice or arrive out of order. Therefore, a system that treats each message as the first can put an old status over a new one. In short, payment webhook verification must cover both forged and messy traffic.
What does a forged refund event look like to you?
Indeed, it looks just like a real one, with the right fields and a likely amount. Only provider event verification tells the two apart. You must verify provider webhooks every time. For that reason, the webhook signature check must run before any other step.
How does a webhook signature check work on each event?
Each provider signs its messages with its own scheme, so you verify provider webhooks one by one. For example, some use a shared secret and a keyed hash of the body. Others use a public key and a signature sent in a header. However, the principle stays the same for all provider event signatures.
The receiver works out the value it expects from the raw body and its own secret. Then it takes the message only when the two values match, which is the core of a webhook signature check. This is how secure payment webhooks are built, and payment webhook verification follows the same logic everywhere. DaletPay works across 146 registered provider adapters, and each adapter declares its own scheme.
Why must the check use the raw body as it came?
Notably, a body that is read and built again may shift in its spacing or field order. In that case, provider event signatures would fail even for a real message. So DaletPay keeps the raw body until the webhook signature check is finished. Next, a bad signature marks the delivery as failed, returns a 400 response and changes no record.
The diagram shows both branches of payment webhook verification. First, a valid event is recorded and processed. In contrast, an invalid event stops at the check. The webhook event verification page describes how DaletPay applies this path.
How do you handle duplicate webhook events and late ones?
Typically, providers send a delivery again when they get no quick answer. Each retry carries the same event identifier as the first message, which helps payment webhook verification. Thus, a receiver that knows the identifier can report the event as replayed and skip the second change. This rule keeps duplicate webhook events from changing a record twice.
The rule also works with the keys that the platform sends with its own calls. Together, they make payment webhook verification safe in both directions. Still, duplicate webhook events are only part of the story, because late events need their own rule.
What should be done when an old event comes late?
Specifically, compare the event with the record's current state before you apply it. If the record already shows a later event, keep the older one on file. However, do not let it overwrite the newer state. Sandbox event testing should include one late event for this reason.
Which tests should each provider pass before it goes live?
Each provider needs its own tests. Its provider event signatures and timing are not the same as the rest. Run these checks before the provider sends live events. In practice, sandbox event testing takes about an hour per provider.
Afterwards, keep the results on the provider's capability card, next to the webhook endpoint setup notes. The provider capability checklist article shows how to record them. Also, repeat the sandbox event testing after any change to payment webhook verification.
What should you watch in the webhook delivery status later?
Read the webhook delivery status each day for the first week, as part of payment webhook verification. Look for failed deliveries, repeat tries and the same error text again and again. A run of failures often means a new secret or scheme, and secure payment webhooks need a fast fix. So fix the cause before events pile up and payment webhook verification falls behind.
Keep a short note for each webhook endpoint setup change. Also, record the date, the provider, the reason and the person who made the change. The note helps the team explain a gap later, and it keeps secure payment webhooks easy to audit. Moreover, it shows the check that each change got.
Who on the team should own the endpoint and alert?
Name one owner for the webhook endpoint setup, so you verify provider webhooks the same way each time. That owner reads the webhook delivery status, approves each change and gets the alert for repeated failures. Also, a short label with the provider and the environment shows which feed failed.
How do you recover from a bad delivery without guessing?
A bad delivery needs a clear path back, just as provider event verification needs a test plan. First, read the error text in the webhook delivery status. Second, check whether the event is real, using the provider's own dashboard. Third, ask the provider to resend a real event after the cause is fixed.
Above all, do not change the record by hand to match the expected outcome. Instead, write each recovery into the endpoint note, with the cause, the fix, the person and the date. A fix with no note is hard to explain when the same fault comes back. Practise these steps once a quarter, so the team keeps its webhook signature check sharp.