pay-sdk
Python and TypeScript SDKs for Pay -- the complete x402 payment stack for AI agents. USDC on Base.
Install
TypeScript:
npm install @pay-skill/sdkPython:
pip install payskillQuick Start
TypeScript:
import { Wallet } from "@pay-skill/sdk";
const wallet = await Wallet.create(); // OS keychain (same key as CLI)
await wallet.send("0xprovider", 5); // send $5
const response = await wallet.request("https://api.example.com/data"); // x402 auto-payPython:
from payskill import Wallet
wallet = Wallet() # reads key from OS keychain
wallet.send("0xprovider", 5) # send $5
response = wallet.request("https://api.example.com/data") # x402 auto-payBoth SDKs have identical API surfaces: 17 methods covering direct payments, tabs, x402 requests, webhooks, discovery, and wallet management. Dollar amounts by default.
SDK Documentation
Part of Pay
Pay is the complete x402 payment stack -- gateway, facilitator, SDKs, CLI, and MCP server -- that lets AI agents pay for APIs with USDC on Base.
- Documentation
- Architecture
- CLI -- Command-line tool
- pay-gate -- x402 payment gateway
- MCP Server -- Claude Desktop / Cursor / VS Code
- Protocol -- Smart contracts
License
MIT