# `MishkaPay.Ash.Dispute.Listener`
[🔗](https://github.com/mishka-group/mishka_pay/blob/v0.0.1/lib/mishka_pay/ash/__dispute/listener.ex#L6)

Makes a module the `mishka_pay:event:process` listener that syncs the dispute an event is
about (`charge.dispute.*` on Stripe) into a dispute resource (the `:dispute` kind of
`MishkaPay.Ash.Resource`):

    defmodule MyApp.Pay.DisputeSync do
      use MishkaPay.Ash.Dispute.Listener, resource: MyApp.Pay.Dispute
    end

`MishkaPay.Ash.Resource` makes one for each resource that listens (`listen? true`), as
`<Resource>.MishkaPayListener`; write one by hand with `listen? false`, such as to give it
another `:priority`. Supervise it like any plugin. An event about anything else is left
alone; a dispute the provider cannot give fails the event, so the inbox tries it again
later.

---

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