#tyrannoswoleus
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.
- tyrannoswoleus, 18 hours ago, 11 messages
- tyrannoswoleus, 20 hours ago, 3 messages
What two parameters are you refering to?
The GET calls for those line items is just the path, really
You also seem to be building manual HTTP requests instead of using our Go SDK
But that's fine, it should work
curl https://api.stripe.com/v1/checkout/sessions/cs_test_abc123/line_items?limit=5 \
-u sk_test_123:
hey Im actually very new to this, but heres what I had in my code using the echo starter youtube video you guys had
I was trying to just get the item and I was uing the golang v76 sdk
maybe im misunderstanding how to use it, but I just needed a way to find out what product the customer bought
What you're doing is conceptually fine, retrieving the sessions line items
I'm not sure why you're having that parameters issue, that does align with our snippet in the docs:
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
params := &stripe.CheckoutSessionListLineItemsParams{}
params.Filters.AddFilter("limit", "", "5")
i := session.ListLineItems(stripe.String("cs_test_a1r49eGdzAnfl5DvZ6sz5Pu5S6rTEGn7BP3g697LMNjSWxzfMMTWUvb950"), params)
wait
what is params.AddExpand('customer') trying to do?
there wouldnt be customer in that result, the line items
on the sessions, sure, but not the line items
oh thats just some leftover code from me testing someting
Can you try adding that same stripe.String("cs_test_123")?
yeah I have but it gives me an error
What error?
let me test it and get it for you
hey I just got back yeah so it won't let me build the go file cuz it expacts only one argument in the function
Hmm is our docs snippet for that wrong?
Looking at the source for a test for that method: https://github.com/stripe/stripe-go/blob/ea2313acf56d0922953e3ea61c64a06bd991b8a6/checkout/session/client_test.go#L70
Can you try:
params := &stripe.CheckoutSessionListLineItemsParams{Session: stripe.String("cs_123")}
i := ListLineItems(params)
sure