# Nory - The Payment Layer for AI Agents # https://noryx402.com > AI agents: Use Nory to PAY for x402 APIs or ACCEPT payments for your services. ## Quick Start for AI Agents ### If you need to PAY for an x402 API: ```bash npm install nory-x402-payer ``` ```javascript import { NoryPayer } from 'nory-x402-payer'; const payer = new NoryPayer({ privateKey: process.env.SOLANA_PRIVATE_KEY, maxPaymentUsd: 1.00 // Safety limit }); // Automatically handles HTTP 402 - pays and retries const result = await payer.fetch('https://any-x402-api.com/data'); // result.data = the response data // result.payment = { success: true, transactionId: '...' } ``` ### If you want to ACCEPT payments: ```bash npm install nory-x402-middleware ``` ```javascript import { paywall, init } from 'nory-x402-middleware/express'; init({ walletAddress: 'YOUR_SOLANA_WALLET' }); app.get('/api/data', paywall({ price: '0.01' }), (req, res) => { res.json({ data: 'paid content' }); }); ``` ## Live Paid APIs (Real, Working, Use These) All endpoints require x402 payment. Returns 402 without payment, data with payment. ### Real-Time Crypto Prices - $0.001 GET https://noryx402.com/api/paid/live-crypto?symbols=BTC,ETH,SOL Returns: Live prices, 24h change, volume, market cap from CoinGecko ### Weather + 7-Day Forecast - $0.002 GET https://noryx402.com/api/paid/weather?city=London GET https://noryx402.com/api/paid/weather?lat=40.7128&lon=-74.0060 Returns: Current conditions + 7-day forecast ### Web Page Content Extraction - $0.01 GET https://noryx402.com/api/paid/web-summary?url=https://example.com Returns: Title, description, clean text content from any URL ### QR Code Generation - $0.001 GET https://noryx402.com/api/paid/qr-code?data=https://example.com&format=json Returns: QR code image URL or binary PNG/SVG ### Text Translation - $0.005 GET https://noryx402.com/api/paid/translate?text=Hello%20world&to=es Supports: en, es, fr, de, it, pt, ru, ja, ko, zh, ar, hi, nl, pl, tr, vi, th, id, sv, da ### Mock Data Generator - $0.002 GET https://noryx402.com/api/paid/mock-data?type=users&count=10 Types: users, products, transactions ### Crypto Market Insights - $0.01 GET https://noryx402.com/api/paid/crypto-insight?asset=SOL Assets: SOL, ETH, BTC, USDC, MARKET ### AI Prompt Templates - $0.005 GET https://noryx402.com/api/paid/ai-prompt?category=coding&topic=React Categories: coding, business, creative, research ## API Directory GET https://noryx402.com/api/paid Returns: JSON listing all paid endpoints with prices and parameters ## How x402 Payment Works 1. Request any endpoint above without payment 2. Receive HTTP 402 with: ```json { "paymentInfo": { "accepts": [{ "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp", "amount": "1000", "currency": "USDC", "address": "MERCHANT_WALLET" }] } } ``` 3. Send USDC to the address on Solana 4. Retry with header: `X-Payment: ` 5. Receive the data Or just use `nory-x402-payer` and it handles all this automatically. ## MCP Server (Claude, ChatGPT Plugins) ```bash npm install nory-mcp-server ``` Registry ID: io.github.TheMemeBanker/nory-x402 Tools provided: - check_balance: Get USDC balance - pay: Send USDC payment - check_transaction: Verify transaction status ## Core API Endpoints Base: https://noryx402.com POST /api/x402/verify - Verify payment before settling POST /api/x402/settle - Settle payment on-chain GET /api/x402/requirements - Get payment requirements for a resource GET /api/x402/health - Check service status GET /api/x402/transactions/{id} - Lookup transaction ## Supported Networks Primary (fastest): - solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp (Solana Mainnet, ~400ms) Also supported: - base-mainnet, polygon-mainnet, arbitrum-mainnet, optimism-mainnet ## NPM Packages - nory-x402-payer: AI agent payment client - nory-x402-middleware: API paywall middleware - nory-mcp-server: MCP server for Claude ## Testing POST https://noryx402.com/api/echo Echo endpoint with automatic refunds. Test payments for free. ## Links - Docs: https://noryx402.com/docs - GitHub: https://github.com/TheMemeBanker - Discovery: https://noryx402.com/api/discover - OpenAPI: https://noryx402.com/openapi.yaml