Inspiration

Every online merchant eventually gets a chargeback. When a customer disputes a payment, the merchant has a strict deadline to respond, and the evidence needed is scattered across four systems: payments, e-commerce, logistics and customer support. Analysts jump between dashboards, collect records, judge whether the case is winnable, write a response and submit it before time runs out.

This matters at scale. Mastercard-sponsored research projected global fraudulent chargeback losses of $15 billion in 2025, and Stripe's analysis of one million disputes found that the specificity and relevance of evidence materially affect outcomes. Late or weak responses mean lost disputes, higher fees and even account restrictions. We wanted to remove the data-gathering chore so people can focus on the decision.

What it does

ResolveAI is an agent that investigates a chargeback end to end and hands a human reviewer a ready decision.

  1. Intake: a chargeback arrives by webhook with a transaction ID, amount, customer and reason code.
  2. Plan: the agent reads the reason code (e.g. product not received vs unauthorized transaction) and decides which evidence it needs and which systems to query.
  3. Act: it pulls structured evidence from the payment, e-commerce and logistics systems.
  4. Evaluate: it compares the customer's claim with the evidence, flags contradictions and assigns an evidence strength score.
  5. Draft: it writes a structured rebuttal and recommends Challenge or Accept.
  6. Human approval: the reviewer sees the reasoning, evidence and recommendation on a dashboard and clicks Approve, Reject or More info. Nothing is submitted without this step.
  7. Submit and audit: the response goes to the (mock) payment processor, and the full agent trace and reviewer action are logged. A downloadable PDF evidence packet is generated.

Target users: online merchants handling hundreds or thousands of disputes a day, and their dispute and finance analysts. The same approach could extend to customer-support teams, e-commerce platforms offering it as a plugin for small sellers, and card issuers verifying claims.

How we built it

We used LangGraph to orchestrate the workflow as a state machine, because chargeback handling naturally moves through states: Plan → Fetch → Evaluate → Decision. Each node has one job:

  • Dispute Orchestrator (Planner): understands the reason code and builds the investigation plan
  • Evidence Collector (Executor): calls the mock APIs and gathers JSON evidence
  • Evidence Analyst (Evaluator): checks the claim against the evidence and scores strength
  • Response Generator: compiles the packet and drafts the recommendation
  • Human-in-the-loop checkpoint, then Final Submission and Audit

The backend is FastAPI, which also hosts the mock payment, e-commerce and logistics systems. The reviewer dashboard shows the live agent graph, evidence, contradictions, a response editor, the approval checkpoint, submission status and an audit trail. The LLM is OpenAI GPT-4o-mini via LangChain, and cases and logs are stored in SQLite. Evidence packets are generated as PDFs.

We tested with synthetic data across different dispute scenarios to confirm the agent changes its plan and decision depending on the reason code and the strength of the evidence.

Challenges we ran into

  • Contradictory evidence: the hardest part was getting the agent to weigh a customer's claim of non-receipt against a logistics system showing confirmed delivery, instead of just summarizing text.
  • Hallucination risk: an LLM might invent a delivery timestamp that doesn't exist. We restrict the agent to data returned by the APIs (strict grounding).
  • Over-sharing: pulling in sensitive or irrelevant customer history weakens a case and raises privacy concerns, so we include only evidence relevant to the reason code.
  • Alert fatigue: reviewers may approve blindly, so the dashboard shows the reasoning and confidence, and every decision is logged.

What we learned

  • Agentic workflows work best as explicit states with clear hand-offs, not one big prompt.
  • Evidence relevance matters more than evidence volume.
  • Keeping a human in the loop for any financial action builds trust and limits the damage of AI mistakes.
  • Realistic synthetic data across several systems is essential for testing an agent's reasoning.

Impact

By our estimate, an analyst spends about 20 minutes per dispute switching between payment, e-commerce and logistics dashboards, while the agent gathers and evaluates the same evidence in about 2 minutes, roughly a 90% reduction in evidence-gathering time. This is an estimate from the agent's three API calls plus evaluation, not a measured study. The result is fewer missed deadlines, stronger evidence matched to each reason code, and less operational workload.

What's next

Replace the mock APIs with real Stripe and Shopify integrations and secure credentials, move from SQLite to PostgreSQL for persistent audit logs, and scale with async workers and a production frontend.

Scope note: this is a proof of concept on mock and synthetic data. It does not touch real banking data or process real transactions.

Built With

Share this project:

Updates

Submission history