✦ 68 · solid

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.

verified 2026-08-21 ~30 min setup support scouted on x
install in grok bot

How it’s set up

  1. In Grok Bot, create a bot named Refund and connect Stripe.
  2. Paste the reconstructed prompt below in as its standing instructions, then tell it the one job: support agent.
  3. 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.
  4. Run it on demand; it acts once you approve each step.
  5. 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

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.
then paste it into Grok

Copy the prompt and paste it into Grok.

what you need

Reconstructed from @GergelyOrosz's published Grok Bot build. Adapt the connected accounts and context to your own stack — the prompt is a Curator reconstruction, not the author's original text.
by @GergelyOrosz

related

✦ 71 · solid

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.

via @euboid · 𝕏

the week's best, in one email

new plugins, use cases and collections. one email a week. that's it.

one email a week. what we do with it.