stripe-best-practices · openai — Codex skill: what it does, how to install
Integration guide for Stripe in Codex: covers Checkout Sessions, Connect Accounts v2, tax setup, and restricted API keys.
npx skills add openai/plugins --skill stripe-best-practices -a codexWhat stripe-best-practices does
This skill enforces official Stripe architectural guidelines inside coding agents. It routes API decisions toward Checkout Sessions for one-time checkouts and subscriptions, Accounts v2 for platforms, and Metronome for usage-based billing. The rules mandate instantiating a StripeClient rather than relying on legacy global API key configurations like stripe.api_key.
The guidelines eliminate common pitfalls. They ban hardcoding payment_method_types so dynamic payment methods function properly, keeping an exception only for in-person Terminal setups (card_present). Before activating automatic_tax, the skill verifies active registrations so tax collection works as expected. For authentication, it favors restricted API keys with the rk_ prefix over secret keys.
Developers can scaffold testing keys directly via stripe sandbox create in the Stripe CLI. Install this if you build payment flows from scratch and want to stay on current SDK patterns.
What it helps with
- route payment flows between Checkout Sessions and PaymentIntents
- configure Stripe Tax without skipping registration requirements
- migrate code from global
stripe.api_keytoStripeClientinstances - spin up sandbox credentials using the Stripe CLI
Example prompts for the agent
- Create a one-time Checkout Session in Python with dynamic payment methods.
- Set up Connect Accounts v2 for a marketplace backend.
- Audit our Stripe billing integration for deprecated global key usage.
How to install stripe-best-practices
1Skills CLI (Vercel)
npx skills add openai/plugins --skill stripe-best-practices -a codex2Manually: put the files in place
.agents/skills/stripe-best-practices/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add openai/plugins --skill stripe-best-practices -a claude-code2Manually: put the files in place
~/.claude/skills/stripe-best-practices/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/stripe-best-practices/
Manually: put the files in place
.cursor/skills/stripe-best-practices/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install openai/plugins stripe-best-practices2Manually: put the files in place
.github/skills/stripe-best-practices/SKILL.mdPlatform CLI
gemini skills install https://github.com/openai/plugins --path plugins/stripe/skills/stripe-best-practicesManually: put the files in place
.devin/skills/stripe-best-practices/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set201
The whole set →Other versions of stripe-best-practices
Similar
Questions about stripe-best-practices
How to install stripe-best-practices in Codex?
Run npx skills add openai/plugins --skill stripe-best-practices in your terminal. Codex saves it under .agents/skills/stripe-best-practices/SKILL.md.
What does stripe-best-practices do?
It instructs AI agents to use modern Stripe patterns, targeting API version 2026-07-29.dahlia. It ensures correct API choices, restricted keys, and proper tax handling.
Why does the skill disallow payment_method_types?
Explicitly passing payment methods disables dynamic payment methods managed from the Stripe Dashboard. The only valid exception is Terminal transactions requiring card_present.