# `MishkaPay.Ash.Payment.Refund`
[🔗](https://github.com/mishka-group/mishka_pay/blob/v0.0.1/lib/mishka_pay/ash/__payment/refund.ex#L6)

The `:refund` action of the `:payment` kind (`MishkaPay.Ash.Resource`): refunds the stored
payment through its
provider before the transaction starts (as often as the tenant allows, see
`MishkaPay.Refund`), reads the payment again and writes it, keeps the
`MishkaPay.Refund` in the record's `:refund` metadata, and fires `mishka_pay:payment:changed`.
When the payment cannot be read again, the row counts the refund itself (never past the
payment's amount), and the announcement waits for the next sync.

---

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