swiftapplications

Agent approvals & safety

Stripe restricted keys for AI agents: what to allow, what never to allow

Create a Stripe restricted key (rk_) for an AI agent: which resources to make readable, which writes never to grant, and testing in test mode first.

Updated 8 October 2026 3 min read

The short answer

A Stripe restricted key (rk_live_… or rk_test_…) grants None, Read or Write per resource. For an agent, start with Read on the resources it needs to answer questions (charges, customers, disputes, invoices) and None everywhere else. Keep writes, especially payouts, transfers and anything that moves money, out of the agent’s key entirely.

Create one

In the Stripe Dashboard: Developers → API keys → Create restricted key. Name it after the agent and its purpose, then set each resource to None, Read or Write. Build and test with an rk_test_ key before creating the live one.

A read-only starting point

  • Read: Charges, Customers, Disputes, Invoices, Payment Intents, Refunds, Subscriptions, Products and Prices.
  • None: everything else, including Connect, Issuing, Payouts, Transfers and webhook endpoints.

What never goes in an agent’s key

  • Write access to Payouts, Transfers or balance movements.
  • Write access to webhook endpoints or API keys.
  • Your secret key (sk_live_…), for any reason.

If an agent needs to change something, route that change through an approval step held by a component with its own key.

The safe way to do this

The Human Queue for Stripe

Your agent proposes, you approve with Touch ID

In MoltenRock Connect, an agent can propose 34 kinds of Stripe change, from refunds to invoices. Nothing is sent until you approve the card.

See it working

Questions developers ask

What is a Stripe restricted key?

An API key, prefixed rk_, with per-resource permissions (None, Read or Write), so you grant only what a tool needs.

Can I give an AI agent a read-only Stripe key?

Yes. Create a restricted key with Read on the resources it needs and None on the rest.

How do I rotate a Stripe restricted key?

Create a new restricted key with the same permissions, switch the tool over, then roll or delete the old one in the Dashboard.