Robin Singh
Robin Singh

Reputation: 1796

How to fix no such plan error in Stripe using Vue?

I am using the product id from the stripe in vue. But it is always through error. Please guide me where I am wrong.

IntegrationError: No such plan: 'price_1LGPU4SEBFYnfFduMTxpNhje'

enter image description here

const redirect = async () => {
  const stripe = await loadStripe(import.meta.env.VITE_STRIPE_API_KEY as string)
  stripe?.redirectToCheckout({
    successUrl: window.location.href + 'success=true',
    cancelUrl: window.location.href + '?success=false',
    lineItems: [
      {
        price: 'price_1LGPU4SEBFYnfFduMTxpNhje',
        quantity: 1,
      },
    ],
    mode: 'subscription',
  })
}

Any solution appreciated!

Upvotes: 0

Views: 442

Answers (1)

orakaro
orakaro

Reputation: 1991

This error means the Price (price_1LGPU4SEBFYnfFduMTxpNhje) doesn't belong to your Stripe Account. You can double check by logging in your Stripe Dashboard, pasting the Id to the Search box and see if you can find it.

You can also check your Request logs to find recent errors.

Upvotes: 1

Related Questions