#tyrannoswoleus

1 messages · Page 1 of 1 (latest)

opal cobaltBOT
#

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.

buoyant heart
#

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:
hard escarp
#

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

buoyant heart
#

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:

#
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

hard escarp
#

oh thats just some leftover code from me testing someting

buoyant heart
#

Can you try adding that same stripe.String("cs_test_123")?

hard escarp
#

yeah I have but it gives me an error

buoyant heart
#

What error?

hard escarp
#

let me test it and get it for you

opal cobaltBOT
hard escarp
#

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

buoyant heart
#

Hmm is our docs snippet for that wrong?

#

Can you try:

params := &stripe.CheckoutSessionListLineItemsParams{Session: stripe.String("cs_123")}
    i := ListLineItems(params)
hard escarp
#

sure