Skip to content
be-human.ai
← Back to the journal

Tools & integrations

Stripe Permissions for AI Agents: Who Can Refund or Void

Give AI agents Stripe access that proposes refunds, voids and payment links, while people approve every money movement. Limits you can enforce today.

Be Human typographic cover with the title: Stripe Permissions for AI Agents: Who Can Refund or Void
Conceptual illustration created with AI · Be Human

An AI agent should be able to propose most Stripe payment actions and execute only a narrow set of them. For refunds, voids and payment links, that means a restricted Stripe key scoped to the resources the agent needs, a tool layer that enforces amount and customer limits, and a named human approval before any action that moves money or ends an invoice. The rules sit in the tool, so they hold even when a prompt is wrong.

Key takeaways

  • Separate propose from execute. The agent may create a proposal for a refund, void or payment link, but a named person approves before money moves.
  • Use restricted Stripe keys with the narrowest permissions per resource. Never give an agent your secret key.
  • Enforce amount ceilings, customer matching and idempotency keys in code that wraps the Stripe calls.
  • Allow payment links only from templates your team approved, and treat deactivation as the safer action.
  • Log every proposal, approval, Stripe request and outcome so you can reconstruct who decided what.

Why refunds and voids need a different rule than reads

Reading a charge, listing open invoices or drafting a message about a failed payment carries little risk. A refund returns money to a customer. A void closes an invoice that may already have been sent, and that record matters to whoever keeps your books. Both actions change financial state, so they belong in a different category from reads and drafts.

The common problem is that teams give an agent one broad key because it is faster to set up. Once the agent can refund, every misunderstanding in a customer conversation becomes a possible payment error. A better prompt does not fix this. What fixes it is deciding, for each Stripe action, whether the agent may read it, propose it, execute it after approval, or never touch it, and then making the tool enforce that decision.

Decide each Stripe action before you configure anything

Write the list before you open the Stripe Dashboard. Four labels are enough:

  • Read: charges, payment intents, customers, invoices and refund history, limited to what the current conversation needs.
  • Propose: a refund for one specific charge, a void for one specific open invoice, or a new payment link chosen from an approved template. The agent creates a proposal record with the evidence it used.
  • Execute after named approval: the refund or void that a named approver accepted, carried out by the tool and not by the model.
  • Never: changing bank or payout details, deleting customers, editing tax settings, or issuing any refund that has no proposal record behind it.

Refunds and voids belong on the approval line, not the read line. Nothing on this list gives the agent an unattended path to money movement. If a case does not fit a label, the default is to propose it to a person.

Create a restricted key for each agent role

Stripe supports restricted API keys, where you choose access per resource, such as read on charges and invoices, and write only on the resources a role truly needs. Create one key for the reading role. If an execution service must issue approved refunds, give that service its own key with write access limited to refunds, and keep it out of the agent's runtime. The proposing component should hold no write permission at all, so a flaw in its instructions cannot reach a write endpoint.

Store keys in a secrets manager, rotate them on a schedule, and record which agent identity uses which key. A named identity for each agent makes the audit trail readable, and the approach is covered in AI agent service accounts and named identities. Stripe sends webhook events when a payment or refund changes state. Verify the signature on each event before the agent trusts it, as described in Stripe's webhook documentation. The general principle is the one in OWASP's authorization guidance: check every request against the rights of the requester on the server side, rather than trusting what the caller says about itself.

Enforce limits in the tool, not in the prompt

The tool wrapper around Stripe is where limits become real. Each check should reject the request before it reaches Stripe:

  • The refund amount must not exceed a ceiling your finance lead chose and wrote down.
  • The charge must belong to the customer attached to the conversation or the proposal.
  • The refund or void must cite a reason from a fixed list, not free text.
  • Only one open proposal may exist per charge or invoice.
  • A void is rejected if the invoice is already paid or already voided.
  • Every execution carries an idempotency key derived from the approved proposal, so a retry after a timeout cannot refund twice.

The idempotency point deserves care. Stripe documents idempotent requests so that a repeated call with the same key returns the original result. Your wrapper should generate the key from the proposal identifier and store it with the proposal. The same pattern is discussed in idempotency for AI agent actions.

