Error library

Stripe resource_missing: The ID provided isn't valid

Stripe returns resource_missing when the ID you sent doesn't exist in the account and mode you're calling, or belongs to a different kind of object. Most often a test-mode ID is used with a live key (or the reverse), or the ID came from another Stripe account.

Cause: The ID (e.g. price_..., cus_...) doesn't exist for the API key's account and mode.

How to fix it

  1. Check which key the server uses (sk_test_ vs sk_live_) and that the ID was created in that same mode.
  2. Recreate products/prices in live mode and update the IDs in your env vars or config.
  3. Make sure you pass the right object type (a price_ ID where a price is expected, not a prod_ ID).
  4. If using Connect, confirm the request targets the right connected account.

Example

Illustrative example, not from a customer project.

- STRIPE_PRICE_ID=price_test123   # created in test mode
+ STRIPE_PRICE_ID=price_live456   # created in live mode

FAQ

Why does it work in test mode but not live?

Test and live mode objects are separate; IDs don't carry over.

What message accompanies it?

Stripe's error-code docs describe it as: the ID provided isn't valid; either the resource doesn't exist, or an ID for a different resource has been provided.

Get a $149 diagnosis See pricing Stripe still not live? We take it live at a fixed price.

$149Get a $149 diagnosis