# Refund it

[Cancel or refund a payment](https://devportal.qa.winkpg.io/docs/decide/cancel-or-refund-a-payment.md): Whether undoing a payment is a void, a reversal, or a refund, and what each one does to the money and to your records.

The money already moved, so the undo is a credit: a new transaction that sends the amount back.

**Your answers so far**

- How did the customer pay? By card.
- Has the payment settled? Yes. Its batch closed and the funds moved.

**What to build**

Send a Refund on the operations endpoint, for the full amount or for part of it. The response carries a second transaction id, for the Return transaction the refund creates. Read that transaction to learn whether the credit was approved, and watch its settlement to learn when the money left.

**Worth knowing**

- A refund isn't instant and can be declined. Treating the operation response as proof the customer has their money back is the most common reconciliation bug on this path.
- Send an explicit amount on every refund after the first. An omitted amount asks for the original total, not what's left of it, and is refused.
- An empty allowed-actions list on a settled payment usually means the merchant has refunds turned off, not that the payment is in the wrong state.
- Send an idempotency key, so a refund retried after a timeout returns the first refund rather than issuing a second.

**Where to go next**

- [Refund or void a payment](https://devportal.qa.winkpg.io/docs/blueprints/refund-or-void-a-payment.md)
- [Refunds, voids, and reversals](https://devportal.qa.winkpg.io/docs/guides/refunds-voids-and-reversals.md)
- [Transaction lifecycle and settlement](https://devportal.qa.winkpg.io/docs/guides/transaction-lifecycle-and-settlement.md)

- [Start over](https://devportal.qa.winkpg.io/docs/decide/cancel-or-refund-a-payment.md): go back to the first question.

## See also

- [All documentation](https://devportal.qa.winkpg.io/llms.txt): the machine-readable index of every public page on this site.
