Foundation · 2 min
What you need to know
What is a payment webhook?
A payment webhook is a message the provider sends to the store’s system when an event occurs, such as a payment completing. The receiving system must verify that the message is authentic before using it to change an order.
Why do payment gateways use webhooks?
Some outcomes happen after checkout has submitted the request or after the shopper leaves. Webhooks let the store receive those changes. They complement an order record and status checks rather than removing the need to reconcile exceptions.
What happens if a payment webhook arrives late?
The order may remain pending until the update is processed. When it arrives, use the current verified payment and order state. An older delayed event must not reverse a newer valid status or cause stock and emails to be processed again.
What happens if the same webhook arrives twice?
The same event can be delivered more than once. Record that its intended action has already been completed and avoid repeating the charge, stock deduction or fulfilment. A second message about the same payment does not mean a second purchase.
What happens if a webhook is missed?
Investigate delivery logs, confirm the provider’s current transaction state and recover the missing update through a supported replay or reconciliation process. Keep an alert for paid transactions without matching orders so recovery does not depend solely on customer complaints.
How should failed webhooks be retried?
Use the provider’s documented delivery retry or replay mechanism after fixing the receiving problem. Replaying an event is different from retrying a payment. Confirm that repeated delivery cannot repeat the business action.
Foundation · 2 min
Frequently asked questions
How do I prevent duplicate processing of payment events?
Track provider event identifiers and also protect the underlying order or payment action against repeats. Different events can concern the same payment. The integration needs a durable record of what was completed so a system restart does not lose that protection.
What is idempotency in ecommerce payments?
Idempotency means repeating the same intended operation has the same effect as doing it once. In payments, a supported idempotency key can identify a retried request. The store still needs separate safeguards for order creation, event processing and fulfilment.