# AI Agent Payments SDK
<div align="center">
<img src="assets/icon-concept.svg" alt="aiagent_payments Logo" width="128" height="128">
</div>
[](https://github.com/cmaliwal/aiagent-payments)
[](https://coff.ee/chiragmalia)
A plug-and-play Python SDK for monetizing AI and autonomous agents. Easily add subscription, pay-per-use, and access control to your agentic, LLM, or SaaS apps—regardless of framework. Supports modular payment providers (Stripe, PayPal, Crypto, Mock) and pluggable storage (Memory, File, Database) with comprehensive health monitoring and validation.
**Vision:**
- Make payments, access control, and usage tracking easy and robust for AI/agentic apps.
- Provide a modular, extensible foundation for real-world, production-grade monetization.
- Enable rapid prototyping and safe, compliant deployment for both indie hackers and enterprises.
---
## Architecture & Design
- **Modular by Design:** All providers and storage backends are pluggable and can be enabled/disabled via config or environment variables. Only enabled providers/storage are importable and usable; others will raise errors if used.
- **Extensible:** Easy to add new payment providers, storage backends, or custom logic with capability reporting.
For a deep dive into the architecture, design decisions, and vision, see [ARCHITECTURE_DECISION.md](ARCHITECTURE_DECISION.md).
---
## Features
- Modular payment providers: Stripe, PayPal, Crypto, Mock
- Pluggable storage: Memory, File, Database
- Subscription, pay-per-use, and freemium models (SDK-managed subscriptions, not Stripe subscriptions)
- CLI for setup, management, and analytics
- Webhook support for Stripe/PayPal
- Stripe Checkout Session support (hosted payment page URL)
- Stripe Stablecoin payments (USDC, USDT, DAI, BUSD, GUSD)
- Stripe Customer Management and Portal access
- PayPal two-step payment flow (create_order → capture_order)
- Usage tracking and analytics
- Comprehensive health monitoring for all components
- Input validation and error handling
- Capability reporting for providers and storage
- Robust logging, validation, and security
- Configurable, code-level enable/disable for providers/storage (see below)
- Comprehensive test suite with mock providers for development
- Open-source friendly and extensible
---
## Quickstart
```python
from aiagent_payments import PaymentManager, PaymentPlan
from aiagent_payments.providers import create_payment_provider, StripeProvider, PayPalProvider, CryptoProvider, MockProvider
from aiagent_payments.storage import MemoryStorage, FileStorage, DatabaseStorage
from aiagent_payments.models import PaymentType, BillingPeriod
# Define a payment plan
plan = PaymentPlan(
id="pro",
name="Pro Plan",
payment_type=PaymentType.SUBSCRIPTION,
price=10.0,
currency="USD",
billing_period=BillingPeriod.MONTHLY,
features=["premium"],
)
# Setup manager
provider = create_payment_provider("mock") # or "stripe", "paypal", "crypto"
storage = MemoryStorage()
manager = PaymentManager(storage=storage, payment_provider=provider)
manager.create_payment_plan(plan)
# Subscribe a user (SDK manages subscription internally)
manager.subscribe_user("user@example.com", plan_id="pro")
```
---
## Installation
- **Python:** 3.10+
- **Install:**
```bash
pip install aiagent_payments
```
- **Optional extras:**
- `stripe`, `paypalrestsdk`, `web3`, `sqlalchemy`, `alembic`, `flask`, `fastapi`, `uvicorn`, `crewai`, `python-dotenv`
- See `requirements.txt` and `setup.py` for full list.
---
## Configuration
- Enable/disable providers and storage in `aiagent_payments/config.py`:
```python
ENABLED_STORAGE = ["memory", "file", "database"]
ENABLED_PROVIDERS = ["mock", "stripe", "paypal", "crypto"]
```
- Or override via environment variables:
```bash
export AIAgentPayments_EnabledStorage="memory,file,database"
export AIAgentPayments_EnabledProviders="mock,stripe,paypal,crypto"
```
- Use `.env` for local secrets (see `example.env`).
- **Note:** Only enabled providers/storage are importable and usable; others will raise errors if used.
---
## Usage
### Basic Usage
```python
from aiagent_payments import PaymentManager, PaymentPlan
# ...see Quickstart above...
```
### Advanced Usage
- Multiple users, analytics, file/database storage, error handling.
- See `examples/advanced/advanced_usage.py`.
### Health Monitoring
```python
from aiagent_payments.providers import StripeProvider
from aiagent_payments.storage import DatabaseStorage
# Check provider health
stripe_provider = StripeProvider(api_key="sk_test_...")
status = stripe_provider.check_health()
print(f"Provider healthy: {status.is_healthy}")
# Check storage health
storage = DatabaseStorage("payments.db")
status = storage.check_health()
print(f"Storage healthy: {status.is_healthy}")
# Get capabilities
capabilities = stripe_provider.get_capabilities()
print(f"Supports refunds: {capabilities.supports_refunds}")
```
### Input Validation
```python
from aiagent_payments.exceptions import ValidationError
try:
# This will raise ValidationError for empty user_id
pm.check_access("", "feature_name")
except ValidationError as e:
print(f"Validation error: {e}")
```
### CLI Usage
```bash
python cli/main.py --help
```
### Stripe Checkout Sessions
You can generate a Stripe-hosted Checkout Session URL for your users:
```python
from aiagent_payments.providers import StripeProvider
from aiagent_payments.models import PaymentPlan
stripe_provider = StripeProvider(api_key="sk_test_...")
plan = PaymentPlan(
id="pro",
name="Pro Plan",
description="Premium access",
payment_type=PaymentType.SUBSCRIPTION,
price=10.0,
currency="USD",
)
success_url = "https://yourapp.com/success"
cancel_url = "https://yourapp.com/cancel"
checkout_result = stripe_provider.create_checkout_session(
user_id="user@example.com",
plan=plan,
success_url=success_url,
cancel_url=cancel_url,
metadata={"source": "web_checkout"}
)
# Use the checkout_url in your web application
checkout_url = checkout_result["url"]
session_id = checkout_result["session_id"]
```
### Stripe Stablecoin Payments
Accept cryptocurrency payments using stablecoins like USDC, USDP, and USDG:
```python
from aiagent_payments.providers import StripeProvider
stripe_provider = StripeProvider(api_key="sk_test_...")
# Create a stablecoin payment intent
payment_intent = stripe_provider.create_stablecoin_payment_intent(
user_id="user@example.com",
amount=25.00,
currency="USD",
stablecoin="usdc",
metadata={"service": "ai_analysis"}
)
# Create a stablecoin checkout session (hosted payment page)
checkout_url = stripe_provider.create_stablecoin_checkout_session(
user_id="user@example.com",
amount=25.00,
currency="USD",
stablecoin="usdc",
success_url="https://yourapp.com/success",
cancel_url="https://yourapp.com/cancel"
)
# Process the payment
transaction = stripe_provider.process_stablecoin_payment(
user_id="user@example.com",
amount=15.99,
currency="USD",
stablecoin="usdp"
)
# Get supported stablecoins
stablecoins = stripe_provider.get_supported_stablecoins()
# ['usdc', 'usdp', 'usdg']
# Customer management
customer = stripe_provider.create_customer(
user_id="user@example.com",
email="customer@example.com",
name="John Doe"
)
portal_url = stripe_provider.create_customer_portal_session(
customer_id=customer["id"],
return_url="https://yourapp.com/account"
)
```
**Important:** Stripe stablecoin payments are currently only available to a limited set of US businesses. You must:
1. Have a US-based Stripe account
2. Request access to Crypto payment method in your Payment methods settings
3. Wait for Stripe's approval
4. Have the `crypto_payments` capability active
For more details, see [Stripe's stablecoin documentation](https://docs.stripe.com/crypto/stablecoin-payments).
### PayPal Two-Step Payment Flow
PayPal Checkout requires user approval, so the SDK provides a two-step flow:
```python
from aiagent_payments.providers import PayPalProvider
paypal_provider = PayPalProvider(
client_id="your_client_id",
client_secret="your_client_secret",
sandbox=True,
return_url="https://yourapp.com/return",
cancel_url="https://yourapp.com/cancel"
)
# Step 1: Create order
order_response = paypal_provider.create_order(
user_id="user_123",
amount=25.99,
currency="USD",
return_url="https://yourapp.com/success",
cancel_url="https://yourapp.com/cancel"
)
# Step 2: Get approval link and redirect user
approval_link = next(
link['href'] for link in order_response['links']
if link['rel'] == 'approve'
)
# Step 3: Capture after user approval (via webhook or return URL)
transaction = paypal_provider.capture_order(
user_id="user_123",
order_id=order_response['id']
)
```
---
## Examples
The examples are organized into logical categories and have been curated to ensure they work end-to-end:
### Basic Examples
- `examples/basic/basic_usage.py`: Minimal usage, freemium/pay-per-use with usage limits and subscription models.
### Advanced Examples
- `examples/advanced/advanced_usage.py`: Advanced analytics, multiple users, health monitoring, and comprehensive error handling.
### Real-World Examples
- `examples/real_world/usage_based_billing.py`: Usage-based billing with simulation mode and comprehensive analytics.
- `examples/real_world/usage_based_billing_fast.py`: High-volume usage-based billing for SaaS applications.
### Integration Examples
- `examples/integrations/crewai_monetized_example.py`: Monetized CrewAI workflow with subscription and pay-per-use models.
- `examples/integrations/petnamegenius_story.py`: Fun, real-world SaaS story — AI Pet Name Generator with freemium and subscription models.
### LangGraph Examples
- `examples/langgraph/movie_ticket_booking.py`: LangGraph integration for complex agent workflows with payment controls.
All examples are tested and work without external API keys or dependencies. See the [examples directory](examples/) for more details.
---
## Documentation
- [Architecture & Design](ARCHITECTURE_DECISION.md) — Deep dive into design decisions and architecture
- [Crypto Provider Guide](docs/crypto_provider_guide.md) — Complete guide for cryptocurrency payments with limitations and best practices
- [Local Setup](docs/local_setup.md) — Development and testing setup
- [Usage Guide](docs/usage.md) — Detailed usage examples and patterns
---
## CLI Reference
- `python cli/main.py setup` — Initialize storage and plans
- `python cli/main.py list-plans` — List available payment plans
- `python cli/main.py subscribe --user user@example.com --plan pro` — Subscribe a user
- `python cli/main.py status --user user@example.com` — Show user subscription/status
- See `python cli/main.py --help` for all commands and options
---
## Extending the SDK
- Add new providers: Implement `PaymentProvider` in `aiagent_payments/providers/` with required methods including `_get_capabilities()`, `_validate_configuration()`, and `_perform_health_check()`.
- Add new storage: Implement `StorageBackend` in `aiagent_payments/storage/` with required methods including `_get_capabilities()`, `_validate_configuration()`, and `_perform_health_check()`.
- Register in `__init__.py` and update config as needed.
---
## Testing & Development
- Run all tests:
```bash
pytest --maxfail=3 --disable-warnings -v
```
- Lint and format:
```bash
make lint
make format
```
- Contribute: See `CONTRIBUTORS.md`
- CI/CD runs on Python 3.12.
---
## Compliance & Legal
- **Disclaimer:** This SDK is provided as-is, with no warranty. You are responsible for compliance with all laws and payment provider terms (including Stripe, PayPal, and crypto APIs). You must supply your own API keys for production use of Stripe, PayPal, and Crypto providers.
- Fallback/mock modes are for dev/test only and log warnings in production.
- See [DISCLAIMER.md](DISCLAIMER.md) for full details.
---
## Roadmap & Limitations
- See "Known Limitations and Roadmap" in this repo for planned features and current limitations.
- Contributions welcome! See TODOs in code and open issues.
---
## Get Involved
We welcome contributions, bug reports, and feedback from the AI agent developer community. Open an issue or pull request, or join the discussion to help shape the future of agent monetization.
Raw data
{
"_id": null,
"home_page": "https://github.com/cmaliwal/aiagent-payments",
"name": "aiagent-payments",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "ai, payments, subscription, monetization, agents, autonomous",
"author": "Chirag Maliwal",
"author_email": "Chirag Maliwal <Chiragmaliwal1995@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/78/e9/cadd38b2837e8a6a317fce67f66a13eab9d416290d771e641ac2a4df1927/aiagent_payments-0.0.1b0.tar.gz",
"platform": null,
"description": "# AI Agent Payments SDK\n\n<div align=\"center\">\n <img src=\"assets/icon-concept.svg\" alt=\"aiagent_payments Logo\" width=\"128\" height=\"128\">\n</div>\n\n[](https://github.com/cmaliwal/aiagent-payments)\n[](https://coff.ee/chiragmalia)\n\nA plug-and-play Python SDK for monetizing AI and autonomous agents. Easily add subscription, pay-per-use, and access control to your agentic, LLM, or SaaS apps\u2014regardless of framework. Supports modular payment providers (Stripe, PayPal, Crypto, Mock) and pluggable storage (Memory, File, Database) with comprehensive health monitoring and validation.\n\n**Vision:**\n- Make payments, access control, and usage tracking easy and robust for AI/agentic apps.\n- Provide a modular, extensible foundation for real-world, production-grade monetization.\n- Enable rapid prototyping and safe, compliant deployment for both indie hackers and enterprises.\n\n---\n\n## Architecture & Design\n\n- **Modular by Design:** All providers and storage backends are pluggable and can be enabled/disabled via config or environment variables. Only enabled providers/storage are importable and usable; others will raise errors if used.\n- **Extensible:** Easy to add new payment providers, storage backends, or custom logic with capability reporting.\n\nFor a deep dive into the architecture, design decisions, and vision, see [ARCHITECTURE_DECISION.md](ARCHITECTURE_DECISION.md).\n\n---\n\n## Features\n\n- Modular payment providers: Stripe, PayPal, Crypto, Mock\n- Pluggable storage: Memory, File, Database\n- Subscription, pay-per-use, and freemium models (SDK-managed subscriptions, not Stripe subscriptions)\n- CLI for setup, management, and analytics\n- Webhook support for Stripe/PayPal\n- Stripe Checkout Session support (hosted payment page URL)\n- Stripe Stablecoin payments (USDC, USDT, DAI, BUSD, GUSD)\n- Stripe Customer Management and Portal access\n- PayPal two-step payment flow (create_order \u2192 capture_order)\n- Usage tracking and analytics\n- Comprehensive health monitoring for all components\n- Input validation and error handling\n- Capability reporting for providers and storage\n- Robust logging, validation, and security\n- Configurable, code-level enable/disable for providers/storage (see below)\n- Comprehensive test suite with mock providers for development\n- Open-source friendly and extensible\n\n---\n\n## Quickstart\n\n```python\nfrom aiagent_payments import PaymentManager, PaymentPlan\nfrom aiagent_payments.providers import create_payment_provider, StripeProvider, PayPalProvider, CryptoProvider, MockProvider\nfrom aiagent_payments.storage import MemoryStorage, FileStorage, DatabaseStorage\nfrom aiagent_payments.models import PaymentType, BillingPeriod\n\n# Define a payment plan\nplan = PaymentPlan(\n id=\"pro\",\n name=\"Pro Plan\",\n payment_type=PaymentType.SUBSCRIPTION,\n price=10.0,\n currency=\"USD\",\n billing_period=BillingPeriod.MONTHLY,\n features=[\"premium\"],\n)\n\n# Setup manager\nprovider = create_payment_provider(\"mock\") # or \"stripe\", \"paypal\", \"crypto\"\nstorage = MemoryStorage()\nmanager = PaymentManager(storage=storage, payment_provider=provider)\nmanager.create_payment_plan(plan)\n\n# Subscribe a user (SDK manages subscription internally)\nmanager.subscribe_user(\"user@example.com\", plan_id=\"pro\")\n```\n\n---\n\n## Installation\n\n- **Python:** 3.10+\n- **Install:**\n ```bash\n pip install aiagent_payments\n ```\n- **Optional extras:**\n - `stripe`, `paypalrestsdk`, `web3`, `sqlalchemy`, `alembic`, `flask`, `fastapi`, `uvicorn`, `crewai`, `python-dotenv`\n- See `requirements.txt` and `setup.py` for full list.\n\n---\n\n## Configuration\n\n- Enable/disable providers and storage in `aiagent_payments/config.py`:\n ```python\n ENABLED_STORAGE = [\"memory\", \"file\", \"database\"]\n ENABLED_PROVIDERS = [\"mock\", \"stripe\", \"paypal\", \"crypto\"]\n ```\n- Or override via environment variables:\n ```bash\n export AIAgentPayments_EnabledStorage=\"memory,file,database\"\n export AIAgentPayments_EnabledProviders=\"mock,stripe,paypal,crypto\"\n ```\n- Use `.env` for local secrets (see `example.env`).\n- **Note:** Only enabled providers/storage are importable and usable; others will raise errors if used.\n\n---\n\n## Usage\n\n### Basic Usage\n```python\nfrom aiagent_payments import PaymentManager, PaymentPlan\n# ...see Quickstart above...\n```\n\n### Advanced Usage\n- Multiple users, analytics, file/database storage, error handling.\n- See `examples/advanced/advanced_usage.py`.\n\n### Health Monitoring\n\n```python\nfrom aiagent_payments.providers import StripeProvider\nfrom aiagent_payments.storage import DatabaseStorage\n\n# Check provider health\nstripe_provider = StripeProvider(api_key=\"sk_test_...\")\nstatus = stripe_provider.check_health()\nprint(f\"Provider healthy: {status.is_healthy}\")\n\n# Check storage health\nstorage = DatabaseStorage(\"payments.db\")\nstatus = storage.check_health()\nprint(f\"Storage healthy: {status.is_healthy}\")\n\n# Get capabilities\ncapabilities = stripe_provider.get_capabilities()\nprint(f\"Supports refunds: {capabilities.supports_refunds}\")\n```\n\n### Input Validation\n\n```python\nfrom aiagent_payments.exceptions import ValidationError\n\ntry:\n # This will raise ValidationError for empty user_id\n pm.check_access(\"\", \"feature_name\")\nexcept ValidationError as e:\n print(f\"Validation error: {e}\")\n```\n\n### CLI Usage\n```bash\npython cli/main.py --help\n```\n\n### Stripe Checkout Sessions\nYou can generate a Stripe-hosted Checkout Session URL for your users:\n\n```python\nfrom aiagent_payments.providers import StripeProvider\nfrom aiagent_payments.models import PaymentPlan\n\nstripe_provider = StripeProvider(api_key=\"sk_test_...\")\nplan = PaymentPlan(\n id=\"pro\",\n name=\"Pro Plan\",\n description=\"Premium access\",\n payment_type=PaymentType.SUBSCRIPTION,\n price=10.0,\n currency=\"USD\",\n)\nsuccess_url = \"https://yourapp.com/success\"\ncancel_url = \"https://yourapp.com/cancel\"\ncheckout_result = stripe_provider.create_checkout_session(\n user_id=\"user@example.com\",\n plan=plan,\n success_url=success_url,\n cancel_url=cancel_url,\n metadata={\"source\": \"web_checkout\"}\n)\n\n# Use the checkout_url in your web application\ncheckout_url = checkout_result[\"url\"]\nsession_id = checkout_result[\"session_id\"]\n```\n\n### Stripe Stablecoin Payments\nAccept cryptocurrency payments using stablecoins like USDC, USDP, and USDG:\n\n```python\nfrom aiagent_payments.providers import StripeProvider\n\nstripe_provider = StripeProvider(api_key=\"sk_test_...\")\n\n# Create a stablecoin payment intent\npayment_intent = stripe_provider.create_stablecoin_payment_intent(\n user_id=\"user@example.com\",\n amount=25.00,\n currency=\"USD\",\n stablecoin=\"usdc\",\n metadata={\"service\": \"ai_analysis\"}\n)\n\n# Create a stablecoin checkout session (hosted payment page)\ncheckout_url = stripe_provider.create_stablecoin_checkout_session(\n user_id=\"user@example.com\",\n amount=25.00,\n currency=\"USD\",\n stablecoin=\"usdc\",\n success_url=\"https://yourapp.com/success\",\n cancel_url=\"https://yourapp.com/cancel\"\n)\n\n# Process the payment\ntransaction = stripe_provider.process_stablecoin_payment(\n user_id=\"user@example.com\",\n amount=15.99,\n currency=\"USD\",\n stablecoin=\"usdp\"\n)\n\n# Get supported stablecoins\nstablecoins = stripe_provider.get_supported_stablecoins()\n# ['usdc', 'usdp', 'usdg']\n\n# Customer management\ncustomer = stripe_provider.create_customer(\n user_id=\"user@example.com\",\n email=\"customer@example.com\",\n name=\"John Doe\"\n)\n\nportal_url = stripe_provider.create_customer_portal_session(\n customer_id=customer[\"id\"],\n return_url=\"https://yourapp.com/account\"\n)\n```\n\n**Important:** Stripe stablecoin payments are currently only available to a limited set of US businesses. You must:\n1. Have a US-based Stripe account\n2. Request access to Crypto payment method in your Payment methods settings\n3. Wait for Stripe's approval\n4. Have the `crypto_payments` capability active\n\nFor more details, see [Stripe's stablecoin documentation](https://docs.stripe.com/crypto/stablecoin-payments).\n\n### PayPal Two-Step Payment Flow\nPayPal Checkout requires user approval, so the SDK provides a two-step flow:\n\n```python\nfrom aiagent_payments.providers import PayPalProvider\n\npaypal_provider = PayPalProvider(\n client_id=\"your_client_id\",\n client_secret=\"your_client_secret\",\n sandbox=True,\n return_url=\"https://yourapp.com/return\",\n cancel_url=\"https://yourapp.com/cancel\"\n)\n\n# Step 1: Create order\norder_response = paypal_provider.create_order(\n user_id=\"user_123\",\n amount=25.99,\n currency=\"USD\",\n return_url=\"https://yourapp.com/success\",\n cancel_url=\"https://yourapp.com/cancel\"\n)\n\n# Step 2: Get approval link and redirect user\napproval_link = next(\n link['href'] for link in order_response['links'] \n if link['rel'] == 'approve'\n)\n\n# Step 3: Capture after user approval (via webhook or return URL)\ntransaction = paypal_provider.capture_order(\n user_id=\"user_123\",\n order_id=order_response['id']\n)\n```\n\n---\n\n## Examples\n\nThe examples are organized into logical categories and have been curated to ensure they work end-to-end:\n\n### Basic Examples\n- `examples/basic/basic_usage.py`: Minimal usage, freemium/pay-per-use with usage limits and subscription models.\n\n### Advanced Examples\n- `examples/advanced/advanced_usage.py`: Advanced analytics, multiple users, health monitoring, and comprehensive error handling.\n\n### Real-World Examples\n- `examples/real_world/usage_based_billing.py`: Usage-based billing with simulation mode and comprehensive analytics.\n- `examples/real_world/usage_based_billing_fast.py`: High-volume usage-based billing for SaaS applications.\n\n### Integration Examples\n- `examples/integrations/crewai_monetized_example.py`: Monetized CrewAI workflow with subscription and pay-per-use models.\n- `examples/integrations/petnamegenius_story.py`: Fun, real-world SaaS story \u2014 AI Pet Name Generator with freemium and subscription models.\n\n### LangGraph Examples\n- `examples/langgraph/movie_ticket_booking.py`: LangGraph integration for complex agent workflows with payment controls.\n\nAll examples are tested and work without external API keys or dependencies. See the [examples directory](examples/) for more details.\n\n---\n\n## Documentation\n\n- [Architecture & Design](ARCHITECTURE_DECISION.md) \u2014 Deep dive into design decisions and architecture\n- [Crypto Provider Guide](docs/crypto_provider_guide.md) \u2014 Complete guide for cryptocurrency payments with limitations and best practices\n- [Local Setup](docs/local_setup.md) \u2014 Development and testing setup\n- [Usage Guide](docs/usage.md) \u2014 Detailed usage examples and patterns\n\n---\n\n## CLI Reference\n\n- `python cli/main.py setup` \u2014 Initialize storage and plans\n- `python cli/main.py list-plans` \u2014 List available payment plans\n- `python cli/main.py subscribe --user user@example.com --plan pro` \u2014 Subscribe a user\n- `python cli/main.py status --user user@example.com` \u2014 Show user subscription/status\n- See `python cli/main.py --help` for all commands and options\n\n---\n\n## Extending the SDK\n\n- Add new providers: Implement `PaymentProvider` in `aiagent_payments/providers/` with required methods including `_get_capabilities()`, `_validate_configuration()`, and `_perform_health_check()`.\n- Add new storage: Implement `StorageBackend` in `aiagent_payments/storage/` with required methods including `_get_capabilities()`, `_validate_configuration()`, and `_perform_health_check()`.\n- Register in `__init__.py` and update config as needed.\n\n---\n\n## Testing & Development\n\n- Run all tests:\n ```bash\n pytest --maxfail=3 --disable-warnings -v\n ```\n- Lint and format:\n ```bash\n make lint\n make format\n ```\n- Contribute: See `CONTRIBUTORS.md`\n- CI/CD runs on Python 3.12.\n\n---\n\n## Compliance & Legal\n\n- **Disclaimer:** This SDK is provided as-is, with no warranty. You are responsible for compliance with all laws and payment provider terms (including Stripe, PayPal, and crypto APIs). You must supply your own API keys for production use of Stripe, PayPal, and Crypto providers.\n- Fallback/mock modes are for dev/test only and log warnings in production.\n- See [DISCLAIMER.md](DISCLAIMER.md) for full details.\n\n---\n\n## Roadmap & Limitations\n\n- See \"Known Limitations and Roadmap\" in this repo for planned features and current limitations.\n- Contributions welcome! See TODOs in code and open issues.\n\n---\n\n## Get Involved\n\nWe welcome contributions, bug reports, and feedback from the AI agent developer community. Open an issue or pull request, or join the discussion to help shape the future of agent monetization.\n",
"bugtrack_url": null,
"license": null,
"summary": "A Python SDK for monetizing AI/autonomous agents with subscription and pay-per-use models",
"version": "0.0.1b0",
"project_urls": {
"Bug Tracker": "https://github.com/cmaliwal/aiagent-payments/issues",
"Documentation": "https://github.com/cmaliwal/aiagent-payments",
"Homepage": "https://github.com/cmaliwal/aiagent-payments",
"Repository": "https://github.com/cmaliwal/aiagent-payments"
},
"split_keywords": [
"ai",
" payments",
" subscription",
" monetization",
" agents",
" autonomous"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "9c4e1ad6779300dd4cf9030fc1ecdda4fd51fccecabbf94742b62d641b690402",
"md5": "0654db88856d2852c48e15fe498d8538",
"sha256": "afd06f387854bf3d907b458f9d9724b0c933f2ac4f6710628c79057cefcbbc3c"
},
"downloads": -1,
"filename": "aiagent_payments-0.0.1b0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0654db88856d2852c48e15fe498d8538",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 114949,
"upload_time": "2025-07-21T15:36:35",
"upload_time_iso_8601": "2025-07-21T15:36:35.935254Z",
"url": "https://files.pythonhosted.org/packages/9c/4e/1ad6779300dd4cf9030fc1ecdda4fd51fccecabbf94742b62d641b690402/aiagent_payments-0.0.1b0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "78e9cadd38b2837e8a6a317fce67f66a13eab9d416290d771e641ac2a4df1927",
"md5": "0ecd3abd7d6f1cc7943d686c22c25ae3",
"sha256": "7f98f4b8620e4bd3f1bd42dcf5d94519d1c7790d900b6bb8010b5f5f93541c26"
},
"downloads": -1,
"filename": "aiagent_payments-0.0.1b0.tar.gz",
"has_sig": false,
"md5_digest": "0ecd3abd7d6f1cc7943d686c22c25ae3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 110429,
"upload_time": "2025-07-21T15:36:37",
"upload_time_iso_8601": "2025-07-21T15:36:37.108175Z",
"url": "https://files.pythonhosted.org/packages/78/e9/cadd38b2837e8a6a317fce67f66a13eab9d416290d771e641ac2a4df1927/aiagent_payments-0.0.1b0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-21 15:36:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "cmaliwal",
"github_project": "aiagent-payments",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "aiohappyeyeballs",
"specs": [
[
"==",
"2.6.1"
]
]
},
{
"name": "aiohttp",
"specs": [
[
"==",
"3.12.14"
]
]
},
{
"name": "aiosignal",
"specs": [
[
"==",
"1.4.0"
]
]
},
{
"name": "annotated-types",
"specs": [
[
"==",
"0.7.0"
]
]
},
{
"name": "attrs",
"specs": [
[
"==",
"25.3.0"
]
]
},
{
"name": "bitarray",
"specs": [
[
"==",
"3.5.1"
]
]
},
{
"name": "certifi",
"specs": [
[
"==",
"2025.7.14"
]
]
},
{
"name": "cffi",
"specs": [
[
"==",
"1.17.1"
]
]
},
{
"name": "charset-normalizer",
"specs": [
[
"==",
"3.4.2"
]
]
},
{
"name": "ckzg",
"specs": [
[
"==",
"2.1.1"
]
]
},
{
"name": "cryptography",
"specs": [
[
"==",
"45.0.5"
]
]
},
{
"name": "cytoolz",
"specs": [
[
"==",
"1.0.1"
]
]
},
{
"name": "eth-account",
"specs": [
[
"==",
"0.13.7"
]
]
},
{
"name": "eth-hash",
"specs": [
[
"==",
"0.7.1"
]
]
},
{
"name": "eth-keyfile",
"specs": [
[
"==",
"0.8.1"
]
]
},
{
"name": "eth-keys",
"specs": [
[
"==",
"0.7.0"
]
]
},
{
"name": "eth-rlp",
"specs": [
[
"==",
"2.2.0"
]
]
},
{
"name": "eth-typing",
"specs": [
[
"==",
"5.2.1"
]
]
},
{
"name": "eth-utils",
"specs": [
[
"==",
"5.3.0"
]
]
},
{
"name": "eth_abi",
"specs": [
[
"==",
"5.2.0"
]
]
},
{
"name": "frozenlist",
"specs": [
[
"==",
"1.7.0"
]
]
},
{
"name": "hexbytes",
"specs": [
[
"==",
"1.3.1"
]
]
},
{
"name": "idna",
"specs": [
[
"==",
"3.10"
]
]
},
{
"name": "iniconfig",
"specs": [
[
"==",
"2.1.0"
]
]
},
{
"name": "multidict",
"specs": [
[
"==",
"6.6.3"
]
]
},
{
"name": "packaging",
"specs": [
[
"==",
"25.0"
]
]
},
{
"name": "parsimonious",
"specs": [
[
"==",
"0.10.0"
]
]
},
{
"name": "paypalrestsdk",
"specs": [
[
"==",
"1.13.3"
]
]
},
{
"name": "pluggy",
"specs": [
[
"==",
"1.6.0"
]
]
},
{
"name": "propcache",
"specs": [
[
"==",
"0.3.2"
]
]
},
{
"name": "pycparser",
"specs": [
[
"==",
"2.22"
]
]
},
{
"name": "pycryptodome",
"specs": [
[
"==",
"3.23.0"
]
]
},
{
"name": "pydantic",
"specs": [
[
"==",
"2.11.7"
]
]
},
{
"name": "pydantic_core",
"specs": [
[
"==",
"2.33.2"
]
]
},
{
"name": "pyOpenSSL",
"specs": [
[
"==",
"25.1.0"
]
]
},
{
"name": "pytest",
"specs": [
[
"==",
"7.4.4"
]
]
},
{
"name": "python-dotenv",
"specs": [
[
"==",
"1.1.1"
]
]
},
{
"name": "pyunormalize",
"specs": [
[
"==",
"16.0.0"
]
]
},
{
"name": "regex",
"specs": [
[
"==",
"2024.11.6"
]
]
},
{
"name": "requests",
"specs": [
[
"==",
"2.32.4"
]
]
},
{
"name": "rlp",
"specs": [
[
"==",
"4.1.0"
]
]
},
{
"name": "six",
"specs": [
[
"==",
"1.17.0"
]
]
},
{
"name": "stripe",
"specs": [
[
"==",
"12.3.0"
]
]
},
{
"name": "toolz",
"specs": [
[
"==",
"1.0.0"
]
]
},
{
"name": "types-requests",
"specs": [
[
"==",
"2.32.4.20250611"
]
]
},
{
"name": "typing-inspection",
"specs": [
[
"==",
"0.4.1"
]
]
},
{
"name": "typing_extensions",
"specs": [
[
"==",
"4.14.1"
]
]
},
{
"name": "urllib3",
"specs": [
[
"==",
"2.5.0"
]
]
},
{
"name": "web3",
"specs": [
[
"==",
"7.12.1"
]
]
},
{
"name": "websockets",
"specs": [
[
"==",
"15.0.1"
]
]
},
{
"name": "yarl",
"specs": [
[
"==",
"1.20.1"
]
]
}
],
"lcname": "aiagent-payments"
}