---
title: "Refund on a dispute alert before it · Agent Wranglers"
url: https://agentwranglers.se/playbook/payments/refunds-disputes-and-fraud/dispute-alerts
updated: 2026-10-20
licence: "All rights reserved"
---

# Refund on a dispute alert before it becomes a chargeback

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Recommended
- Chapter: [Refunds, disputes and fraud](https://agentwranglers.se/playbook/payments/refunds-disputes-and-fraud)
- Rule: Subscribe to the card networks' pre-dispute alerts through your provider, and refund or settle each alert automatically within its deadline.
- How: Services such as Visa's Rapid Dispute Resolution (RDR), Verifi Order Insight and Mastercard's Ethoca alerts tell you when a cardholder complains to their bank. Refunding then stops the chargeback and its fee. Non-fraud Visa disputes settled through RDR also stay out of the dispute count in the monitoring ratio. Set rules for which alerts refund on their own, such as any amount under 500 SEK. Mark the order refunded through the same function as any refund, so the ledger stays right.
- Check: Send a test alert from the provider's sandbox for a paid order. The order is refunded once, a ledger row appears, and no chargeback follows.

Example:

```js
const AUTO_REFUND_LIMIT_MINOR = 50000

async function onDisputeAlert(alert) {
  const order = await orders.findByPaymentId(alert.paymentId)
  if (!order || alert.amountMinor > AUTO_REFUND_LIMIT_MINOR) return createReviewTask(alert)
  await refund(order, alert.amountMinor, 'dispute_alert', 'system')
}
```

```python
AUTO_REFUND_LIMIT_MINOR = 50_000

def on_dispute_alert(alert) -> None:
    order = orders.find_by_payment_id(alert.payment_id)
    if order is None or alert.amount_minor > AUTO_REFUND_LIMIT_MINOR:
        return create_review_task(alert)
    refund(order, alert.amount_minor, reason="dispute_alert", staff_id="system")
```

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers payments playbook: https://agentwranglers.se/playbook/payments/refunds-disputes-and-fraud/dispute-alerts`.

- Previous: [Answer every dispute before its deadline](https://agentwranglers.se/playbook/payments/refunds-disputes-and-fraud/dispute-evidence)
- Next: [Keep your dispute ratio well below the network limits](https://agentwranglers.se/playbook/payments/refunds-disputes-and-fraud/dispute-ratio)
- [Refunds, disputes and fraud](https://agentwranglers.se/playbook/payments/refunds-disputes-and-fraud)
