Skip to content

Conversation

@Cerfio
Copy link
Contributor

@Cerfio Cerfio commented Sep 26, 2025

What kind of change does this PR introduce?

Feature: Add support for "paused" subscription status in the database enum.

What is the current behavior?

The subscription_status enum in the database currently supports: trialing, active, canceled, incomplete,
incomplete_expired, past_due, and unpaid. However, Stripe supports an additional "paused" status for
subscriptions, but this value cannot be stored in the database due to the enum constraint.
Related issue: #196

What is the new behavior?

• The subscription_status enum now includes the "paused" value
• Subscriptions with "paused" status from Stripe webhooks can now be properly stored in the database
• The existing webhook handler for customer.subscription.paused events will now work correctly with
database persistence

Additional context

This change aligns the database schema with Stripe's complete subscription status API. The code already
handles customer.subscription.paused webhook events in stripeSync.ts, but the database enum was missing
this value, potentially causing issues when trying to sync paused subscriptions.
Migration details:
• Added migration file: 0039_add_paused_to_subscription_status.sql
• Uses PostgreSQL ALTER TYPE ... ADD VALUE to extend the existing enum
• Safe operation that doesn't affect existing data

Copy link
Contributor

@kevcodez kevcodez left a comment

Choose a reason for hiding this comment

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

Thanks!

@kevcodez
Copy link
Contributor

Fixing the failing formatting here - #198

@kevcodez kevcodez merged commit 0b11f5a into supabase:main Sep 26, 2025
1 of 2 checks passed
@github-actions
Copy link

🎉 This PR is included in version 0.45.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@Cerfio Cerfio deleted the feature-stripe-subscription-status-enum-paused branch September 26, 2025 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants