#yagnesh-p_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/1466699820365385823
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- yagnesh-p_code, 3 days ago, 20 messages
- yagnesh-p_code, 6 days ago, 27 messages
Yes you can. Did you try but got any error?
Okay thanks, i will try and get back.
Hey, taking over here. Let me know if there's any follow-up Qs I can answer!
Hey I am using stripe package version : "20.2.0", node js
in that there is : Stripe.Checkout.SessionUpdateParams type and there is no discounts params in this
I have found this: https://docs.stripe.com/payments/advanced/dynamically-update-discounts?server-lang=node
and this : https://docs.stripe.com/api/checkout/sessions/update
in both of this it is marked as private feature
It is in preview feature yes
Is this what you are looking for right?
https://docs.stripe.com/api/checkout/sessions/update#update_checkout_session-discounts
Yeah
Which beta package I have to add in order make this work
Your npm version stripe is incorrect most of the time, last time i followed the npm version given in that doc, there was error, stripe developer came and resolved it
You should use the latest release
Which have that preview field
Okay, I will try that
I think I have to add the beta package, in the 20.3.0 i got this error:
2975 params: { line_items: preservedLineItems, discounts: [job.coupon] },
~~~~~~~~~
Build error
but if i am installing this, the update checkout session for lineitems is not working citing that permission to set to server-only.
permissions: {
update_discounts: 'server_only',
line_items: 'server_only',
},
but both of this not working together.
Can you share the request Id ?
Not very familiar with preview/private features here, sorry.
It is not the request, just my nest server build error.
req_NMpuanx79pYFvu
It is not the request, just my nest server build error.
That's probably just a compilation error that you can ignore using@ts-ignore, if the SDK has the property
req_NMpuanx79pYFvu
You need to reach out to Stripe Support then in order to onboard your Stripe Accounts for the preview feature.
SDK did not have that property hence i switched to beta package.
That request is also private ?
hey there ๐ taking over as my colleague needs to step away
just to confirm, has your account already been added to this private beta and you're still getting errors?
I am able to update the discount now, there was sdk params mismatch.
Though there is little confusion, when i switched to beta package, i still has to pass the update line items to server only, which is release publicly i think
When i moved to 20.3.0 i was able to update the line item without passing headers or anything
I see, thanks for clarifying - just double checking on our side
so to confirm, this is now working for you using the beta version?
Yes the beta one is working now
good to hear! let me know if you have any follow-up questions
No, thanks for the help
any time!