Agent Wranglers

Refunds, disputes and fraud Recommended

Refund on a dispute alert before it becomes a chargeback

Subscribe to the card networks' pre-dispute alerts through your provider, and refund or settle each alert automatically within its deadline.

How to do it

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.

Example

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')
}
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")

How to 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.

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.