Subscription Workflows

Planned: SubscriptionExpiryWorkflow — handles user type downgrade and grace period enforcement when a subscription or ride pack expires.

SubscriptionExpiryWorkflow

Planned — not yet live.

Trigger: RevenueCat webhook event: EXPIRATION or CANCELLATION; or scheduled scan for expired expiresAt timestamps

Activities:

  1. updateSubscriptionStatus — set status: "expired" or "cancelled" on the subscription document
  2. downgradeUserType — set type: "free" on the user document once no active entitlements remain
  3. applyGracePeriod — if rides were created within the 1-month grace window, mark them read-only

Retry policy: maximumAttempts: 3, initialInterval: 30s, backoffCoefficient: 2

Timeout: workflowRunTimeout: 10m, activityStartToCloseTimeout: 60s