#yaldabaoth_xx
1 messages ยท Page 1 of 1 (latest)
Hi ๐
Promotion codes don't work with PaymentIntents. You cannot consume them using the Payment Intent and you cannot mark them as consumed using the API.
The closest option would be to set the Promo Code as inactive but it's not clear to me what you are trying to do.
SInce you are looking to apply a promotion code to the payment intent, and this isn't something you can do with Stripe, you could build out the code tracking system in your own integration.
hi!
our flow is currently:
- User signs up and pays using a PaymentIntent
- The Subscription is created based on if that succeeds or fails.
- We apply a "First Month" discount coupon for 100% off. And the billCycleAnchor date is set to some time in the future for Month 2.
We want to support Promotion Codes for various durations. 1 Month, 3 Month, etc. There are PromotionCodes that can also only be used one-time.
I was thinking if a Promotion Code was only for one month, how we could best ensure it would be marked as redeemed. my initial thought was just calculating the discount of the Promotion Code for the amount of the Payment intent and then marking it as redeemed.
now i'm curious if:
โข can we apply a promotion code to a Subscription if there is already a coupon?
I think you can do that. Both are available options in the Update API https://stripe.com/docs/api/subscriptions/update and you create a Discount object on the Subscription https://stripe.com/docs/api/discounts/object. A Discount object can include both a coupon and promotion code
ok thanks for your help! we will tinker ๐
Yes I would recommend testing this out to make sure you get the behavior you want.
Are you currently using Test Clocks?
Yep we are