# OwnPay — Unified Human + Agentic Payment Infrastructure > The Unified Payment Rail for SaaS, E-Commerce, and the Agent Economy — Built Natively on Base (Chain ID 8453). ## Core Overview OwnPay unifies human checkout and autonomous AI machine-to-machine payments into a single non-custodial infrastructure. - Network: Base Mainnet (Chain ID 8453) - Testnet: Base Sepolia (Chain ID 84532) - Settlement Asset: Native Base USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) - Finality: Under 2 seconds - Gas Cost: <$0.001 per transaction (EIP-4337 Gasless Paymaster supported) ## Key Endpoints & API Reference ### 1. Unified Master Endpoints (`/v1`) - `POST /v1/agents`: Register autonomous AI agent, provision non-custodial smart account, assign risk policy. - `GET /v1/agents`: List all active agents and real-time balances. - `POST /v1/agents/:id/freeze`: Emergency kill-switch to immediately freeze agent wallet. - `POST /v1/payments`: Universal payment dispatch (routes automatically to Level 1 autonomous, Level 2 policy check, or Level 3 human review). - `GET /v1/approvals`: List pending Level 3 human approvals. - `POST /v1/approvals/:id/decide`: Approve or reject high-risk agent payment. - `GET /v1/ledger`: Double-entry cryptographic settlement journal. - `GET /v1/ledger/stats`: Volume breakdown (Human vs Agentic volume split). - `GET /v1/audit-logs`: Immutable security audit log. ### 2. Human Merchant Intents (`/api/v1`) - `POST /api/v1/intents`: Create fiat payment intent (converts BDT, USD, EUR, INR to Base USDC). - `GET /api/v1/intents/:id`: Poll intent status or verify on-chain tx hash. - `POST /api/v1/paymaster/sponsor`: Gasless EIP-4337 UserOp sponsorship. - `POST /api/v1/sandbox/faucet`: Testnet simulator for instant intent confirmation on Base Sepolia. ### 3. HTTP 402 Micropayments (`x402 Protocol`) - `GET /api/v1/x402/data-feed`: Pay-per-API data stream requiring HTTP 402 handshake. - `GET /api/v1/x402/ai-compute`: Pay-per-token model inference rail. ## Client Integration Guide ### TypeScript SDK (`@ownpay/sdk`) ```typescript import { OwnPayClient, OwnPayAgentClient } from '@ownpay/sdk'; // Human Merchant Checkout const client = new OwnPayClient({ apiKey: process.env.OWNPAY_API_KEY, environment: 'live' // Base Mainnet (8453) }); const intent = await client.intents.create({ order_id: 'ORDER-101', amount: 15.50, currency: 'USD' }); // Autonomous AI Agent with transparent x402 intercept const agent = new OwnPayAgentClient({ agentId: 'agent_99', apiKey: process.env.OWNPAY_AGENT_KEY, chain: 'base' }); const data = await agent.fetchWithX402('https://api.merchant.com/v1/feed'); ``` ## Model Context Protocol (MCP) Server Configuration Add OwnPay to `mcp.json`: ```json { "mcpServers": { "ownpay": { "command": "npx", "args": ["-y", "@ownpay/mcp-server@latest"], "env": { "OWNPAY_API_KEY": "own_live_YOUR_KEY", "BASE_CHAIN_ID": "8453" } } } } ``` ## Agent Skills Install official agent skills: ```bash npx skills add ownpay/skills ``` ## Documentation Pages - Full Interactive Docs Portal: /docs - Developer API Reference: /docs?tab=api - Merchant Portal & Settings: /dashboard - Hosted Checkout & Payment Links: /pay - POS Checkout Simulator: / - x402 Live Console: / - Institutional Investment Memorandum: /