Failure Index / Auth & permissions · critical · LangChain · OpenAI Agents SDK

Stripe tool fails: authentication error / invalid API key

Stripe rejected the agent's request — invalid or expired API key, or a key from the wrong mode (test vs live). A very common variant: 'No such customer' because the customer exists in live mode but the agent holds a test-mode key.

The error

stripe invalid api key agent
AuthenticationError stripe langchain tool
stripe no such customer test mode live mode

Root cause

Stripe keys are mode-scoped: test keys only see test data. Agents configured with a test key but fed live customer IDs (or vice versa) fail with what looks like an auth or missing-resource error. Rotated or restricted keys are the other frequent cause.

The fix

Confirm the key's mode matches the data the agent works with (sk_test_ vs sk_live_). Check the key still exists in the Stripe dashboard and has the required capabilities. If using restricted keys, verify the specific resource permission.

Preventing it next time

Keep test and live configurations fully separated per environment, and never let an agent decide which mode to use at runtime.

Stop debugging this by hand. Vorlo watches your agent and, when this failure happens, hands you the diagnosis and the fix — verified by developers who hit it before you — in your dashboard, Slack, or your editor. Two lines of code: pip install vorlo-trace · npm install vorlo-trace. Start free

Related failures