Disputes
What happens when a payer disputes a PIX at their bank: the amount is held, and the bank decides.
A dispute starts outside the platform: the payer tells their bank that a PIX was a fraud or a mistake, and the bank holds the amount while it decides. In PIX this is the Special Return Mechanism (MED). You do not ask for a dispute and cannot stop one: the platform learns of it from the bank, and tells you.
What a dispute does
- The charge becomes
disputed, and thecharge.dispute.createdevent is sent. - The amount leaves your balance at once, even if you already withdrew it. In that case the balance becomes negative, and the next sales cover it.
- The fee follows the rule of refunds. By default the platform holds back the fee of the charge together with what the charge left in your balance. In an account set to leave the fee with the platform, the full amount comes out of your balance.
- A
disputedcharge cannot be refunded. The answer is409with thecharge_disputedcode: the bank decides where the amount goes.
How it ends
The bank decides, and the charge.dispute.closed event is sent either way. Read the charge to see the outcome.
| Outcome | The charge becomes | What happens to the amount |
|---|---|---|
| The bank refuses the dispute | paid again | It goes back to your balance |
| The bank accepts the dispute | refunded. Final | The bank sends it back to the payer. charge.refunded is sent as well |
- A charge that is
paidagain can be refunded, and can be disputed again. - There is no
charge.paidevent when a dispute is refused: the payment happened once. - The platform does not send a defense to the bank in this version: the outcome is the one the bank gives.
Events
| Event | When | data.id |
|---|---|---|
charge.dispute.created | The bank is holding the amount, and the charge became disputed | The charge |
charge.dispute.closed | The bank decided, and the charge became paid or refunded | The charge |
charge.refunded | The charge became refunded, together with charge.dispute.closed, when the bank accepted the dispute | The charge |
A dispute is not an object of the API: it has no id and no route. The charge carries everything you need to act on.
In test mode
Three operations, available only with a test key, play the part of the banks. See Test mode.