#thekents_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/1310615110854905916
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
prefilled_promo_code exists for payment links but not for checkout
that is the exact functionality i need
Yep, unfortunately that is not supported today
Then just pass discounts[promotion_code]? https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-discounts-promotion_code
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
That essentially prefills it and can be removed on the payment page
The discount isnt removable at that point. That isnt that big of a deal. It also removes checkout recovery if i use discounts param
let me try the promotion code thing, currently in the docs the example is with a coupon id itself
Ah yeah you're right, my bad
I guess what you want isn't supported today โ and it's valid feedback I agree
Checkout is pretty opinionated and at the same time can be restrictive โ we do listen to feedback from users to shape product decisions. If you need control beyond that and what some might say is 'advanced' then you're better off rolling a different integration, like Elements
I started off with Elements, then the problem was that it was only payment events, missing out on after-payment invoices, discounts, tax calculation
Now the beta has been around for some time that wraps the elements in a checkoutprovider
Yep you need to build the UIs for those yourself