#Scinmist-coupon
1 messages · Page 1 of 1 (latest)
Hi! It's not exactly what you asked, but you could create a coupon that only works for first time transaction using this: https://stripe.com/docs/api/promotion_codes/create#create_promotion_code-restrictions-first_time_transaction
Let's imagine a situation that I am selling a service and everyone who has an account can reedem a discount of 20% only once
Scenario:
User A uses code X for -20% discount and receives it
User B uses code X for -20% discount and receives it
User A uses code X for -20% discount and error is raised because User A has already used it.
Yes I understood. So it means the solution I shared above wouldn't work for you?
Unfortunately not. Because I want to reedem a coupon person who already bought something else.
Makes sense. Then I don't think it possible to do with the Stripe API. So you'll have to handle that on your end. I see two options:
- Keep track of the coupons used by each customer, and only allow to use the coupon if it's the first time the customer is using it.
- Or create a unique coupon for each customer, with
max_redemptionsset to 1.