[REQUEST] Refactor Billing System to Support Crypto and Alternative Payments
Is your feature request related to a problem? Please describe. Yes. Currently, the billing system is tightly coupled with Stripe as the only supported payment provider. This rigid integration makes it difficult to add or experiment with alternative payment methods such as cryptocurrency, PayPal, regional gateways (e.g., Razorpay, Alipay), or future services. As a result, teams are limited in offering flexible billing options to users, which may impact adoption in regions or communities preferring alternative payment methods.
Describe the solution you'd like Refactor the billing system to abstract the payment provider logic behind a common interface or adapter layer. This will allow the platform to support multiple payment providers in a pluggable way. The system should:
-
Define a generic payment provider interface (e.g.,
createCheckoutSession,handleWebhook,getInvoices, etc.). -
Move Stripe-specific logic to a provider implementation (e.g.,
StripeProvider). -
Allow registration of additional providers (e.g.,
CryptoProvider,PayPalProvider) that implement the same interface. -
Support choosing the provider based on configuration or user preference.
-
Maintain a clean separation between business logic (subscriptions, usage limits, invoicing) and payment gateway logic.
Describe alternatives you've considered
-
Keeping Stripe as the sole provider and using Stripe’s built-in crypto support (currently limited or indirect).
-
Building separate custom endpoints for each new payment method, which adds complexity and duplicates logic.
-
Delegating crypto/payment options to external services and syncing manually (too brittle and not scalable).
Additional context This would open up support for:
-
Cryptocurrency payments via services like Coinbase Commerce or BitPay.
-
PayPal, Apple Pay (via alternative providers), and bank transfers.
-
Regional and B2B-friendly invoicing systems.
-
Better developer experience when testing and switching payment providers.
Decoupling billing logic also helps improve testability, maintainability, and future expansion of pricing models.
unfortunately we don't have alternative payment methods on the roadmap just as of yet, since the permissions are closely coupled with plans and our auth provider has a plugin that we use for stripe. @mhbdev but will let you know once we plan to support this!