Home - cmaliwal/aiagent-payments GitHub Wiki

AI Agent Payments SDK Wiki

Welcome to the AI Agent Payments SDK Wiki! This is your comprehensive guide to monetizing AI and autonomous agents with flexible payment models.

🚀 Quick Navigation

Getting Started

Integration Guides

Payment Providers

Architecture & Design

Troubleshooting

Production Deployment

Community

📚 What is AI Agent Payments SDK?

The AI Agent Payments SDK is a comprehensive Python toolkit for monetizing AI and autonomous agents. It provides:

  • Flexible Payment Models: Subscription, pay-per-use, and freemium
  • Multiple Payment Providers: Stripe, PayPal, Crypto, and Mock
  • Pluggable Storage: Memory, File, and Database backends
  • Production-Ready: Robust error handling, validation, and monitoring
  • Framework Agnostic: Works with any Python backend

🎯 Key Features

  • Modular Design: Enable/disable providers and storage via configuration
  • Access Control: Decorator-based feature access control
  • Usage Tracking: Comprehensive usage analytics and billing
  • Health Monitoring: Real-time health checks for all components
  • CLI Interface: Command-line tools for management and analytics
  • Webhook Support: Handle payment events from providers
  • Stripe Integration: Checkout sessions, stablecoins, customer portal
  • PayPal Integration: Two-step payment flow
  • Crypto Support: Bitcoin and Ethereum payments

🚀 Quick Start

from aiagent_payments import PaymentManager, PaymentPlan
from aiagent_payments.providers import create_payment_provider
from aiagent_payments.storage import MemoryStorage
from aiagent_payments.models import PaymentType, BillingPeriod

# Setup
provider = create_payment_provider("mock")
storage = MemoryStorage()
manager = PaymentManager(storage=storage, payment_provider=provider)

# Create a plan
plan = PaymentPlan(
    id="pro",
    name="Pro Plan",
    payment_type=PaymentType.SUBSCRIPTION,
    price=10.0,
    billing_period=BillingPeriod.MONTHLY,
    features=["premium"]
)
manager.create_payment_plan(plan)

# Subscribe a user
manager.subscribe_user("[email protected]", "pro")

📖 Documentation Structure

  • Main Repository: Core documentation, API reference, and examples
  • Wiki: Community-driven guides, troubleshooting, and best practices
  • Examples: Complete working examples for different use cases
  • Tests: Comprehensive test suite demonstrating usage patterns

🤝 Getting Help

  • GitHub Issues: Report bugs and request features
  • Discussions: Ask questions and share solutions
  • Wiki: Self-service documentation and guides
  • Examples: Working code examples for common scenarios

📈 Project Status

  • Version: 0.0.1-beta (Beta Release)
  • Status: Active Development
  • License: MIT
  • Python: 3.10+

This wiki is maintained by the community. Feel free to contribute by editing pages or suggesting improvements!