# `MishkaPay.Ash.Inbox.Process`
[🔗](https://github.com/mishka-group/mishka_pay/blob/v0.0.1/lib/mishka_pay/ash/__inbox/process.ex#L6)

Works one inbox event: fires `mishka_pay:event:process` with it before the action's
transaction starts, since the listeners may call the provider, and marks it processed when
every listener took it. Otherwise it keeps the reason in `:last_error` and the action fails, so
its AshOban job tries again.

Each try is a span, `[:mishka_pay, :inbox, :process, :start | :stop]`, with the event's
`:provider`, `:tenant`, `:type` and `:event_id`; `:stop` adds the `:outcome` (`:processed` or
`:retry`) and the measurement `:lag`, the milliseconds since the event was stored.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
