Blog · 2026-11-05
How an AI agent handles a Stripe dispute, and asks you before it answers
A Stripe dispute, start to finish. The agent gathers the order and delivery proof, drafts the reply, and asks you in Slack before sending it.
When a customer disputes a payment, Stripe gives you a few days to prove the sale was genuine. The proof is usually there, but it's spread across your order system, your shipping carrier and your emails, and gathering it by hand takes half an hour you rarely have. Miss the deadline and you lose the money, plus a fee.
This post follows one dispute from the moment it's opened to the moment the evidence reaches Stripe. A LoopEngine agent does the gathering and the writing. You make one decision, in Slack, with one click.
The whole flow at a glance
- StripeA dispute is openedStripe tells LoopEngine straight away.
- LoopEngineChecks and startsMakes sure the message is really from Stripe, then starts the job.
- AgentReads the disputeThe amount, the reason and the deadline.
- AgentFinds the proofThe order, and when and where it was delivered.
- AgentDrafts the evidenceWritten the way the bank needs it.
- You, in SlackApprove, edit or denyThe only step that needs you.
- StripeGets the evidenceSent only after you approve.
Steps 1 to 5 happen on their own, usually within a minute. Step 6 waits for you.
What a dispute is, and why it's work
A dispute (also called a chargeback) is when a customer asks their bank to reverse a card payment, for example because they say the parcel never arrived. Stripe tells you, takes the money back for now, and asks for evidence. To win, you usually need:
- What they bought: the order, its items and its total.
- That it was delivered: the carrier, the tracking number and the delivery date.
- That the customer is who they say: a delivery address matching the billing address, and any messages from them.
- A short, clear explanation for the bank.
None of it is hard. It's just slow, and it always arrives when you're busy. Here's who does each part, by hand and with an agent:
| Task | By hand | With a LoopEngine agent |
|---|---|---|
| Notice the dispute | You, when you see Stripe's email | The agent, the moment Stripe sends it |
| Find the order | You, in your order system | The agent |
| Find the delivery proof | You, on the carrier's site | The agent |
| Write the evidence | You | The agent drafts it |
| Decide to submit | You | You, with one click in Slack |
Set up once
You do this once. After that it runs on its own.
- Give the agent access to Stripe and to your orders. Connect Stripe on the Apps page, and the tool your store uses for orders and shipping. Reading information is allowed. Submitting evidence is set to Ask me, so the agent can never send anything to Stripe without you.
- Describe the job in plain words. For example: "When a Stripe dispute comes in, look up the order and its delivery, write the evidence, and ask me before submitting it." LoopEngine turns this into a workflow called Handle dispute, with the steps written out for the agent to follow.
- Choose where it asks you. Connect Slack on the agent's Messaging tab and pick a channel, such as #payments.
- Tell Stripe where to send new disputes. On the workflow, choose Webhooks, then Add a webhook. Pick Stripe, and choose to run only for new disputes. LoopEngine gives you a private web address. Paste it into Stripe's webhook settings, and paste the signing secret Stripe shows back into LoopEngine. Tick "send each result to you" if you'd like a short note in Slack when each dispute is done.
Once it's set up, this is how the pieces talk to each other:
That last setup step is what removes the middleman. Stripe can notify a web address the moment something happens (developers call this a webhook), so the agent hears about a dispute straight from Stripe. No other system needs to pass the message along.
When a dispute arrives
Here is what happens, in order, from the moment a customer opens a dispute.
- Stripe tells LoopEngine (within a second). Stripe sends the new dispute to your private address. LoopEngine checks Stripe's signature, so a fake message from anyone else is turned away. It picks out the dispute's ID, starts the Handle dispute workflow, and tells Stripe it got the message. If Stripe sends the same notice twice, which it sometimes does, the second copy is ignored.
- The agent reads the dispute. For example: $84, reason "product not received", evidence due in seven days.
- The agent finds the order and its delivery. It looks up order EM20-8884909: one item, delivered to the same address the card is billed to, carrier UPS, tracking number 1Z…, delivered on 2 November and signed for.
- The agent drafts the evidence. It writes what was bought, the delivery details and a short explanation for the bank, in the format Stripe asks for.
- The agent stops and asks you. Submitting the evidence is set to Ask me, so instead of sending it, the agent posts a request in Slack and waits.
What you see in Slack
A message like this appears in your #payments channel:
Handle dispute would like to submit evidence for dispute dp_9 ($84, "product not received"):
Order EM20-8884909, one item, delivered by UPS on 2 November to the billing address, signed for (tracking 1Z…). The customer was emailed the tracking link on 30 October.
Approve · Edit · Deny
You have three choices:
The agent waits for your answer, for minutes or for days. Nothing is lost if the server restarts in between. Just answer before Stripe's deadline.
Why it's safe to leave running
- It never submits on its own. Submitting evidence always waits for a person. The agent gathers and writes; you decide.
- Only Stripe can start it. Messages without Stripe's signature are turned away, and the address itself is private.
- One dispute, one run. Repeat notices from Stripe don't start a second run.
- It says when it can't find something. If the order or the tracking isn't there, it tells you in Slack rather than guessing.
- Every run is recorded. On the workflow you can see each dispute it handled, when, and what was sent.
What you need first
Two things make this work well:
- A way to find the order from the payment. Stripe knows the payment, not your order. Many stores put the order number on the payment at checkout, which lets the agent go straight to the right order. Without it, the agent can match on the customer's email address, which works most of the time.
- Delivery details somewhere the agent can read them, such as your order system or your shipping tool.
Try it
Start free, open the agent that handles payments (or create one), choose Build a workflow on its Workflows tab, and write the job in a sentence or two:
When a Stripe dispute comes in, look up the order and its delivery, write the evidence for Stripe, and ask me in Slack before submitting it.
LoopEngine shows you the plan before it creates anything: each step, what it may do on its own, and where it will ask you. Read more about workflows and how approvals work.