Vercel Connect Stripe Restricted Keys for AI Agents Vercel Connect now issues each AI agent or task its own managed restricted Stripe key, scoped to selected permissions, with old keys remaining valid for up to 24 hours during rotation. The change replaces the common practice of sharing a single live secret key across every bot in a repository, though developers must still decide per-agent permissions, design outage-free rotation, and verify keys cannot perform unauthorized actions. Vercel Connect can now hand each agent or each task its own managed restricted Stripe key, with only the permissions you select, and during a rotation the old key can stay valid for up to 24 hours. That release fixes the worst habit in agent payments code: one sk live secret key shared by every bot in the repo. It does not decide which agent gets which permissions, how you rotate without an outage, or how you prove a key really can't do what it shouldn't. Those three calls are still yours. TL;DR 403 . A key you have only tested for success is a key you have not tested. Stripe has three kinds of live key: publishable pk live , restricted rk live and secret sk live . Stripe's own docs recommend granting a key only the permissions the integration needs. That's the restricted key's whole job, and for years most of us skipped it because minting and storing one key per integration was annoying. The Vercel Connect change removes that excuse. The managed Stripe connector can create one restricted key per agent or per task, with the permissions you choose, so "one bot, one key, one scope" is now the cheap default instead of the disciplined exception. Why this matters more for agents than for a normal backend: an agent picks its own next action. OWASP's LLM06:2025 entry on excessive agency names the fix directly: use read only credentials where you can, authorize in the user's context, and put an approval gate in front of high impact operations. If you want the wider threat model around this prompt injection steering a tool call is the classic route , my production guide to AI agent security https://mudassirkhan.me/blog/ai-agent-security-prompt-injection walks through it layer by layer. The first line of defence costs five lines of code. Refuse to boot an agent runtime with anything other than a restricted key: // lib/stripe-key.ts export function assertRestrictedKey key: string | undefined, name: string : string { if key { throw new Error ${name} is not set ; } if /^rk live|test /.test key { throw new Error ${name} must be a restricted key rk , refusing to start ; } return key; } Footgun avoided: nobody can "temporarily" paste the account's secret key into an agent's env and forget about it. Most agent workloads I see split cleanly into two lanes, and they deserve different keys and different rules. The reporting lane. A finance digest, a churn summary, a weekly revenue check. It reads and never writes. Give it a restricted key with read access to what it summarizes and nothing else. It can run on a cron with no human in the loop, because the worst thing a confused reporting agent can do is read data it was already allowed to read. python // agents/reports/weekly-revenue.ts import Stripe from "stripe"; import { assertRestrictedKey } from "../../lib/stripe-key"; const stripe = new Stripe assertRestrictedKey process.env.STRIPE REPORTS KEY, "STRIPE REPORTS KEY" , ; export async function weeklyNetRevenue : Promise