Providers Overview
Providers in Medusa are modular, pluggable services that handle specific functionalities like payment processing, file storage, notifications, and authentication. They follow a consistent pattern that makes it easy to swap implementations or add new providers.What are Providers?
Providers are specialized services that:- Implement standardized interfaces for specific domains (payment, file storage, etc.)
- Can be easily swapped or configured based on your needs
- Are registered using the
ModuleProviderpattern - Support multiple providers of the same type running simultaneously
Provider Categories
Medusa includes providers across several categories:Payment Providers
Handle payment processing and transaction management.- payment-stripe - Stripe payment integration with support for multiple payment methods
- Stripe (default card payments)
- Bancontact
- Blik
- Giropay
- iDEAL
- Przelewy24
- PromptPay
- OXXO
Fulfillment Providers
Manage order fulfillment and shipping.- fulfillment-manual - Manual fulfillment provider for self-managed shipping
File Storage Providers
Handle file uploads, downloads, and storage.- file-local - Local filesystem storage for development
- file-s3 - Amazon S3 cloud storage for production
Notification Providers
Send notifications via email, SMS, and other channels.- notification-local - Local logging provider for development
- notification-sendgrid - SendGrid email integration
Auth Providers
Handle user authentication and identity management.- auth-emailpass - Email and password authentication
- auth-google - Google OAuth authentication
- auth-github - GitHub OAuth authentication
Other Providers
Additional provider types available:- Analytics Providers -
analytics-local,analytics-posthog - Caching Providers -
caching-redis - Locking Providers -
locking-postgres,locking-redis
Provider Pattern
All providers follow a consistent registration pattern:Provider Services
Each provider service:- Extends an abstract base class (e.g.,
AbstractPaymentProvider,AbstractFileProviderService) - Defines a static
identifierproperty - Implements required methods defined by the interface
- Accepts configuration options via constructor
Configuration
Providers are configured in yourmedusa-config.ts file:
Using Providers
Providers are accessed through their respective modules:Creating Custom Providers
You can create custom providers by:- Extending the appropriate abstract provider class
- Implementing all required methods
- Defining a unique identifier
- Registering with
ModuleProvider
Next Steps
Payment Providers
Integrate payment processing
File Storage Providers
Configure file uploads and storage
Notification Providers
Set up email and notifications
Auth Providers
Add authentication methods