Skip to content
@Agentpay-Org

Agentpay-Org

AgentPay

Machine-to-Machine Payment Protocol on Stellar

AgentPay is a decentralized machine-to-machine (M2M) payment protocol built on the Stellar network that enables autonomous agents, APIs, software services, and IoT devices to pay each other instantly using micro-payments.

The protocol provides usage-based billing infrastructure for the emerging AI and automation economy — enabling services to charge per API call, per compute request, or per data query.

AgentPay acts as "Stripe for AI agents", allowing software systems to transact autonomously without human intervention.


1. Problem

The rapid growth of AI agents, APIs, and autonomous software services is creating a new type of economy where machines consume services from other machines.

Examples:

ScenarioDescription
AI Agent → APIAgent pays for data or compute
Autonomous Vehicle → Charging StationPays for electricity
Trading Bot → Analytics APIPays per market query
IoT Sensor → Data NetworkPays for storage or bandwidth

Current Challenges

ProblemImpact
No micro-billing infrastructureAPIs cannot charge per request
Payment rails too expensiveFees exceed transaction value
Manual billing systemsNot suitable for autonomous agents
No global protocolFragmented ecosystem
Lack of trustless settlementRequires centralized platforms

Most payment systems are not designed for high-frequency micro-transactions between machines.


2. Solution

AgentPay introduces a machine-to-machine payment protocol built on the Stellar blockchain.

Services can publish pricing models, and agents can pay automatically based on usage.

Core Idea

Machines interact economically without human involvement.

Workflow

  1. Service provider publishes API pricing
  2. AI agents deposit stablecoins
  3. Agent consumes service
  4. Usage is tracked
  5. Smart contracts settle payment automatically

Example:

AI Agent → Weather API
Cost: $0.002 per request

If the agent makes 1000 requests, the system automatically settles:

Total Payment = $2


3. Key Features

  • Pay-Per-Request Billing — Services can charge per API request, compute usage, bandwidth, dataset access
  • Autonomous Payments — AI agents can pay services without human approval
  • Global Micro-Transactions — Payments in fractions of a cent using stablecoins
  • Smart Contract Settlement — Usage and payments handled by Soroban smart contracts
  • API Marketplace — Developers can list APIs and earn revenue from autonomous agents

4. Why Stellar

FeatureBenefit
Ultra-low feesEnables micro-payments
Fast settlement~5 seconds
Stablecoin ecosystemUSDC / other tokens
Asset issuanceEasy token creation
Global accessibilityBorderless payments

5. Repository Structure

RepositoryDescription
agentpay-contractsSoroban smart contracts (escrow, settlement)
agentpay-backendAPI gateway, metering, billing (Express)
agentpay-frontendDashboard and wallet integration (Next.js)

6. System Architecture

  • AgentAgentPay GatewayUsage MeteringSoroban ContractStellar Network
  • Gateway forwards requests to API providers and records usage; contracts settle micro-payments.

7. Payment Flow

  1. Agent sends API request to Gateway
  2. Gateway forwards to API Provider
  3. Gateway records usage
  4. Contract updates usage and settles micro-payment on Stellar
  5. Provider receives stablecoin transfer

8. Tech Stack

  • Frontend: Next.js, React, TailwindCSS, Stellar wallet integration
  • Backend: Node.js, Express, gRPC microservices, REST APIs
  • Blockchain: Stellar, Soroban Smart Contracts, Horizon API
  • Infrastructure: Docker, PostgreSQL, Redis, Kafka

9. License

MIT

Popular repositories Loading

  1. Agentpay-frontend Agentpay-frontendPublic

    TypeScript 2 79

  2. .github .githubPublic

  3. Agentpay-backend Agentpay-backendPublic

    TypeScript 30

  4. Agentpay-contracts Agentpay-contractsPublic

    Rust 33

Repositories

Showing 4 of 4 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…