A limit that lives only in the instructions is a suggestion. A limit that lives in the tool is a rule.

Payment links: approve templates, allow deactivation

A payment link can carry a price and be opened by anyone who has the URL, so it deserves its own rule. The agent should choose only from templates your team created and approved, with fixed amounts and fixed descriptions. Custom amounts, new products and new templates are human tasks. The tool should refuse any link that does not match a template.

Deactivating a payment link is a lower-risk action, because a new link can be created from an approved template if the business still needs one. That makes deactivation a reasonable action for the agent to take after a defined trigger, such as a customer report that a link was shared by mistake. The broader permission model for payment tools, including why creating links is safer than charging, is explained in AI agent payment tool permissions.

Illustrative scenario: a duplicate charge reported in support

The following scenario is illustrative and does not describe a specific company.

  • A customer writes that a second charge appeared on their card for the same order.
  • The agent reads the customer's charges and finds two charges with the same amount on the same day.
  • It creates a refund proposal for one of them, with the charge identifier, the reason "duplicate charge" and the two charge records it compared.
  • The proposal appears in the approval channel for the finance lead, who checks the records.
  • The finance lead approves. The tool confirms the amount is under the ceiling and the charge matches the customer, then issues the refund with an idempotency key tied to the proposal.
  • The tool writes the refund identifier and the approver's name to the log. The agent tells the customer the status from the confirmed webhook event, not from its own guess.

If the finance lead rejects the proposal, the agent tells the customer that the request is under review and does not try again. The rejection and its reason are logged, so the next proposal for a similar case can be judged against it.

Review logs and keep the rules current

The NIST AI Risk Management Framework treats governance as an ongoing activity: map the risks, measure how the system behaves, and manage the results with clear owners. For payments, that means reviewing the logs on a regular schedule, looking at rejected proposals to see whether the rules are too strict or too loose, and revisiting the Stripe permissions whenever a new team member, product or integration appears. Each log entry should show the proposal, the reading that supported it, the approver, the Stripe request identifier and the final outcome.

Be Human designs and operates this kind of layer for companies. In a first engagement, the team defines the one role the agent will play, the Stripe resources it can read, the proposals it can create, the people who approve them and the observable success criterion. It then implements the restricted keys and the tool-side checks. Managed operations cover monitoring, permission review after each change, and incident response if a proposal or execution behaves in an unexpected way. If you are not sure which payment task should be the first one handed to an agent, the free Be Human AI diagnostic will help you find it.

Frequently asked questions

Should an AI agent be allowed to issue refunds directly? In most businesses, no. A safer pattern is to let the agent read the charge, explain the case and create a refund proposal with evidence, then let a named person approve it. The tool executes only after that approval and enforces the amount and customer checks.

Can an agent void an invoice in Stripe? It can propose a void for one specific open invoice, but the void should wait for a named approver. Voiding is a change to a financial record, so the tool should reject voids on invoices that are already paid or already voided, and every void should carry a reason and an audit entry.

Is a restricted key enough, or do I need a separate Stripe account for the agent? For many setups, restricted keys with resource-level permissions are enough, provided the proposing component holds no write permission and the execution service has its own key. Separate accounts add isolation but also add cost and maintenance, so decide based on how sensitive the payment flow is and who needs to see the results.

What should happen when a refund request fails or times out? The agent should not retry blindly. The execution service should reuse the same idempotency key, check the status through Stripe, and rely on verified webhook events to confirm the outcome. The agent then reports the confirmed status to the approver and the customer, and the attempt is recorded in the log.

Your next step

See where an AI agent fits in your company first.

Take the free Be Human AI diagnostic. A few questions about your work show which task to hand to an agent first, what it needs to know and where a person approves.

Be Human editorial guidance. Examples are illustrative unless explicitly attributed. Sources provide background; implementation choices depend on your workflow.

Less busywork. More room for you.

Bring us the work you wish you had time for.

Book a call to try a personalized AI agent free for 7 days ↗Or take the free AI diagnostic →