Add Stripe subscription billing integration
- Add stripe_customer_id and stripe_subscription_id fields to User model - Add Stripe config settings (secret key, publishable key, price ID, webhook secret) - Create billing API endpoints: checkout session, webhook handler, portal, status - Add frontend Billing page with upgrade/manage subscription UI - Add billing route and Pro nav link - Add stripe dependency to requirements
This commit is contained in:
@@ -18,6 +18,10 @@ class User(Base):
|
||||
DateTime(timezone=True), default=lambda: datetime.now(timezone.utc)
|
||||
)
|
||||
|
||||
# Stripe
|
||||
stripe_customer_id: Mapped[str | None] = mapped_column(String(255), nullable=True, unique=True)
|
||||
stripe_subscription_id: Mapped[str | None] = mapped_column(String(255), nullable=True)
|
||||
|
||||
# Spotify OAuth
|
||||
spotify_id: Mapped[str | None] = mapped_column(String(255), nullable=True, unique=True)
|
||||
spotify_access_token: Mapped[str | None] = mapped_column(Text, nullable=True)
|
||||
|
||||
Reference in New Issue
Block a user