#mp_api
1 messages · Page 1 of 1 (latest)
đź‘‹ Welcome to your new thread!
⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đź”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1291307354251595806
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
I see discount's start is Aug 21 and end is Oct 21, which is 2 months apart
Not really. If I look at the upcoming invoice, it is valid for 21st Oct - 21st Nov
https://dashboard.stripe.com/subscriptions/sub_1Pq20PJqE5f9ucQhS7jxS5zM
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
the discount.start is 1724198810 and the discount.end is 1729469210 in the API
what's unusual about this specifically?
The unusual is that the upcoming invoice also has a discount so technically discount ends on 21st Nov and not 1729469210 which is 21st Oct
the way discounts work is that all invoices created while the discount is active, get discounted. So the discount is valid until 1729469210, the start of the next period on that subscription is 1729468949 (a few minutes before) (current_period_end), so the invoice which gets created at that time to charge for upcoming month, will apply that discount.
How do we convey this to the users? This causes confusion. There should be a way to know when the discount actually ends
I guess I'd just convey it the way our docs do
https://docs.stripe.com/billing/subscriptions/coupons#coupon-duration
A coupon’s duration indicates how long the redeemed discount is valid for. For example, a coupon for 50% off with a duration of 4 months applies to all invoices in the 4-month period starting when the coupon is first applied. If a customer applies this coupon to a yearly subscription during the coupon’s 4-month period, the 50% discount applies to the entire yearly subscription. In a monthly subscription, the coupon applies to the first 4 months. For a weekly subscription, a 4-month coupon applies to every invoice in the first 4 months.
I am sorry but this does not make sense to me
So the discount is valid until 1729469210, the start of the next period on that subscription is 1729468949 (a few minutes before) (current_period_end), so the invoice which gets created at that time to charge for upcoming month, will apply that discount.
not sure how else I can explain it but happy to try if you can clarify how I can help
Basically this is not correct "So the discount is valid until 1729469210"
what is not correct about it?
the discount lasts until that timestamp; any invoice created before that timestamp will apply that discount.
The discount lasts until 21st Nov
no, it lasts until Monday, 21 October 2024 00:06:50 Any invoice created before that time will have the full amount of the coupon applied as a discount.
that invoice might be an invoice that is charging for the upcoming month 21 Oct->21 Nov, yes. That's just how coupons work, as described in the docs quoted above.
So will the user get discount for 21OCt - 21st Nov?
yes, their invoice that is charging for the upcoming month 21 Oct->21 Nov can have this discount applied, because that invoice is created before the discount.end timestamp