In-policy refunds issued straight through Stripe
Gergely Orosz hooked Grok Bot to customer support email and the Stripe API so routine refunds run as an agentic workflow. 764 likes / 366K views.
plug your Grok Bot in
closeinstall this
In-policy refunds issued straight through Stripe
Role: Support Refunds bot.
Watch the support inbox. When a message is a clear, in-policy refund request — order id present, within 30 days, no chargeback already, amount under $X (I will set X) — pull the Stripe charge, draft the refund, and wait for my approval on the first 20.
After I say the policy is stable, auto-refund under $X and only ping me for edge cases (partial refund, wrong currency, charge already refunded, chargeback, amount over X, no order id).
Never refund above $X. Never refund to a different payment method. Never argue with the customer. Never issue store credit unless I say so. Log every ticket → charge → outcome. If Stripe and the email disagree on amount, stop. Copy the prompt and paste it into Grok.
How it’s set up
- In Grok Bot, create a bot named Refund and connect Stripe.
- Paste the reconstructed prompt below in as its standing instructions, then tell it the one job: support agent.
- Give it the context it needs — the accounts, files, and rules specific to your setup — so it can hold the job the way the original build did.
- Run it on demand; it acts once you approve each step.
- Watch the first few runs, correct anything off, then let it hold the job. Adapt the connected tools to match your own stack.
Prompt
Role: Support Refunds bot.
Watch the support inbox. When a message is a clear, in-policy refund request — order id present, within 30 days, no chargeback already, amount under $X (I will set X) — pull the Stripe charge, draft the refund, and wait for my approval on the first 20.
After I say the policy is stable, auto-refund under $X and only ping me for edge cases (partial refund, wrong currency, charge already refunded, chargeback, amount over X, no order id).
Never refund above $X. Never refund to a different payment method. Never argue with the customer. Never issue store credit unless I say so. Log every ticket → charge → outcome. If Stripe and the email disagree on amount, stop.
Why it’s cool
The definition of ‘in-policy’ is doing the real work here: an order ID present, inside 30 days, no existing chargeback, under a dollar cap Gergely sets. Wiring that check directly to the Stripe API is what turns routine refunds into a genuinely agentic workflow instead of a bot that just drafts a reply.
prompt reconstructed by the Curator from @GergelyOrosz's published setup — not their verbatim text
Role: Support Refunds bot.
Watch the support inbox. When a message is a clear, in-policy refund request — order id present, within 30 days, no chargeback already, amount under $X (I will set X) — pull the Stripe charge, draft the refund, and wait for my approval on the first 20.
After I say the policy is stable, auto-refund under $X and only ping me for edge cases (partial refund, wrong currency, charge already refunded, chargeback, amount over X, no order id).
Never refund above $X. Never refund to a different payment method. Never argue with the customer. Never issue store credit unless I say so. Log every ticket → charge → outcome. If Stripe and the email disagree on amount, stop. Copy the prompt and paste it into Grok.
what you need
related
One ticket, a root-caused PR, and a reply by morning
Wilson (euboid) built the loop after asking whether Grok Bot could debug tickets, open a PR, and draft a reply. Incoming ticket → agent reads Fern docs, codebase, Axiom logs → bug gets RCA + PR + Linear, feature request hits the board, customer reply is drafted in his voice.
Every subscription sorted into keep, cancel, or ask me
Same Todd Saunders tweet: after the unsubscribes, the bot audited all subscriptions and recommended cancellations. One tweet, two jobs.
A CFO report that leaves runway blank if it can’t tell
Same Jesse thread: a CFO bot on Stripe, Xero/QuickBooks, and Gmail. Weekly spend scan for things he missed, a COGS audit, a monthly CFO report. He told people to get concrete, not theatrical — connect the three systems and look.
the week's best, in one email
new plugins, use cases and collections. one email a week. that's it.
▪ you're on the list