← All errors · StripeStripe payments & webhook errors
No such customer: 'cus_...'
Exact error
No such customer: 'cus_XXXXXXXX'
What it means
The ID doesn't exist in the Stripe account and mode you are calling. The same pattern applies to "No such price", "No such product", etc.
Likely causes
- The object was created in test mode and you are using a live key (or the reverse).
- The object belongs to a different Stripe account (or a connected account).
- The ID stored in your database is stale or was deleted.
How to fix it
Check which mode the key is in: sk_test_ vs sk_live_. Test and live data are fully separate.
Look up the ID in the Dashboard with the matching mode toggle.
For Connect, pass the account header:
await stripe.customers.retrieve('cus_123', { stripeAccount: 'acct_123' });
Prevent this next time
- Test webhooks locally with `stripe listen` and the Stripe test cards before going live.
- Check webhook delivery attempts in the Stripe Dashboard after each deploy, and keep test and live keys clearly separated per environment.
FAQ
What does "No such customer: 'cus_...'" mean?
The ID doesn't exist in the Stripe account and mode you are calling. The same pattern applies to "No such price", "No such product", etc.
What usually causes it?
The object was created in test mode and you are using a live key (or the reverse). The object belongs to a different Stripe account (or a connected account). The ID stored in your database is stale or was deleted.
How do I fix it?
1. Check which mode the key is in: sk_test_ vs sk_live_. Test and live data are fully separate. 2. Look up the ID in the Dashboard with the matching mode toggle. 3. For Connect, pass the account header:
Related errors
Get new fixes weekly
No spam. Unsubscribe anytime. Privacy