Nombaone. WebhookEvent
(Nomba One v0.1.0)
View Source
A verified, parsed webhook delivery.
Fields:
id— the delivery reference (nbo…whd), unique per attempt-target.type— the event type, e.g."invoice.paid". Pattern-match on it.event— aNombaone.WebhookEvent.Ref— the underlying domain event. Dedupe onevent.event.id(nbo…evt); delivery is at-least-once.data— the event payload, a map with the wire's camelCase string keys, passed through verbatim (its shape depends ontype).
Handling an event
case event.type do
"invoice.paid" -> unlock(event.data["reference"])
"invoice.action_required" -> email(event.data["checkoutLink"])
"invoice.payment_failed" -> note(event.data["reason"])
_ -> :ok
endThe type list is open — a type this SDK version does not know still parses.
See types/0 for the documented catalog.
Summary
Types
Functions
@spec types() :: [String.t()]
The documented webhook event types (32). The wire may emit others; those still parse.