Repository navigation
feat: seat quantities, coupons, scheduled plan changes, reactivation - #1870
Merged
github-actions[bot] merged 1 commit intoOct 21, 2026
Merged
github-actions[bot] merged 1 commit into
github-actions[bot] merged 1 commit into
Conversation
…ivation (Smartdevs17#1724 Smartdevs17#1725 Smartdevs17#1726 Smartdevs17#1727) Seat-based plan quantities (Smartdevs17#1724): - Add set_subscription_quantity / get_subscription_quantity entry points - Quantity multiplies plan price during charging (default 1 seat) - Quantity changes take effect at next charge (no mid-cycle proration) Coupon and promo code support (Smartdevs17#1725): - Add Coupon struct with discount_bps, redemption limits, expiry - Add create_coupon / get_coupon / deactivate_coupon / apply_coupon - Redemption limits enforced; coupon consumed at next charge Scheduled plan changes at cycle end (Smartdevs17#1726): - Add PendingPlanChange struct and schedule/cancel/get entry points - Plan change applied automatically after next successful charge - Subscriber counts and plan index updated on application Subscription reactivation window (Smartdevs17#1727): - Add set_reactivation_window (admin) / get_reactivation_window - Cancelled subscriptions store cancellation timestamp - reactivate_subscription restores Active status within configured window All new storage uses direct env.storage().persistent() with FeatureStoreKey to avoid growing the StorageKey enum beyond the Soroban 64-variant limit.
|
@Cyberking99 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1726
Closes #1725
Closes #1727
Closes #1724
Summary
Implements four subscription management features: seat-based quantities, coupon/promo codes, scheduled plan changes at cycle end, and a reactivation window for cancelled subscriptions.
Changes
#1724 — Seat-based plan quantities
set_subscription_quantity/get_subscription_quantityentry points#1725 — Coupon and promo code support
Couponstruct: code, discount_bps, max/current_redemptions, active flag, expirycreate_coupon,get_coupon,deactivate_coupon,apply_couponentry points#1726 — Scheduled plan changes at cycle end
PendingPlanChangestruct withschedule_plan_change,cancel_plan_change,get_pending_plan_changeentry points#1727 — Subscription reactivation window
set_reactivation_window(admin),get_reactivation_window,reactivate_subscriptionentry pointscancel_subscriptionstores cancellation timestampStorage approach
All new storage uses
env.storage().persistent()directly with aFeatureStoreKeyenum, avoiding growth of the sharedStorageKeyenum (already at the Soroban 64-variant#[contracttype]limit).Acceptance Criteria
#1724
#1725
#1726
#1727