#ctodan
1 messages · Page 1 of 1 (latest)
In what sense? Can you say more about the flow here?
ya, trying to add discounts for our subscriptions
user would enter a referral code
want to validate the code is valid, and then apply the discount to the subscrption
That would be up to your system, if there's validation to perform beyond the coupon code itself
ya more so just want to check it actually exists in stripe
so user cant just pass garbage
So i would expect you to implement the referral validation/checks, then apply an appropriate discount coupon on the subscription according to your plan structure
right, how do i search for the promocode by its name i guess?
I think you're looking for this: https://stripe.com/docs/api/promotion_codes/list#list_promotion_code-code
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Listing promo code by customer-facing code
oh i see
i can filter by code right
and does that always expand the coupon by default?
in the response