#ethan_api
1 messages ¡ Page 1 of 1 (latest)
đ 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/1451391717117919285
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
to clarify, what do you mean by "optional items"?
it is recommendation items section in the payment link
this field here
those payment link endpoint not return that field when i tryna get it
Ah I see, okay. Could you share with me your payment link please
thank you, give me a moment to check
please and thank you
well i could POST to update that field, but when I use GET endpoint API i cant get that field back which is weird and i need it for my stripe app development
so I do see the optional price on your payment link (plink_1Sf48KCkADo8MSdpuaA8wuu3) in our logs
could you share with me the script you ran to retrieve the payment link?
const stripe = Stripe(process.env.STRIPE_SECRET_KEY);
const fullPaymentLink = await stripe.paymentLinks.retrieve(paymentLink.id);
Ah okay, you need to specifically expand [0] the optional_items field, so the script should look like
const fullPaymentLink = await stripe.paymentLinks.retrieve(paymentLink.id, {
expand: ['optional_items']
});
let me know if you're still blocked
okay i got it now thank you
did you do anything?? i tried this before but it not worked but now after you told me to try this again it then worked now
I only added {expand: ['optional_items']}
thats weird i added that field before but it returned me an error.... may be it was my mistake. Thank you tho