服务商

Stripe

Agent 怎样通过 KeyKeeper 拿到 Stripe 的 key,在 dashboard.stripe.com 该选什么,KeyKeeper 怎么验证。

模板 idstripe(别名 stripe-key、stripe-api-key)
字段stripe-api-key → STRIPE_API_KEY · 密钥
key 长什么样以 rk_live_ 或 rk_test_ 或 sk_live_ 或 sk_test_ 开头,创建时只显示一次
创建页面dashboard.stripe.com
KeyKeeper 的验证GET https://api.stripe.com/v1/balance——读取账户余额(Balance: Read)
模板核实日期2026-09-15

Agent 做什么

keykeeper providers show stripe
keykeeper save --provider stripe --from-clipboard --create --purpose "这个任务是做什么的"
keykeeper run -c stripe -- <你的命令>

--provider stripe 会补上凭据 ID 和字段名。这些环境变量就是 Stripe 自家工具读的那个,不需要任何映射。

只有你能做的

登录 dashboard.stripe.com
选 sandbox(测试)或 live 模式
Create restricted key:起名并逐资源选权限
创建 live key 需要 2FA 验证码
复制 key,然后在 KeyKeeper 的窗口里确认保存。

该选什么

永远用 Restricted key(rk_…),不要用 Secret key(sk_…):每个资源设为 None,只给任务需要的(够用就选 Read)。先在 sandbox 建(rk_test_),任务真的上线了再建 live key。Balance: Read 让 KeyKeeper 能验证它。

Agent 被告知的是同一件事。它替你打开页面、说明该选什么;它从不替你登录、过 2FA 或付费。

KeyKeeper 检查什么

  • 写入前: 值必须像一把 Stripe 的 key(以 rk_live_ 或 rk_test_ 或 sk_live_ 或 sk_test_ 开头)。贴错了会在存入之前被拒绝,并告诉 Agent 原因——不含值。
  • 保存后: KeyKeeper 自己发送 GET https://api.stripe.com/v1/balance,key 放在 Authorization 请求头里(读取账户余额(Balance: Read))。Agent 收到的是「接受」「拒绝」或「联系不上」——从不是值。

轮换与过期

不过期;Rotate key 给旧值最多 7 天宽限。180 天没用的 key 会被限权。 在 dashboard.stripe.com 轮换或撤销。