Sumup.WebhookEvent (Sumup v1.0.0)

Copy Markdown View Source

A decoded SumUp webhook payload.

SumUp's online-payments webhooks only cover one thing today: a checkout status change. The wire payload is intentionally minimal:

{"event_type": "CHECKOUT_STATUS_CHANGED", "id": "checkout_id"}

SumUp's docs say new event types may be introduced without notice and recommend silently ignoring ones you don't recognize — so event_type decodes to :unknown rather than raising when SumUp sends something this library predates.

Summary

Types

event_type()

@type event_type() :: :checkout_status_changed | :unknown

t()

@type t() :: %Sumup.WebhookEvent{event_type: event_type(), id: String.t(), raw: map()}