#masud-checkout-ruby
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- masud-connect-portalconfiguration, 5 days ago, 13 messages
Hi, can you add more deatils on what you want to achieve here?
Create a card-less checkout session
Ah I see, you'd want to read this: https://stripe.com/docs/payments/checkout/no-cost-orders#no-cost-line-items
Try this and let me know if you run into any issues.
Yeah, that's the same code i used and it gave me same error.
session = Stripe::Checkout::Session.create({
line_items: [
{
price_data: {
unit_amount: 0,
product_data: {name: 'Free t-shirt'},
currency: 'usd',
},
quantity: 1,
},
],
mode: 'payment',
success_url: 'https://example.com/success',
cancel_url: 'https://example.com/cancel',
})
yeah same
What API version are you using?
There is a note: To process no-cost orders using the Checkout API, make sure you’re on API version 2023-08-16 or later.
The API version
not the library version
I mean, the api version is whatever the gem version is for stripe-ruby, right?
No, it would be pinned to an API version. In this case, can you update the ruby gem library version to the latest and try?
yes
Fetching stripe 8.7.0 (was 8.5.0)
Installing stripe 8.7.0 (was 8.5.0)
Bundle updated!
Doesn't seem like this is the latest, but i will try.
i updated to gem 'stripe', '~> 10.6' and same error.
Can you share the checkout session id with me?
its not creating a checkout session because it's saying i cannot make it zero, so i don't think i can get the ID. right?
Let me test this on my end real quick
masud-checkout-ruby
You have two options
- Upgrade the stripe-ruby gem
- Force a more recent API version when creating the Checkout Session
I'm on stripe (10.6.0) atm
It's unlikely you are
Oh is stripe deprecated and now it's stripe-ruby?
not really. The repo is stripe-ruby but the gem is stripe and that hasn't changed for over 10 years
Look at your request logs in https://dashboard.stripe.com/test/logs and check the most recent one, it will show the real stripe-ruby version you're using and I'm fairly confident you use an older one
req_p2p42SlPIzArAz
Is that where it's suppose to show the version?
ah you use a third-party library on top of it
that "pay rails" thingy is not Stripe's and they seem to force an older API version
I see. that's odd. I'll remove and test then.
How do you use that library? I've never used it but you must be passing an API key somewhere for example
BINGO that was the issue. I'm not even using that pay gem.
I must've installed it 2-3 years ago and forgot about it. We're not using it at all.