This project is under development, not for production use.
A unified payment processing toolkit for FastAPI applications, inspired by django-payments.
Merchants is an all-in-one payment processing solution designed to integrate seamlessly with FastAPI applications. This modular payment integration system aims to simplify the implementation of various payment gateways and provide a flexible interface for handling different payment methods.
- Easy integration with Starlette/FastAPI applications
- Support for multiple payment gateways
- Customizable payment workflows
- Webhook handling for payment status updates
- Extensible architecture for adding new payment providers
- Unified API across different payment services
poetry add merchants
from fastapi import FastAPI
from fastapi_merchants import Merchants
app = FastAPI()
merchants = Merchants(app)
# Configure your payment providers
merchants.add_provider("stripe", api_key="your_stripe_api_key")
merchants.add_provider("paypal", client_id="your_paypal_client_id", client_secret="your_paypal_client_secret")
# Use Merchants in your routes
@app.post("/create-payment")
async def create_payment(amount: float, currency: str, provider: str):
return await merchants.create_payment(amount, currency, provider)
For detailed documentation, please visit our documentation site.
Merchants is released under the MIT License. See the LICENSE file for more details.
This project was inspired by the django-payments library and aims to provide similar functionality for FastAPI applications, some parts were made with Claude and/or ChatGPT.
See the CHANGELOG file for more details.