Skip to content

feat(payments-next): Create Cancel churn page#19908

Merged
xlisachan merged 1 commit intomainfrom
PAY-3434
Jan 27, 2026
Merged

feat(payments-next): Create Cancel churn page#19908
xlisachan merged 1 commit intomainfrom
PAY-3434

Conversation

@xlisachan
Copy link
Copy Markdown
Contributor

@xlisachan xlisachan commented Jan 20, 2026

This pull request

  • Adds the following churn pages and en.ftl:
    • Error
  • Not Found
  • Cancel/component
  • Updates ChurnInterventionService
    • redeemCoupon to include churnType
    • determineCancelChurnContentEligibility to include additional reasons (subscription_not_active, already_canceling_at_period_end, adds cmsOfferingContent when needed
  • Updates SubscriptionManagementService to return subscription invoice information

Issue that this pull request solves

Closes: PAY-3434

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have verified that my changes render correctly in RTL (if appropriate).

Screenshots (Optional)

Reason: Eligible
Mobile
Screenshot 2026-01-20 at 6 10 14 PM

Tablet
Screenshot 2026-01-20 at 6 09 52 PM

Successfully redeemed
Mobile
Screenshot 2026-01-20 at 6 10 37 PM

Tablet
Screenshot 2026-01-20 at 6 10 50 PM

Reason: Already canceling
Mobile
Screenshot 2026-01-20 at 6 03 49 PM

Tablet
Screenshot 2026-01-20 at 6 04 03 PM

Reason: Discount already applied/Redemption limit exceeded
Mobile
Screenshot 2026-01-20 at 6 07 00 PM

Tablet
Screenshot 2026-01-20 at 6 06 49 PM

Reason: Subscription not active
Mobile
Screenshot 2026-01-20 at 6 01 51 PM

Tablet
Screenshot 2026-01-20 at 6 01 39 PM

Reason: No churn found
Mobile
Screenshot 2026-01-20 at 6 07 42 PM

Tablet
Screenshot 2026-01-20 at 6 07 55 PM

'churn-error-page-message-discount-already-applied',
{ productName },
`This discount was applied to a ${productName} subscription for your account. If you still need help, please contact our Support team.`
`This discount was applied to a ${productName} subscription for your account. If you still need help, contact our Support team.`
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated as string in en.ftl is as follows:
churn-error-page-message-discount-already-applied = This discount was applied to a { $productName } subscription for your account. If you still need help, contact our Support team.

@xlisachan xlisachan marked this pull request as ready for review January 21, 2026 00:18
@xlisachan xlisachan requested review from a team as code owners January 21, 2026 00:18
Comment on lines +13 to +20
enum ChurnCancelErrorReason {
AlreadyCanceling = 'already_canceling_at_period_end',
SubscriptionNotActive = 'subscription_not_active',
SubscriptionStillActive = 'subscription_still_active',
OfferExpired = 'no_churn_intervention_found',
GeneralError = 'general_error',
RedemptionLimitExceeded = 'redemption_limit_exceeded',
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this is never really used as an enum, just converted to an array of strings (and casted) below. I'd probably just switch this to an array of strings as const.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this anymore actually. If it's not an error reason that is considered "allowed", we will just navigate to the error page.

Comment on lines +308 to +311
return {
...result,
cancelContent,
};
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[non-blocking] Imo we shouldn't combine return types like this. Instead return each separately.

return {
  cancelChurnContentEligibility,
  cancelFlowContent
}

@xlisachan xlisachan force-pushed the PAY-3434 branch 8 times, most recently from 178c20f to 0bb82c8 Compare January 26, 2026 20:32
This pull requests

Adds the following churn pages and en.ftl:
  Error
  Not Found
  Cancel/component
Updates ChurnInterventionService
  redeemCoupon to include churnType
  determineCancelChurnContentEligibility to include additional reasons (subscription_not_active, already_canceling_at_period_end, adds cmsOfferingContent when needed
Updates SubscriptionManagementService to return subscription invoice information

Closes PAY-3434
@xlisachan xlisachan merged commit 5fc785f into main Jan 27, 2026
20 checks passed
@xlisachan xlisachan deleted the PAY-3434 branch January 27, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants