Skip to main content

AgentPay Logo

AgentPay Gateway (`agentpay-gateway`)

Autonomous Agent Payment Gateway & Reverse Proxy for API Monetization

PyPI Version Documentation Follow @OpenAgentPay License: Apache-2.0 x402 V2 Python 3.10+ Circle USDC

📚 Documentation • 💻 GitHub Repository • 🐦 Follow on X (@OpenAgentPay) • 🐛 Report Issue


⚡ What is AgentPay Gateway?

agentpay-gateway sits directly in front of existing REST APIs, AI agent microservices, and compute endpoints. It monetizes incoming requests via standard HTTP 402 Payment Required challenges settled gaslessly on-chain (Circle USDC on Arbitrum Sepolia & Base) or via virtual tenant wallets.


🚀 Quickstart

1. Installation

pip install agentpay-gateway

2. Configuration (gateway.yaml)

version: "1.0"

server:
  host: "0.0.0.0"
  port: 8000
  db_path: "./data/gateway.db"

facilitator:
  url: "https://facilitator.agentpay.network"

settlement:
  default_network: "eip155:421614"                             # Arbitrum Sepolia
  default_asset: "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d"      # Circle USDC
  default_pay_to: "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"

routes:
  - path: "/v1/market-data"
    upstream: "https://httpbin.org/get"
    price: "0.001 USDC"

3. Running the Gateway

python3 -m agentpay_gateway.server --config ./gateway.yaml

🔒 Features

  • HTTP 402 x402 Protocol: Issues standard challenges containing pricing, settlement token, network, and validity window.
  • Off-Chain Signature Verification: Verifies EIP-712 authorizations with zero on-chain latency before forwarding upstream.
  • Idempotent Anti-Rollback: Decoupled state machine guarantees no double-charging on network dropouts.
  • Facilitator Integration: Coordinates with EVM facilitator nodes for asynchronous gasless settlement.

📖 Documentation & Community


📄 License

Apache-2.0 License. See LICENSE for details.

Metadata

Release files for agentpay-gateway 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agentpay-gateway 0.2.2
File Size Uploaded Provenance
agentpay_gateway-0.2.2.tar.gz 79.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for agentpay-gateway 0.2.2
File Interpreter ABI Platform
agentpay_gateway-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 182.4 kB

Release files / agentpay_gateway-0.2.2.tar.gz

Download URL agentpay_gateway-0.2.2.tar.gz
Size 79.7 kB
Tags Source
SHA-256 checksum
How to use checksums
23e8e2c4d9ef428947b3cbb65114f256f4448a6dfd6a20e540dbae283126d543
BLAKE2b-256 checksum
How to use checksums
5197076f531be474f74597ddaee77ad01b6780b0330473ce8c30ea3037ce4619
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.7

Release files / agentpay_gateway-0.2.2-py3-none-any.whl

Download URL agentpay_gateway-0.2.2-py3-none-any.whl
Size 102.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c789912991e2439b324830d8c29e3459bdffc91ed8c0d0e8b347e38ead2a73f7
BLAKE2b-256 checksum
How to use checksums
2412e1d7c3d549cd4119beffc15c1bb66aa5a8cd17e9ad52ca42f6c8ea2fda49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.7

Security for agentpay-gateway 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page