Python library and API for processing agentic payments (ACP, AP2, x402) via Stripe
Project description
AgenticlyPay
A Python library for processing agentic payments (ACP, AP2, x402) via Stripe. Built for agentic developers who need automated payment processing, monthly payouts, and tax compliance.
Features
- Multi-Protocol Support: Process payments using ACP (Agentic Commerce Protocol), AP2 (Agent Payments Protocol), or x402 protocols
- Stripe Connect Integration: Seamless onboarding and account management for developers
- Automated Payouts: Monthly automated payouts to developer Stripe accounts
- Tax Compliance: Automatic 1099 form generation and filing
- Transparent Pricing: 6.5% + $0.30 per transaction
- RESTful API: Complete API for integration into any application
Installation
pip install agenticlypay
Quick Start
Basic Usage
from agenticlypay import PaymentProcessor, ConnectManager
# Initialize components
payment_processor = PaymentProcessor()
connect_manager = ConnectManager()
# Create a developer account
account = connect_manager.create_developer_account(
email="developer@example.com",
country="US"
)
# Process an ACP payment
result = payment_processor.process_payment(
protocol="ACP",
amount=10000, # $100.00 in cents
developer_account_id=account["account_id"],
currency="usd"
)
ACP Payment Example
from agenticlypay import PaymentProcessor
processor = PaymentProcessor()
result = processor.process_payment(
protocol="ACP",
amount=10000, # $100.00 in cents
currency="usd",
developer_account_id="acct_xxxxx",
description="Payment for service"
)
AP2 Payment Example
result = processor.process_payment(
protocol="AP2",
amount=10000,
currency="usd",
developer_account_id="acct_xxxxx",
mandate={
"agent_id": "agent_123",
"user_id": "user_456",
"permissions": ["create_payment", "complete_purchase"],
"expires_at": 1735689600,
"mandate_id": "mandate_789"
}
)
x402 Payment Example
result = processor.process_payment(
protocol="x402",
amount=10000,
currency="usd",
developer_account_id="acct_xxxxx",
resource_url="/api/data/endpoint"
)
Configuration
Set environment variables or use a .env file:
STRIPE_SECRET_KEY=sk_live_...
STRIPE_WEBHOOK_SECRET=whsec_...
PLATFORM_FEE_PERCENTAGE=0.065
PLATFORM_FEE_FIXED=30
API Documentation
For complete API documentation and integration guides, visit: https://agenticlypay-frontend-r6zgzqpgja-uc.a.run.app
License
MIT License
Support
For issues and questions, please visit our GitHub repository or contact support@agenticlypay.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agenticlypay-0.1.0.tar.gz.
File metadata
- Download URL: agenticlypay-0.1.0.tar.gz
- Upload date:
- Size: 19.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73bf367cad65606070852bba4bd5133c52b278ea2c41eb415b0a2750ea18c027
|
|
| MD5 |
50337d86153c82b88b9b8edafba403ff
|
|
| BLAKE2b-256 |
eff1190269a755f3b1121c3e60391b825cbebc442720854e60d3bde77a030f4e
|
File details
Details for the file agenticlypay-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agenticlypay-0.1.0-py3-none-any.whl
- Upload date:
- Size: 25.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2a74a1d3f96db2a17a845e6c682320eeac3df2cc17de0d51db87c50993656af
|
|
| MD5 |
61a11d357d4ebf5dc6e092d994159873
|
|
| BLAKE2b-256 |
82f88be8c9a32f70b3e60f826ea0e5f26731c4079a9e91b37f58ce680ea02b1a
|