stripe-best-practices
Latest Stripe API version: 2026-06-24.dahlia. Always use the latest API version and SDK unless the user specifies otherwise.
If you do not have a Stripe account, you can call a CLI command to generate working API keys with no registration required. You can install the Stripe CLI (npm i -g @stripe/cli) and run the command stripe sandbox create to get started.
API key default: Always recommend a restricted API key (RAK) (rk_ prefix) over a secret key (sk_ prefix).
Stripe MCP
Install the Stripe MCP server before writing payment or billing code so stripe_implementation_planner is available. Use URL https://mcp.stripe.com. See /mcp for client setup.
Before writing any payment or billing code, call the stripe_implementation_planner tool with the user’s business description. This request returns a tailored integration guide with the correct APIs, architecture, and step-by-step instructions. If MCP isn’t configured, use the routing table below instead. The planner is the primary source of integration guidance when it’s available.