#ryuuuu

1 messages ยท Page 1 of 1 (latest)

lusty ironBOT
#

Hello! We'll be with you shortly. 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.

  • ryuuuu, 2 days ago, 7 messages
frozen briar
#

๐Ÿ‘‹ happy to help

#

with coupons only that's not really possible

#

but what you can do is a combination between coupons and promotion codes

#

you first create a coupon and set its max_redemption to 50

#

then for each customer you create a separate promotion code and pass in the coupon, the customer and the max_redemptions 1

sonic basalt
#

hm but if i have 1000 customers i would need to create 1000 promotions codes

#

i guess i could do that programatically, but then theres another problem

#

last time i tried using promo codes they don't really work with my app

#

since im using invoices, and as far as i understand you cant apply promo codes directly to invoices, only coupons

#

so how it works right now it, the customer inputs a promo code, and the backend looks for the coupon that it belongs to and applies that instead

#

which means it wouldn't increment that promo codes usage counts, only the coupon codes

frozen briar
#

is it for subscriptions?

sonic basalt
#

nope, just invoices

#

im using stripe API to create invoices, and the discounts object only accepts coupons, not promo codes

#

also, would having thousands of promo codes laying around (one for each customer) slow down API requests for fetching them do you think?

#

or would that not be a problem

frozen briar
#

sorry for keeping you waiting, but I was thinking of a workaround

sonic basalt
#

no problem

frozen briar
#

but unfortunately there isn't a straightforward solution

sonic basalt
#

i guess i could code it to manually increment the usage counts of the promo codes when they reach the backend

#

is that possible with the stripe API?

#

so even tho the promo code wasnt directly applied to a checkout, the usage count would still go up

frozen briar
#

I'm thinking of something simpler in a sense

#

basically you don't use promo codes

#

but instead you use only coupons and store the list of the customers that already used it

sonic basalt
#

oh

frozen briar
#

and check that list before applying the coupon

sonic basalt
#

so basically nothing would change in stripe

#

i can do the whole logic in my backend

#

yeah i think that would work

frozen briar
#

let me know if you need any more help

sonic basalt
#

i think that's it, i'll just save the coupons in the DB and save all the users that used them so they can't use them again

#

thanks for the help! ๐Ÿ˜„

frozen briar
#

sure thing