#soto-promo-code
1 messages ยท Page 1 of 1 (latest)
We handle validating the code entered by the customer and you can declare certain restrictions and behaviors on the promotion codes yourself in order to modify the way they work: https://stripe.com/docs/api/promotion_codes/create#create_promotion_code-restrictions
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Does this validate max redemptions per customer as well?, for instance if a promo code has a maximum of 45 redemptions, but the code only has 1 redemption per customer, is that implicitly validated during subscription creation process?
Hi ๐ I'm stepping in for @true void. The Stripe API will track maximum redemptions for you
even if it is per user?, because I am understanding that it is overall, only max redemptions being checked on the promo code
Quick explanation here:
In that case you would need to make the promo code customer specific but providing the Customer ID when creating it.
yeah, that's what I though, it doesn't work because the promo code would only be valid for a user, but what I need is to avoid the user from use that promo code multiple times.
Well you can create multiple promo codes from a single Coupon object. How are your users creating their subscription? Are you using Stripe Checkout or your own integration?
Is the code you shared how you are currently evaluating whether to allow the Customer to apply the discount?
exactly!
It is my own integration.
For instance, we create the promo code JULY22 for a coupon.
What I am validating is that a user can only use once JULY22
Yeah, in that case where you don't want to create a unique promo code for each customer, then I think your current approach makes the most sense.
All our other restrictions are by Product/Price (applies_to), Total Redemptions (max_redemptions) and Expiration Date (redeem_by)
got it!, thank you so much for your feedback, you were my last resource to confirm my intentions here ๐