HomeBrandsStripePayments APIsecret_key_required
S
secret_key_required
Easy Fix
Stripe · Payments API
Operation requires a secret API key, not publishable key.
Quick Answer
Error code secret_key_required on your Stripe Payments API means: Operation requires a secret API key, not publishable key.. This is usually fixable — see the step-by-step guide below.
Affected Models
Likely Causes
  1. Credential, token, or signature presented by the client is invalid for this operation.
  2. Session/account state changed (revocation, inactivity, scope reduction) since token issuance.
  3. Authentication flow implementation differs from the provider’s current API requirements.
How to Fix It
1
Stripe: Validate token/key format, expiration, and environment (test vs live) in the failing request.
2
Re-issue credentials with the minimum required scopes and rotate stale secrets.
3
Confirm account/project status and access policy before retrying the same call.
4
Re-run request with fresh auth artifacts and monitor for repeat failures.
5
Add guardrails in client code to detect and refresh invalid auth state automatically.
Pro Tip
This is a common issue that most users can resolve without specialized tools. Try the first step before moving on to more complex solutions.
Related Error Codes
Video Guides
Loading video guides…
Search more on YouTube →