#some1ataplace_api

1 messages ¡ Page 1 of 1 (latest)

sly waveBOT
#

👋 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.

red pulsar
#

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?

dense token
red pulsar
#

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...

dense token
#

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.

red pulsar
#

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?

dense token
#

If you don't want to set a limit on the number of redemptions, you should just leave max_redemptions empty

red pulsar
#

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?

dense token
#

Yes you are right

red pulsar
#

cool thanks. Any plans for you guys to add multiple promo codes to checkout discounts array dictionary? That would be a great feature..

dense token
#

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

red pulsar
#

awesome, thanks. What for?

dense token
#

Totally optionally, if we have your account ID, the team might reach out to you when the private beta is available.

red pulsar
#

oh, i am only in test mode right now anyways

#

I will eventually see the changelog and implement it, i can be patient. For now, I will rely on this workaround.