Keep an order pending after checkout creation. Store the Zahlo payment or checkout-session ID with your order. When a signed event arrives:
  1. Verify the signature and event ID.
  2. Retrieve the local payment if needed.
  3. Match payment ID, order ID, amount, and currency.
  4. Confirm the event represents a final successful state.
  5. Fulfill once and record the event ID.
Do not fulfill from a success URL, an unverified client callback, or an amount supplied by the browser. Make the fulfillment handler safe to retry.