Short answer
Check where the pm_ was created. The publishable key in the browser and the secret key on the server must belong to the same Stripe account and the same mode (test or live). With Connect, a PaymentMethod made on a connected account needs the same Stripe-Account header on the server call, and one saved on the platform has to be cloned before a direct charge on a connected account can use it.
Rather not fix it yourself? Stripe Billing Fix and Setup handles it at a fixed price, agreed before work starts.
Where the PaymentMethod really lives, and the fix
01
Keys from two different accounts or modes
“Test and live mode API keys, requests, and objects are only available within the corresponding mode.” Stripe, Error codes (livemode_mismatch)
Stripe.js created the PaymentMethod with one publishable key, and the server uses a secret key from another account, or a test key next to a live one. Put both keys from the same account and mode into your environment, and redeploy both sides.
# both from the same Stripe account and the same mode NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_live_… STRIPE_SECRET_KEY=sk_live_…02
Connect: created on a connected account, used on the platform
“Client-side libraries set the connected account ID as an argument to the client application” Stripe, Make API calls for connected accounts
If Stripe.js runs with stripeAccount set, the PaymentMethod belongs to that connected account. Your server call must carry the same account in the Stripe-Account header (stripeAccount in the Node library), or Stripe looks on the platform and finds nothing.
await stripe.paymentIntents.create( { amount, currency: 'usd', payment_method: pmId, confirm: true }, { stripeAccount: 'acct_…' }, // same account Stripe.js used );03
Connect: saved on the platform, charged on a connected account
“When cloning payment methods, you instead save them on the platform Stripe account.” Stripe, Clone customer payment information across connected accounts
A PaymentMethod saved on a platform customer doesn’t exist on the connected account. For direct charges, create a copy on the connected account first, from the platform customer and PaymentMethod, and use the new pm_ ID it returns.
04
A stale or mistyped ID
“The ID provided isn’t valid. Either the resource doesn’t exist, or an ID for a different resource has been provided.” Stripe, Error codes (resource_missing)
An ID saved in your database from test mode, from an old account, or a pm_ ID mixed up with a card_ or src_ ID gives the same error. Look the ID up in the Dashboard under the account and mode you expect; if it isn’t there, collect the card again.
Checked against the vendor’s docs on : Stripe docs: Error codes; Stripe docs: Make API calls for connected accounts; Stripe docs: Clone customer payment information across connected accounts.
Rather hand it over?
Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.
- $950Stripe Billing Fix and SetupSubscriptions, webhooks, customer portal and failed payments set up or fixed, tested in Stripe test mode.See scope and start
- from $450App Fix TicketOne reproducible bug. The Fix costs $1,200. If you need a Diagnosis first, its $450 fee counts toward the Fix.See scope and start
- from $450AI-Built App RescueFor a whole-app review, the $450 Launch Check is credited toward the optional $1,950 Rescue Sprint for up to five critical or high findings.No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.See scope and start
“Working with Simon makes everything run so smoothly and better than I could ask for it. Amazingly communicative, extremely knowledgeable of coding and the backend processes. I strongly recommend.”
Related: Stripe “No such customer” in test or live mode · Stripe works in test mode but not live · Stripe Connect onboarding incomplete · Stripe “No such price”