#tsr_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/1313125001540538378
đ 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.
- tsr_api, 3 days ago, 17 messages
hi!
- when you say 'coupon code' what are you referring to technically? The PromotionCode
promo_xxxxAPIs? - when you say
the payment intent checkoutwhat is that referring to, building a payments integration using e.g. PaymentElement instead of Checkout?
yes, i am referring to promo codes, and paymentelement
We are generating a secret on the backend based on the customer ID, currency, and amount, and passing it to the frontend so the user can proceed to the checkout page. There is a field on the checkout page where the user can apply a discount code. How can I check whether a particular promo code is valid for the specific product? Since we have already generated the secret based on the customer ID, currency, and amount, will it have any effect?
well you can't really, these APIs are intended for our Checkout product, it's not really possible to directly integrate them; instead you'd build your own system for managing discounts where you have your own coupon codes and if your system wants to apply them, you reduce the amount you pass when creating the PaymentIntent.
Could you please elaborate on the process a bit more? Specifically, I'm trying to understand how the promo code validation fits into the payment flow when we already have a secret generated for a specific amount, customer ID, and currency. How should we handle applying the promo code after the secret is generated and passed to the frontend? Would we need to update the PaymentIntent after validating the promo code, or is there another step we need to follow?
you can call your backend and update the PaymentIntent and also update the frontend
okay, let me check