Implement subscription cancellation with retention flow
Description
Context: Subscription cancellations often represent lost revenue that could be saved through retention offers, feedback collection, or win-back campaigns.
Current Limitation: The contract treats cancellation as an immediate, permanent termination with no retention mechanism or feedback loop.
Expected Outcome: Implement a comprehensive cancellation flow with retention offers, feedback collection, delayed cancellation, and reactivation capabilities.
Acceptance Criteria
Technical Scope
Files Likely Affected:
contracts/subscription/src/cancellation.rs - New cancellation module
contracts/subscription/src/retention.rs - Retention offers
app/stores/cancellationStore.ts - New cancellation state
app/screens/CancellationFlowScreen.tsx - New cancellation UI
APIs/Contracts Involved:
request_cancellation(subscription_id: SubscriptionId, type: CancelType) -> CancellationFlow
offer_retention(subscription_id: SubscriptionId, offer: RetentionOffer) -> CancellationFlow
submit_feedback(subscription_id: SubscriptionId, feedback: Feedback) -> CancellationFlow
reactivate_subscription(subscription_id: SubscriptionId) -> Subscription
get_cancellation_analytics(merchant_id: MerchantId) -> RetentionAnalytics
Edge Cases to Consider:
- Reactivation after cancellation scheduled
- Multiple cancellation requests for same subscription
- Cancellation during active charging attempt
- Retention offer expiration
- Subscriber death/incapacitation handling
Implement subscription cancellation with retention flow
Description
Context: Subscription cancellations often represent lost revenue that could be saved through retention offers, feedback collection, or win-back campaigns.
Current Limitation: The contract treats cancellation as an immediate, permanent termination with no retention mechanism or feedback loop.
Expected Outcome: Implement a comprehensive cancellation flow with retention offers, feedback collection, delayed cancellation, and reactivation capabilities.
Acceptance Criteria
Technical Scope
Files Likely Affected:
contracts/subscription/src/cancellation.rs- New cancellation modulecontracts/subscription/src/retention.rs- Retention offersapp/stores/cancellationStore.ts- New cancellation stateapp/screens/CancellationFlowScreen.tsx- New cancellation UIAPIs/Contracts Involved:
request_cancellation(subscription_id: SubscriptionId, type: CancelType) -> CancellationFlowoffer_retention(subscription_id: SubscriptionId, offer: RetentionOffer) -> CancellationFlowsubmit_feedback(subscription_id: SubscriptionId, feedback: Feedback) -> CancellationFlowreactivate_subscription(subscription_id: SubscriptionId) -> Subscriptionget_cancellation_analytics(merchant_id: MerchantId) -> RetentionAnalyticsEdge Cases to Consider: