Stripe No such plan: error
Hey Folks,
I hoping you can point me in the right direction.
I'm currently runing my Jumpstart in development.
The version I'm running forked from:
I hoping you can point me in the right direction.
I'm currently runing my Jumpstart in development.
The version I'm running forked from:
commit 11ca7ee61e455c1ed736ddd67c9ca8a2fb3d79ee (jumpstart/master, jumpstart/HEAD) Merge: de30f51 2e1da0e Author: Chris Oliver <excid3@gmail.com> Date: Thu Jun 4 11:04:52 2020 -0500
I am getting the "No such plan: prod_HRVIOQxPMKmFUR" error when trying to subscribe to a plan.
The Error Message:
https://files.littlebird.com.au/Shared-Image-2020-06-11-08-45-23-2uzoz.png
My Rails.env is development:
https://files.littlebird.com.au/Shared-Image-2020-06-11-08-46-10-T1UUi.png
I can confirm that:
a) The plan is in Stripe's test environment:
https://files.littlebird.com.au/Shared-Image-2020-06-11-08-47-14-Xs98I.png
b) I am using the Stripe Test Credentials
I am seeing activity against the Test Token in Stripe:
https://files.littlebird.com.au/Shared-Image-2020-06-11-08-48-54-U9Wzr.png
Things I've tried:
I've ensure that the Stripe CLI is running in my dev profile (not that I'm testing with a card that requires SCA)
web: bundle exec rails s webpack: bin/webpack-dev-server stripe: stripe listen --forward-to localhost:5000/webhooks/stripe
I've even gone as far as swapping out the Test Token for the one that the Stripe CLI generates.
Other things to note:
When I hit up: https://dashboard.stripe.com/test/plans, I'm redirected to https://dashboard.stripe.com/test/products .
When I hit up https://dashboard.stripe.com/test/plans/prod_HRVIOQxPMKmFUR , I get
https://files.littlebird.com.au/Shared-Image-2020-06-11-09-03-13-6Nl0d.png .
When I click the "View all plans" button, I can see my plan under "products".
https://files.littlebird.com.au/Shared-Image-2020-06-11-09-04-20-plIcI.png
I've read:
https://jumpstartrails.com/discussions/200
(No good. I'm in dev env and using test strip token. Plan was made in stripe's test mode).
and
https://jumpstartrails.com/discussions/346
(The Stripe CLI is running, and I'm not doing market place style payments).
https://jumpstartrails.com/discussions/120
(The right API keys are being used, as I can see logs in Stripe and in the console)
Loading development environment (Rails 6.0.3.1) [1] pry(main)> Rails.env => "development" [2] pry(main)> Stripe.api_key => "sk_test_[REDACTED]"
Cheers,
Marcus
Ok folks, I've figured it out.
Stripe doesn't seem to allow you to create or view plans from their dashboard any more.
They do allow you to create products. Products are distinct from plans.
Create a product in Stripe over at: https://dashboard.stripe.com/test/products
And then run in the console:
Stripe doesn't seem to allow you to create or view plans from their dashboard any more.
They do allow you to create products. Products are distinct from plans.
Create a product in Stripe over at: https://dashboard.stripe.com/test/products
And then run in the console:
plan = Stripe::Plan.create({ amount: 9900, currency: 'usd', interval: 'month', product: '<id of your product here>', })
puts plan.id # this is the plan ID you put into Jumpstart .
The stripe docs are available here: https://stripe.com/docs/api/plans/object
Hope this helps folks in the future.
Notifications
You’re not receiving notifications from this thread.