Since a webhook may be delivered multiple times due to retries, your webhook handler should be idempotent (processing the same event multiple times should not cause duplicate effects). Here’s how to implement idempotency:
Use the unique webhook id field for deduplication
Before processing a webhook, check if you’ve already processed that ID
If the ID has been processed, return a 200 response without further processing