FastAPI Payments Documentation
A flexible, extensible payment processing library for FastAPI applications.
Key Features:
Multiple payment providers (Stripe, PayPal, Adyen)
Flexible pricing models (subscription, usage-based, tiered, etc.)
Asynchronous architecture with FastAPI and SQLAlchemy
Event-driven design with RabbitMQ integration
Highly configurable via JSON or environment variables
Comprehensive testing support
from fastapi import FastAPI
from fastapi_payments import FastAPIPayments
import json
# Create FastAPI app
app = FastAPI()
# Load configuration
with open("payment_config.json") as f:
config = json.load(f)
# Initialize payments module
payments = FastAPIPayments(config)
# Include payment routes
payments.include_router(app, prefix="/api")