API Reference

REST API endpoints for the AlgoPay control plane at https://algopay-sdk-pay-b17a.vercel.app.

Authentication

Agent API calls use Bearer token authentication with API keys generated in the dashboard.

Authorization: Bearer YOUR_API_KEY

Endpoints

POST
/api/agent/pay

Execute a USDC payment from the agent's vault wallet

GET
/api/wrapped/md

Fetch wrapped API catalog (markdown)

POST
/api/wrapped/:provider/:endpoint

Call a wrapped API endpoint

POST
/api/x402/:slug

Call a custom x402 endpoint

GET
/api/checkout

List checkout sessions

POST
/api/checkout

Create a checkout session

GET
/api/wallets/balance

Query USDC balance for an address

Agent Pay

POST https://algopay-sdk-pay-b17a.vercel.app/api/agent/pay
Authorization: Bearer YOUR_API_KEY

{
  "to": "RECIPIENT_ALGO_ADDRESS",
  "amount": 5.00,
  "purpose": "API call fee"
}

// Response
{
  "success": true,
  "txId": "ALGO_TX_ID",
  "amount": "5.00",
  "status": "settled"
}

Error Codes

StatusMeaning
200Success
202Pending approval
400Invalid request
403Policy check failed or endpoint disabled
404Unknown provider or endpoint
502Upstream API call failed (not charged)