Back to Docs

Recipe: Chargeback / dispute auto-responder

Automatically detect incoming chargebacks and disputes, compile evidence packets, and submit responses via processor APIs before deadlines expire.


Ingredients

  • Meridian webhook listener (Stripe / PayPal / Adyen)
  • Order metadata store (Redis or Upstash KV)
  • Evidence template engine (HTML-to-PDF)
  • Processor dispute API client
  • Deadline scheduler (Temporal or BullMQ)

Flow

  1. Webhook receives charge.dispute.created event.
  2. Look up order by payment intent ID; pull IP, user agent, delivery receipt, license activation timestamps.
  3. Assemble evidence: screenshots, logs, terms acceptance timestamp, digital signature verification.
  4. Render evidence packet as PDF via headless browser or Puppeteer.
  5. Submit response through processor dispute API; store submission receipt and deadline for follow-up.
  6. If deadline approaches without resolution, escalate to manual review queue and notify via Discord webhook.

Guardrails

  • Never auto-accept liability without human review.
  • Rate-limit evidence generation to avoid CPU exhaustion.
  • Encrypt evidence packets at rest with AES-256-GCM.
  • Log every dispute action to immutable audit trail.

Next steps

Extend with machine-learning win-probability scoring using historical dispute outcomes. Wire into the license revoker recipe to auto-suspend keys on confirmed fraud.