Webhooks

Use our webhooks to be notified if something changes in e-guma.

Our webhooks try to call the endpoint you provide 3 times until we get a response with the HttpStatusCode being in the Successful range (200-299).

To set up a webhook, please send your webhook URL, webhook information and account to [email protected].

Request headers

Every webhook request is sent as an HTTP POST with a JSON body and contains the following headers:

HeaderDescription
Content-TypeAlways application/json
X-Eguma-Webhook-TopicThe event that triggered the webhook, e.g. voucher_order.created (see Topics)
X-Eguma-Idempotency-KeyA unique key (GUID) identifying this delivery. All retries of the same delivery carry the same key.

Topics

The X-Eguma-Webhook-Topic header follows the scheme entity.event and can have one of the following values:

TopicSent whenDetails
voucher.redeemedA voucher is redeemedRedeem Webhook
voucher_order.createdA voucher order is createdVoucher order created Webhook
voucher_type.createdA voucher type is createdVoucher type created Webhook
voucher_type.updatedA voucher type is updatedVoucher type updated Webhook
voucher_type.deletedA voucher type is deletedVoucher type deleted Webhook
ticket_order.createdA ticket order is createdTicket order created Webhook
newsletter.opt_in_confirmedA newsletter double opt-in is confirmedNewsletter Double Opt-In Webhook

Handling duplicates (idempotency)

A webhook may reach your endpoint more than once — for example when your endpoint responds with a non-successful status code and we retry, or when a failed delivery is re-sent manually by our support team. All of these repetitions carry the same X-Eguma-Idempotency-Key.

To process each event exactly once, store the idempotency keys you have already processed and ignore any request whose key you have seen before. Requests with a key you have not seen yet are always new events and must be processed.

Responding to a webhook

Respond with an HTTP status code in the range 200-299 as quickly as possible — ideally acknowledge first and do any heavy processing asynchronously. Any other status code (or a timeout) counts as a failed attempt and triggers a retry, up to 3 attempts in total.