Skip to content

Issue: Subscription Cancellation Should Block Upgrade/Downgrade Actions #227

@sunglow666

Description

@sunglow666

Description

When a user cancels their subscription (with cancellation scheduled at period end), the system currently allows them to subsequently perform upgrade or downgrade actions before the cancellation takes effect. This creates inconsistent subscription states and potential billing logic issues.

Expected Behavior

If a user has already initiated cancellation (cancel_at_period_end: true):

  • Upgrade and downgrade actions should be rejected with an appropriate error (e.g., 400 Bad Request or 409 Conflict).
  • The API should return a clear message indicating that the subscription is already scheduled for cancellation and cannot be modified.

Scenario 1: Cancel → Downgrade

Steps:

  1. User cancels subscription → "cancel_at_period_end": true
  2. Before cancellation takes effect, user requests an downgrade
  3. GET /v1/subscriptions still shows "cancel_at_period_end": true

Scenario 2: Cancel → Upgrade

Steps:

  1. User cancels subscription → "cancel_at_period_end": true
  2. Before cancellation takes effect, user requests an upgrade
  3. GET /v1/subscriptions still shows "cancel_at_period_end": true

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions