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.3

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.3
File Size Uploaded Provenance
agentpay_gateway-0.2.3.tar.gz 79.8 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 182.6 kB

Release files / agentpay_gateway-0.2.3.tar.gz

Download URL agentpay_gateway-0.2.3.tar.gz
Size 79.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1e0686afeaa32f1308b7bf9b3843f5a946b838d6c79cb3a6fd175173f1b3739c
BLAKE2b-256 checksum
How to use checksums
b39ef6e059bc13503056c6fe198fd824f245c986d13c488956f762e7da0dfa5b
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.3-py3-none-any.whl

Download URL agentpay_gateway-0.2.3-py3-none-any.whl
Size 102.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a307725033f31ea60da23f4a618114a2a6fb8a247b57a56d87f092b3ea197636
BLAKE2b-256 checksum
How to use checksums
20a762f1e93e827a434a7e61286ca5b3d63b3e8f4e43d20b17ad7a7e93a85271
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.3

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