#antoineb_api

1 messages ยท Page 1 of 1 (latest)

versed sundialBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1315983222353559592

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

waxen smelt
#

You need to expand the response, in order to get the line_items in the response

versed sundialBOT
fossil bobcat
#

However, I already tried that

Stripe::PaymentIntent.retrieve("pi_3QUP27BBURfSZNfg0uZmpPBm", expand: 'payment_method_options.paypal.line_items').payment_method_options.paypal
=>
#Stripe::StripeObject:0x9f524 JSON: {
"preferred_locale": null,
"reference": null,
"subsellers": [
"acct_1OrffyBSUiQN71pI"
]
}

and it's not giving me the line items in the response. ๐Ÿค”

foggy jasper
#

hi! I'm taking over this thread.

#

can you share the request ID where you tried expand?

fossil bobcat
#

I think this one? However I don't see the expansion in the request log

req_mSHbIEqnIZY6oz

foggy jasper
#

I confirm there was no expension set there. I'm guessing your code is not setting expand correctly.

#

which Stripe SDK are you using?

fossil bobcat
#

Stripe ruby gem, 12.6.0

foggy jasper
#

then your code should looks something like this:

#
payment_intent = Stripe::PaymentIntent.retrieve({
  id: 'pi_xxx',
  expand: ['payment_method_options.paypal.line_items'],
})
fossil bobcat
#

indeed, I just tried it and it works, I can see my line items finally ๐Ÿ˜„

#

thanks, sorry for the silly question

foggy jasper
#

no worries!