#price-go
1 messages · Page 1 of 1 (latest)
I'm on 72
Support for the Price API was added in 71.7.0: https://github.com/stripe/stripe-go/blob/master/CHANGELOG.md#7170---2020-04-29
are you sure you're on 72?
I've got ```go
stripe "github.com/stripe/stripe-go/v72"
is this the first time you use stripe-go? Or does another part of your code use it successfully? because it should be price.New (lower case) and after having loading the price package properly
I was getting errors from it earlier.
So it is definitely working.
I'm creating the price object to resolve those errors.
I just keep getting undefined price.
If I comment out the section where I create a price object, I get an no such price error when I attempt to create a stripe checkout.
Can you share your entire code (except your API key)
I think you're not including the package(s) properly
Yup, fair enough.
my guess is that you have a variable called price and that overrides the package and so it doesn't work but hard to say without seeing your code
"github.com/stripe/stripe-go/v72/checkout/session"```
you did this but never included the price package right?
"github.com/stripe/stripe-go/v72/price"
so you just need this too
the joy of go :p
it's all good, I've done that myself many times
it's either that or you do price := "my price" and then price.New doesn't work anymore
which I have lost countless hours on so I'll never forget this I think
thanks for sharing the code quickly that helps narrow things down 🙂
Thank you for all the help!