#sdkwtf_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/1242553642876407941
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Have you tried updating the payment link line_items ?
https://docs.stripe.com/api/payment_links/payment_links/update
hi thank you. I am using htpp request, so how would i do this, the same way as creating :
line_items[0][price] = my_new_price
?
Correct
ok thanks i'll try now :))
REceived unknown paramter
link to the request id: req_xAskJZwrPZIk0K
https://dashboard.stripe.com/test/logs/req_xAskJZwrPZIk0K
i create a new product / price, and use the new price to try to update the payment link
You're passing the parameters as query params where as we expect a POST request with parameters inside a post request body
https://dashboard.stripe.com/test/logs/req_xAskJZwrPZIk0K
I have a feeling, its that
all my other other requests i pass as query params though
ah you're right, it may not be that. Thinking..
should i be setting the new price using: line_items[0][id]
i can see this is the differnec in the docs compare to the create method that indicates line_items[0][price]
ah yeah try changing the ID
actually, wait
that doesn't make sense really. That prob just allows you to update quantity
I think the price update on a PaymentLink is a dashboard only feature.
i was fearing you would answer that to start with ahah
Yeah sorry, I haven't tried to do this myself recently
but then i still dont get how to correctly use the /update endpoint, using the indicated
line_items.id string Required
haaaa yeah we can only adjsut quantity
of a given price id
So you'd basically pass the existing price ID to the line_items.id and adjust
yeah
i get the docs now
but yeah then my only option is to create a new payment link with a new product / price
Yeah, you can file in a feature request for this via
https://support.stripe.com/?contact=true
however, if your usecase requires updating the price ID frequently then using Checkout Sessions API directly might be a better fit
ok thanks for the suggestion i have not looked into this API yet
and yeah in my app i may chance prices freqyently so dont feel like creating loads of unused links
We have a guide for hosted checkout sessions here: https://docs.stripe.com/payments/accept-a-payment
after creating a payemnt linik, when does the checkout session is created ?
Bascially my use case is
I create a payemnt link, send it to my customer. The customer might not visit the link and send me email about some changes, so i wan to go back to the link i sent him and change the price. just like from dashbaord, but using my app
if i can acces the session as soon as i created my payment links, then i can change the price directly in the session ?
When you use PaymentLink, Stripe creates the checkout session when the user visits the PaymentLink URL.
If your price changes frequently then you can build your own API based app where you set your own line items for the checkout session.
if i can acces the session as soon as i created my payment links, then i can change the price directly in the session ?
No, there's no way to access the session generated via payment link and update it.
ok i understand. i'll look deeeper into that. and submit a feature request for sure ๐