One action per event
Key the action to the webhook’s event id. A redelivery is the same action:status: "duplicate" and the original receipt. The customer gets one email.
Tool names depend on how your workspace connects to your email provider. Run
invoke gateway tools to see the tools your workspace has.Check state before acting on an old event
Apayment.succeeded event can arrive after the payment was refunded. Before acting, confirm the state the event describes is still true:
"status": "replan_required". Don’t send the confirmation.
Next steps
- TypeScript SDK: how idempotency keys work
- POST /state/verify: the full API reference