I'm trying to understand how Coupons work in Stripe, when applied to Subscriptions with different billing intervals, and the official docs are pretty unclear.
Stripe lets you create subscription plans
that bill on different interval
s (daily
, monthly
, yearly
, weekly
, every 3 months
, every 6 months
, or custom
).
Subscriptions can (optionally) have trial periods, measured in days.
Stripe also lets you create coupons
, which apply to those subscription plans for a certain duration
(once
, repeating
, or forever
). If you choose repeating
, you can also pass a numeric duration_in_months
parameter, which sets the duration of the discount.
Okay, so the confusing part of this is that subscriptions and coupons can have completely different intervals: I could create a subscription with a 25-day free trial, a weekly billing period, and a coupon with a duration of two months. If the customer applied the coupon on the 9th day of the trial, how many invoices would incorporate the discount?
How does the logic work for figuring out whether a coupon is still active?