What are Providers?
Providers are pluggable payment integrations that connect Revstack to external payment processors like Stripe, Polar, PayPal, and more. They implement a standardized interface that abstracts away the complexity of different payment APIs, enabling you to switch providers without rewriting your application code.Why Use Providers?
Revstack’s provider abstraction offers several key benefits:Vendor Independence
Switch between payment processors without changing your application code. All providers implement the same unified interface.
Multi-Provider Support
Use different providers for different regions, currencies, or use cases within the same application.
Future-Proof
New payment methods and providers can be added without breaking existing integrations.
Type Safety
Full TypeScript support with strongly-typed inputs and outputs across all providers.
Provider Architecture
Every provider in Revstack implements theIProvider interface, which extends multiple feature interfaces:
See providers/core/src/interfaces/provider.ts:14 for the complete interface definition.
Provider Manifest
Each provider includes a comprehensive manifest that describes its capabilities, requirements, and configuration:See providers/core/src/manifest.ts:223 for the complete manifest schema.
Provider Capabilities
Thecapabilities object uses feature flags to tell Revstack what operations a provider supports:
Checkout Strategy
- redirect: User is redirected to a provider-hosted page (e.g., Stripe Checkout)
- native_sdk: Payment form embedded in your app using provider’s SDK (e.g., Stripe Elements)
- sdui: Server-driven UI for custom flows (QR codes, bank transfers)
Payment Features
Subscription Mode
- native: Provider handles billing engine (e.g., Stripe Billing)
- virtual: Revstack runs the scheduler and triggers one-time payments
See providers/core/src/types/capabilities.ts:53 for complete capability definitions.
Provider Context
All provider methods receive aProviderContext object containing:
Result Wrapper
All provider operations return anAsyncActionResult that wraps the response:
Available Providers
Revstack includes official providers for:- Stripe - Global payment processing with cards, wallets, and subscriptions
- Polar - Merchant of Record for SaaS with global tax compliance
Next Steps
Stripe Provider
Learn how to configure and use the Stripe provider
Custom Providers
Build your own custom provider implementation