Best Practices

We recommend implementing these best practices when using webhooks.

Event types

Your webhook endpoints should be configured to receive only the types of events required by your integration. Listening for extra events (or all events) will put undue strain on your server and is not recommended.

Use Merchant console dashboard webhook configuration to config the event types to subscribe for a webhook endpoint

Delivery attempts and retries

Elements attempts to deliver your webhooks for up to 7 days with an exponential back off.

In test mode, Elements retries for 5 minutes.

Event handling

Handling webhook events correctly is crucial to making sure your integration’s business logic works as expected.

In complex scenarios we recommend to acknowledge the webhook with a 200 response then handle event content asynchronously.

Duplicate event handling

Webhook endpoints might receive the same event more than one time. We recommend you to make your event processing idempotent to be able to handle duplicate events received.