-
-
Notifications
You must be signed in to change notification settings - Fork 76
Description
Bug report
- I confirm this is a bug with Supabase, not with my own application.
- I confirm I have searched the Docs, GitHub Discussions, and Discord.
Describe the bug
The supabase/stripe-sync-engine creates PostgreSQL enums from Stripe's API, but is missing the "paused" subscription status that exists in the official Stripe API. This causes SQL errors when trying to use a valid Stripe status.
To Reproduce
Steps to reproduce the behavior:
- Use
supabase/stripe-sync-engine:v0.41.1to sync Stripe data to PostgreSQL - Check the generated
stripe.subscription_statusenum values - Attempt to insert or query with
"paused"status (valid per Stripe docs) - Observe error:
invalid input value for enum stripe.subscription_status: "paused"
Current enum values (missing "paused"):
SELECT enumlabel FROM pg_enum e
JOIN pg_type t ON t.oid = e.enumtypid
WHERE t.typname = 'subscription_status';
-- Returns: trialing, active, canceled, incomplete, incomplete_expired, past_due, unpaidExpected behavior
The stripe.subscription_status enum should include all valid Stripe subscription statuses, including "paused".
According to Stripe's official documentation, the "paused" status exists:
"The subscription has ended its trial period without a default payment method and the trial_settings.end_behavior.missing_payment_method is set to pause. Invoices are no longer created for the subscription."
Screenshots
N/A - SQL error reproducible via command line
System information
- OS: Docker (Linux container)
- Version of stripe-sync-engine: v0.41.1
- Database: PostgreSQL 16.x
- Deployment: Docker Compose
Additional context
Impact
- Severity: Medium-High
- Business Impact: Cannot use legitimate Stripe "paused" status in database queries
- Affects: Any application using stripe-sync-engine with paused subscriptions
Quick Fix (Community Workaround)
For immediate relief, run this SQL after stripe-sync:
ALTER TYPE stripe.subscription_status ADD VALUE 'paused';Root Cause
The stripe-sync-engine appears to generate enums based on observed Stripe data rather than the complete Stripe API specification, missing edge case statuses like "paused".