#some1ataplace_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/1272423516716662926
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
My question got cut off:
I apply the new cart total sum to the line_items unit_amount after validating the array of promo codes the customer enters into the form.
After successfully paying with the promo codes, is there a way via the stripe api to redeem the multiple promo codes, since I am no longer using the forced 1 coupon ID or 1 promo code ID in the checkout session discounts array?
Do I never redeem the promo codes or mark them towards the max redemption number? Am I forced to rely on the redeem by date and let users use an infinite amount of redemptions until the promo code expires?
Hi there, as stated in the API referene, https://docs.stripe.com/api/checkout/sessions/create?lang=node#create_checkout_session-discounts, you can only specify one discount code (either coupon or promo_code) in one checkout session.
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's right, so i need a recommendation of what to do for my use case
i would love if stripe added the ability to add multiple promo codes in the api itself...
I don't really have a good workaround. You might want to split the payment into two checkout sessions and let your customer pay each of them using a different promo code.
i could do that already, but that is bad UX. They would have to pay separately for each cart item instead of all items in 1 cart total
imagine they were ordering 100 items, that would take them hours to do if they had 100 separate promo codes
can i leave max_redemptions as blank or infinite and rely on the redeem by date?
can i mark something as 'redeemed' in metadata?
If you don't want to set a limit on the number of redemptions, you should just leave max_redemptions empty
okay cool, just making sure
that way, an infinite amount of customers can use that 1 promo code until it expires. Then it no longer works, correct?
Yes you are right
cool thanks. Any plans for you guys to add multiple promo codes to checkout discounts array dictionary? That would be a great feature..
Thanks for the feedback! I'd let the product team know about it
Can you share with me your merchant ID? you can find it from the Stripe Dashboard -> Settings ->Account Details
awesome, thanks. What for?
Totally optionally, if we have your account ID, the team might reach out to you when the private beta is available.