What is the Stripe agent API key migration deadline?
Stripe is retiring full-access secret keys and untagged restricted keys for Model Context Protocol (MCP) access on November 30, 2026. Starting in December, any AI agent that connects through Stripe MCP with an old-style key gets a 401 response with an OAuth discovery challenge instead of data. If you let an agent touch Stripe, this is the stripe agent api key migration you need to finish this week.
I've spent the last two weeks moving three client integrations off old keys after Stripe's November 19 announcement, and the pattern of mistakes is consistent enough to write down. This post covers what changed, how to create an agent-tagged key, how approval rules actually behave in production, and the pitfalls that cost my clients the most debugging time.
What changed: Stripe Treasury for agents now moves real money
Until recently, Stripe's MCP server was mostly read-only for agents — useful for pulling customer records or drafting a refund that a human then clicked through. Stripe says more than 24,000 businesses already use Treasury for agents this way, reviewing transactions and reconciling payments.
As of this month, that changed. Stripe added write access so agents connected through Claude, Codex, Cursor or a custom MCP client can call transfer_money, convert_currency, send_money and setup_recipient against a Treasury account. A payables agent can top up a bill-pay account and queue a vendor payment; a payroll agent can convert currency and move funds into the right account before a pay run.
That capability is genuinely useful for fintech-integration work, but it also means the authentication layer in front of it matters a lot more than it did six months ago. That's exactly what the November 30 deadline is about.
Why is Stripe retiring secret keys for MCP access?
A secret key (sk_...) has unrestricted permissions on every Stripe API. Handing that to an autonomous agent — one that can run in the background overnight — means a single prompt injection or misconfigured tool call can refund every charge on your account or drain a Treasury balance. Stripe's own API key guide now explicitly recommends against using secret keys for any new use case, agentic or not.
The fix is a new key category: an agent-tagged restricted API key. You create it the same way you create any restricted key, but during creation you select "Authorizing agent access to your account" as the key's intended use. Functionally it behaves like a normal restricted key — same scoped permissions, same rotation and expiration controls — but Stripe treats it as an independent actor for approval rules, separate from the human who created it.
How to create a Stripe agent API key
- Open the API keys page in the Dashboard (switch to the sandbox first if you're testing).
- Click Create restricted key.
- Set each resource to None, Read, or Write — grant Write only where the agent must change data, since Write already implies Read.
- When Stripe asks for the key's intended use, choose Authorizing agent access to your account. This applies the Agent badge you'll see next to the key in the Dashboard.
- Set an expiration date and, if your workflow supports it, a rotation schedule.
- Pass the key as the bearer token in the MCP client's
Authorization header, or reference it as an environment variable in your .mcp.json / Codex bearer_token_env_var config rather than hardcoding it.
- Test every tool call in a sandbox first — card networks and payment providers don't process real payments there, so a mistaken write moves no actual money.
# Example: calling Stripe directly with an agent-tagged restricted key
curl https://api.stripe.com/v1/refunds \
-u sk_agent_live_xxx: \
-d charge=ch_123 \
-d amount=2000
If you're already running an MCP client against a plain secret key, the migration is mostly swapping that key for an agent-tagged one and re-testing your approval rules — but do it before November 30; after that date, requests with unsupported keys fail outright rather than degrading gracefully.
OAuth vs. agent API keys: which should you use?
| OAuth session | Agent-tagged API key |
|---|
| Acts as | An extension of the connecting user | An independent actor with its own identity |
| Best for | Interactive use (a developer asking Claude to check a balance) | Background jobs (overnight reconciliation, scheduled payouts) |
| Session length | Refresh tokens expire after 14 days | You set expiration and rotation yourself |
| Money-movement confirmation | Every sensitive action needs a one-click confirmation from the user | Governed by your account's approval rules, with defaults Stripe maintains |
| Works with connected accounts | No — MCP doesn't support OAuth on behalf of connected accounts | Yes, via the Stripe-Account header |
In client projects I default to OAuth for anything a human is actively driving, and reserve agent-tagged keys for agents that run unattended — the kind that prepares a daily financial report or watches balances across accounts without a person in the loop.
Setting up approval rules so agents can't move money unsupervised
Stripe's two-party approval rules are the actual safety mechanism here, and they ship with sane defaults: refund creation, subscription cancellation, outbound payments, outbound transfers, payouts, and currency conversion all require approval by default when triggered from an agent-tagged key.
To tighten or loosen that:
- Go to Settings > Approvals > Create rule in the Dashboard.
- Pick a trigger action (for example, "Outbound transfer is created").
- Add a condition — amount thresholds and actor conditions (human vs. agent-tagged key) are the two I use most. A rule like "transfers under $50 auto-approve, anything above routes to a designated reviewer" covers most payables-agent use cases.
- Choose Require approval or Block, and assign reviewers. A user can't approve their own request, which matters on single-person accounts — there you can only scope the rule to agent-tagged keys, since the agent counts as a separate actor from its owner.
When a rule fires, the API call returns an approval_required error instead of completing, and Stripe creates an approval request object. Listen for these webhook events to handle the outcome in your integration rather than polling:
| Event | Meaning |
|---|
v2.core.approval_request.created | A request was created and is waiting on a reviewer |
v2.core.approval_request.approved | A reviewer approved it |
v2.core.approval_request.rejected | A reviewer denied it — no changes were made |
v2.core.approval_request.expired | 14 days passed with no decision |
v2.core.approval_request.succeeded | The approved action executed successfully |
v2.core.approval_request.failed | The approved action failed on execution |
This is the pattern I build into every payment integration project that touches agentic money movement now — a webhook handler that updates the agent's task state on approved/rejected/expired instead of the agent silently retrying a call that's stuck pending for two weeks.
What breaks if you don't migrate by November 30, 2026?
Any MCP request authenticated with a plain secret key or an untagged restricted key will get a 401 with an OAuth discovery challenge starting in December. In practice that means every tool call your agent makes — reading a balance, searching docs, preparing a refund — fails until you either reconnect via OAuth or swap in an agent-tagged key. If the integration runs unattended overnight, that's a silent outage until someone checks the logs the next morning, so I'd treat this as a this-week fix, not a someday one.
Common integration pitfalls we see in client projects
- Granting Write on everything "to be safe for later." Write implies Read, so a support-lookup agent that only needs to search refunds should never get Write at all.
- Skipping the sandbox test pass. Agent-tagged keys behave identically to normal restricted keys in a sandbox — there's no excuse to test money-movement tools in live mode first.
- Forgetting the single-reviewer trap. On a one-person Stripe account, a human-vs-human approval rule can never be satisfied. Scope those rules to agent-tagged actors specifically.
- Not separating platform and connected-account permissions. If you run a Connect platform, MCP doesn't support OAuth against connected accounts — you need an agent-tagged key scoped to exactly the connected-account permissions the agent needs, passed with the
Stripe-Account header.
- Treating
approval_required as an error to retry blindly. It's a signal to pause and wait for a webhook, not a transient failure.
Most of these also show up in plain non-agentic integrations — they're just more expensive when an autonomous process is the one hitting the API at 3 a.m. We cover related reconciliation failure modes in our Plaid transactions sync reconciliation guide and the policy side of unattended agent spend in AI agent spending limits.
Frequently asked questions
Do I have to use agent API keys if my agent only reads data?
No, but it's still the safer default. Read-only agents can keep using OAuth, since OAuth sessions inherit the connecting user's permissions and every sensitive write still needs a one-click human confirmation.
What happens to my existing secret key after November 30, 2026?
The key itself isn't deleted or revoked for normal API use — only MCP access is affected. Requests from an MCP client using that key will fail with a 401 and an OAuth discovery challenge; direct API calls outside MCP are unaffected unless you separately expire the key.
Can an agent approve its own refund or transfer request?
No. Stripe's two-party approval model requires the approver to be a different actor than the requester, including when the requester is an agent-tagged API key.
Does this affect integrations that don't use AI agents at all?
No. If you're not connecting an AI client to Stripe's MCP server, this deadline doesn't apply to your existing REST API integration. It's specifically about authentication for MCP, agent plugins, and agent-tagged keys.
Is Treasury for agents available everywhere?
It's in public preview and tied to Treasury availability, which is limited to specific countries and account types — check Stripe's Treasury availability page before building a workflow that assumes it's universally available.
Key takeaways
- Stripe stops accepting full-access secret keys and untagged restricted keys for MCP access on November 30, 2026 — migrate to agent-tagged restricted keys now.
- Create an agent-tagged key from the Dashboard's API keys page by choosing "Authorizing agent access to your account" as the key's intended use.
- Use OAuth for interactive, human-driven agent sessions; use agent-tagged keys for unattended background agents.
- Default approval rules already cover refunds, payouts, outbound transfers and currency conversions for agent-tagged keys — tune thresholds and reviewers rather than disabling them.
- Build a webhook handler for
approval_request events so your agent's workflow reacts to approvals and rejections instead of polling or blind-retrying.
- Test every money-movement tool call in a sandbox before switching to live mode, and never grant Write permissions an agent doesn't need.