Algopay API
Algopay is an agent-native payment infrastructure on Algorand. AI agents initiate USDC payments on-chain with gas sponsored by a pre-funded LogicSig account — the paying agent never needs ALGO.
Base URL
https://api.algopay.xyz/apiAuthentication
All routes except /auth/* require a JWT Bearer token obtained from the OAuth flow.
Authorization: Bearer <jwt_token>Routes
| Prefix | Resource | Auth |
|---|---|---|
| /auth | OAuth login, token refresh, user identity | — |
| /keys | API key registration and validation | JWT |
| /gas-pool | USDC gas pool management | JWT |
| /agents | Agent creation and spend limits | JWT |
| /payments | Payment initiation and settlement | JWT |
| /webhooks | Webhook registration and delivery | JWT |
| /audit | Audit log retrieval | JWT |
Payment flow
1. POST /keys/register → get apiKeyId
2. POST /gas-pool → create pool (link apiKeyId, fund USDC)
3. POST /agents → create agent (link poolId, set daily limit)
4. POST /payments → initiate (status = pending)
5. POST /payments/:id/process → submit on-chain atomic group
txn[0] lsig fee=5000 (gas sponsor)
txn[1] xfer USDC → PaymentProcessor
txn[2] appl processPayment()
→ status = settled, webhook firedErrors
| Status | Meaning |
|---|---|
| 400 | Validation error or business rule violation |
| 401 | Missing or invalid JWT |
| 404 | Resource not found |
| 500 | Unexpected server error |
{ "error": "Agent daily limit exceeded" }