AgnicPay

AgnicPay Features

Core payment APIs for X402 payments, balance management, and transactions

AgnicPay Features

AgnicPay provides a suite of APIs for handling X402 payments, managing balances, and tracking transactions. These are the core building blocks for integrating AgnicPay into your applications.

Overview

FeatureEndpointDescription
X402 FetchPOST /api/x402/fetchTransparent payment proxy (recommended)
Sign PaymentPOST /api/sign-paymentManual X402 payment signing
BalanceGET /api/balanceCheck wallet USDC balance
TransactionsGET /api/transactionsView payment history
TradingPOST /api/tradeSwap tokens on Base via DEX aggregation

Base URL

https://api.agnic.ai

Authentication

All endpoints require authentication via API token or OAuth2:

# API Token
curl https://api.agnic.ai/api/balance \
  -H "X-Agnic-Token: agnic_tok_YOUR_TOKEN"
 
# OAuth2 Token
curl https://api.agnic.ai/api/balance \
  -H "Authorization: Bearer agnic_at_YOUR_OAUTH_TOKEN"

Quick Start

1. Make a Payment with X402 Fetch

curl -X POST "https://api.agnic.ai/api/x402/fetch?url=https://api.example.com/paid-endpoint" \
  -H "X-Agnic-Token: agnic_tok_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "Hello"}'

2. Check Your Balance

curl https://api.agnic.ai/api/balance \
  -H "X-Agnic-Token: agnic_tok_YOUR_TOKEN"

3. View Transaction History

curl https://api.agnic.ai/api/transactions \
  -H "X-Agnic-Token: agnic_tok_YOUR_TOKEN"

Features

On this page