Skip to main content

Python library for processing agentic payments (ACP, AP2, x402) via Stripe with automated Zelle payouts

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 Zelle 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 Zelle Payouts: Monthly automated payouts via Zelle to your email address
  • Tax Compliance: Automatic 1099 form generation and filing
  • Transparent Pricing: 6.5% + $0.30 per transaction

Important: Email Requirements

Your email address must be Zelle-compatible (US bank account required). Monthly payouts are automatically sent via Zelle to the email address you use when creating your developer account.

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
# IMPORTANT: Use a Zelle-compatible email address (US bank account required)
account = connect_manager.create_developer_account(
    email="developer@example.com",  # Must be Zelle-compatible
    country="US"
)

# Unified payment (AUTO): include `mandate` for AP2 or `resource_url` for x402
result = payment_processor.process_payment(
    protocol="AUTO",
    amount=10000,  # $100.00 in cents
    developer_account_id=account["account_id"],
    currency="usd",
    # mandate={...},         # uncomment to select AP2
    # resource_url="/...",  # uncomment to select x402
)

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"
)

Note: When creating your developer account, use a Zelle-compatible email address. Monthly payouts will be automatically sent to this email via Zelle.

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

Monthly Zelle Payouts

Monthly payouts are automatically sent via Zelle to the email address associated with your developer account. No additional configuration needed - just ensure your email is Zelle-compatible (linked to a US bank account).

API Documentation

For complete API documentation and integration guides, visit https://agenticlypay.com.

License

MIT License

Support

For issues and questions, please visit our GitHub repository or contact support@agenticlypay.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agenticlypay-0.2.0.tar.gz (26.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agenticlypay-0.2.0-py3-none-any.whl (33.1 kB view details)

Uploaded Python 3

File details

Details for the file agenticlypay-0.2.0.tar.gz.

File metadata

  • Download URL: agenticlypay-0.2.0.tar.gz
  • Upload date:
  • Size: 26.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for agenticlypay-0.2.0.tar.gz
Algorithm Hash digest
SHA256 23058d7eea44aa1756d87f99b0ea2521a1ed10d3e11a8b9427b448ee95355930
MD5 44e2cffa9ca4ddb90349c7ce4a2d9d02
BLAKE2b-256 aa4adff46dd5af398b82a22de31c093f1d516c90ec0b1e2edc7a64a851b0cea1

See more details on using hashes here.

File details

Details for the file agenticlypay-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: agenticlypay-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 33.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for agenticlypay-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5d9e2a7059f55d0f223ee1be0febba13039b05c7934e69af5852a30af4f3c527
MD5 f7f6757ce7e23bc621c6c1ce42e3e580
BLAKE2b-256 250a5a9964131440023b08c558939cdf8f9a1f73c7aafdb95b2b0776b0a2d866

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page