Subscription discount duration
What's new
Subscription offers and subscription plans now carry an optional discount_duration object that states how long the offer's discount_percent applies. Its type is either cycles — paired with a cycles count of at least 1 — or forever, mirroring Stripe's Coupon.duration.
Impact
A discounted subscription previously exposed only the percentage, with no indication of how long it lasted. You can now tell a promotional discount that expires after a set number of billing cycles from one that applies for the lifetime of the subscription, and show the correct post-discount price in your own UI.
Changes
| Resource | Change |
|---|---|
| get_items, get_all_store_items, get_store_items, create_store_item, update_store_item, bulk_update_store_items | Added optional discount_duration to subscription offers in the returned subscription settings |
| get_daily_rewards, get_daily_reward, create_daily_reward, update_daily_reward, copy_daily_reward | Added optional discount_duration to subscription plans returned as reward items |
| Components | Added the DiscountDuration and SubscriptionOfferDiscountDurationType schemas |
Upgrade
- No action required. The field is optional and absent for offers and plans that have no discount duration configured.
- If you render subscription pricing, read
discount_duration.typeand, forcycles,discount_duration.cyclesto describe how long the discount lasts.
需要技术支持?
联系我们的集成技术团队: integration@aghanim.com