#dumb_pm - Promotion Codes
1 messages ยท Page 1 of 1 (latest)
Hello! Not sure what "discount_end" is referring to, there's no property like that on Stripe Coupons or Promotion Codes. Can you tell me where you're seeing "discount_end"?
Are you talking about the end property on a Discount object? https://stripe.com/docs/api/discounts/object
My bad. The discount_end is how its represented in the Sigma product. In there its associated to the subscription element.
Let me see what it is via the API.
or the nearest thing I'm thinking of
I think it must be the 'end' property. its not something we specify directly i'm 99% sure its applied stripe-side based on the customer facing coupon codes' duration and then time we execute the signup.
Yeah, that value is calculated by Stripe as a result of applying the Coupon/Promotion Code. It's not something that can be directly modified.
Thinking about this use case, I think what you need to do is wait and actually apply the Coupon to the Subscription when you end the trial, not when you create the Subscription. You would need to keep track of the Coupon on your end until that point.
ah, so keep a counter of uses internally and increment at each intended signup. so when we have 10/10 accounted for. then we block it, even if stripe still says 0/10 used.
Yes, if you want to limit the number of times a coupon/promo code could be used.
Marketing wants endless flexibility.
The other request I have from the business I'm curious if you have advice on.
because our SaaS product has some heavy upfront processing costs we have a 3 month minimum. The way the business wants that handled is to (when we do the subscription start) charge for the 3 months immediately. I imagine this may cause a lot of weirdness with the invoices so I figured maybe the best approach is to calculate how much the next 3 invoices will be and then execute a paymnt against the account for that amount.
such that if its $200 a month after a discount we just charge $600 to the account and then next invoices just take from there?
What you can do in that case is still start with a monthly Subscription, but add the extra two months as an additional line item to the first Invoice (this will only be added to the first Invoice, not recurring): https://stripe.com/docs/api/subscriptions/create#create_subscription-add_invoice_items
Then, once the payment succeeds, add those extra two months of funds to the Customer credit balance: https://stripe.com/docs/invoicing/customer/balance
Then the next Invoices for the Customer will draw from the credit balance first before charging them.
Ah sensible. so 2 additional line items of "Prepay Month 2" and "Prepay Month 3"
Yeah, you could do it like that. ๐
Thanks a ton. Appreciate you keeping it simple for a product manager sneaking into dev help.
Happy to help!
One edge case I just thought of. In the first problem. an internal counter doesn't work if we time-box the redemption region on the promo code.
I can probably push back on this functionality but do you have any thought on how to do that-- apply the time bound discount that was requested in the appropriate window but not configured until after that point?
Sorry, not sure I understand, can you rephrase?
In our use case of deferred coupon application.
Our solution for "redemption limits" was an internal counter that we increment with "reservations of use" so to speak.
If we have a promo code that is good for the month of April only. But it takes until May for our client to be configured we wouldn't be able to apply that promo code at that point because I presume Stripe will reject it as expired.
Ah, okay, so you want 10 redemptions in January, another 10 in Feb, 10 more in March, etc.?
No not so specific. That i could understand we could execute ourselves.
I mean if marketing goes into stripe dashboard and creates something like this:
but we are holding off our applying the discount until the point we are setup. it may be past the expo date.
Oh, yeah, you would need to build an interface for them to manage this on your end. You couldn't manage this in Stripe any longer given your use case.
yeah that makes sense. I'll just yell at marketing until they agree not to do that.
You would still use Stripe Coupons, but not with expiration dates or max redemptions or anything. Those things would be on your end.
Thats fair. Coupons don't have a freeform metadata area in the same way products and prices do aye? where we could specify key value pairs on the stripe dashboard?
i'm not seeing anything but sanity checking i'm not overlooking anyting.
Coupons do have metadata! https://stripe.com/docs/api/coupons/create#create_coupon-metadata ๐