#Stripe: LineItems' PriceID not a valid field??
20 messages · Page 1 of 1 (latest)
For me looks like the Checkout Params don't have "Price" on it, you need to check what ItemParams are available 
Try stripe.StringValue
Which version of the stripe library are you using? Is it the latest?
With github.com/stripe/stripe-go/v76, that code looks fine to me. Which means either you're using a different version of the library to me, or your code is actually fine and your LSP is being shit
Try restarting VS code and see if the errors goes away
Try building your code on the command-line with go build ./... and see if you get the same (or similar) error
Wow.. when doing go get github.com/stripe/stripe-go, it gets version 70...
Thank you!
Yeah, you need the major version suffix in there because that's how Go modules work 🙂
If you're ever unsure what to go get, just look at the very top of the go.mod file in the repo you're go getting
Why wouldn't it get version one then? Is it because v70 is the oldest available?
Often times they'll even give you the latest go get command in the README
Alright, will do
Because the major version suffix only came about when Go modules came about, about 4 years ago. Before that, stripe must've been just using git tags to version their packages. If you look in your go.mod file with v70, you should see something like```
github.com/stripe/stripe-go v70+incompatible
By default, if you don't include a major version suffix, it'll just get the latest version of that package without the major version suffix, which just so happens to be v70.15.0
It's a bit weird, but you'll get used to it
It's worth noting too that the major version suffix is only a requirement for packages with a major version >= 2. If a package is still v0 or v1, you don't need the major version suffix
Like I said though, just check out the go.mod for the repo if you're unsure.