PayAgent Documentation
Crypto payments for humans and AI agents. Built by LCX (Liberty Crypto Exchange).
AI agents are becoming economic actors. They buy compute, pay APIs, settle micro-transactions, and transact with other agents. PayAgent is the financial infrastructure for this new economy.
PayAgent is built for:
Free for Humans
Create payment links and pay directly from your wallet. Non-custodial, full control.
For AI Agents & Developers
Programmable payment rails via API. Agents create links, pay, and earn rewards autonomously.
Link-Based Settlement
Every payment is a link. Share with anyone, human or agent. Settles instantly on-chain.
Earn LCX with Every Payment
Payment link creators earn LCX token rewards on every successful settlement.
Quick Summary
What PayAgent Does
- Free for humans to create payment links
- Programmable payment rails for AI agents, firms, and developers via API
- Get paid in stablecoins (USDC, USDT, USAT)
- Earn LCX tokens for every completed payment
- Pay small, flat network fees in LCX (auto-swapped via Uniswap if needed)
- Automate agent-to-agent payments without human intervention
Supported Today
| Property | Value |
|---|---|
| Network | Ethereum Live |
| Assets (Standard) | USDC, USDT, USAT |
| Assets (Pro) | Any ERC-20 token on Ethereum |
| Fees | Paid in LCX |
| Custody | Non-custodial |
Key Concepts
Humans vs AI Agents
| Role | Description |
|---|---|
| Human ๐ค | Creates payment links manually via UI |
| AI Agent ๐ค | Creates and pays links autonomously via API |
Both follow the same economic rules. Both earn LCX rewards.
Stablecoins vs LCX
Fees and Rewards
Standard Mode
| Property | Value |
|---|---|
| Network Fee | 2 LCX |
| Creator Reward | 1 LCX |
| Service Fee | 1 LCX |
| Supported Assets | USDC, USDT, USAT |
Pro Mode
| Property | Value |
|---|---|
| Network Fee | 4 LCX |
| Creator Reward | 2 LCX |
| Service Fee | 2 LCX |
| Supported Assets | Any ERC-20 token on Ethereum |
Fee Details
The payer covers the fee. Fee is paid in LCX token (preferred) or deducted from the payment token (fallback). Payer only needs the payment token + ETH for gas.
| Scenario | Behavior |
|---|---|
| Payer has โฅ 4 LCX | 4 LCX fee (2 platform + 2 creator reward). Creator gets full amount. |
| Payer has < 4 LCX | Fee deducted from payment token (50/50 split). Creator gets amount minus fee. |
| ETH payments | Fee converted to ETH equivalent using live price. |
Fees are LCX-denominated, not USD-based. At current pricing: 2 LCX โ $0.08 (at $0.04/LCX). If a payer does not hold enough LCX, the amount is auto-sourced via Uniswap.
Human payers: use GET /api/request/:id/fee?payer=0x... (public, no auth) to get fee breakdown and transfer instructions.
Supported Assets
Standard Mode 2 LCX Fee
| Asset | Type |
|---|---|
| USDC | Stablecoin (USD) |
| USDT | Stablecoin (USD) |
| USAT | Stablecoin |
Pro Mode 4 LCX Fee
Any ERC-20 token on Ethereum. Designed for advanced users, AI agents, and integrators who need flexibility beyond stablecoins.
For Humans
Create shareable links instantly and get paid. Connect your wallet, choose an amount and asset, generate a link, and share it.
- Connect your non-custodial wallet
- Choose amount and asset
- Generate payment link
- Share the link with anyone
- Earn LCX when the link is paid
For AI Agents, Firms, and Developers
PayAgent provides programmable, automated payment rails via API. Flat, predictable fees in LCX tokens. No percentages, no hidden costs.
- Create payment links via API
- Pay links autonomously
- Earn LCX rewards on every settlement
- Operate without human intervention
- Agent creates a payment request via API
- Another agent or human pays the link
- Settlement occurs automatically on-chain
- LCX rewards distributed to the creator agent
API Overview
PayAgent is a crypto payment infrastructure platform for AI agents. Register your agent, get HMAC credentials, and let your agents create and pay payment links programmatically.
Base URL
https:/.payagent.co/api
npm Package
Install the PayAgent SDK for agent integrations:
npm install @payagent/sdk ethers
Quick Example
// Create a payment link
const link = await payagent.createLink({
amount: "100",
asset: "USDC",
mode: "standard"
});
// Returns: { linkId, url, status, fee: "2 LCX" }HMAC Authentication
All API requests from agents are authenticated using HMAC-SHA256 signing. Your api_secret never leaves your environment โ only the computed signature is sent over the wire.
Required Headers
| Header | Description |
|---|---|
x-api-key-id | Public identifier โ pk_live_... |
x-timestamp | Unix epoch seconds (must be within 5 min of server time) |
x-signature | HMAC-SHA256 hex digest of the string-to-sign |
String-to-Sign Format
# Format: # timestamp\nMETHOD\npath\nSHA256(body) # Replay protection: timestamp must be within 5 minutes of server time
Shell Signing Helper
#!/bin/bash
KEY_ID="pk_live_YOUR_KEY_ID"
SECRET="sk_live_YOUR_SECRET"
METHOD=$1 # GET or POST
PATH_=$2 # /api/create-link
BODY=$3 # '{"amount":"10"}' or ''
TS=$(date +%s)
BODY_HASH=$(echo -n "$BODY" | shasum -a 256 | cut -d' ' -f1)
STRING_TO_SIGN="${TS}\n${METHOD}\n${PATH_}\n${BODY_HASH}"
SIG=$(echo -ne "$STRING_TO_SIGN" | openssl dgst -sha256 -hmac "$SECRET" | cut -d' ' -f2)
echo "x-api-key-id: $KEY_ID"
echo "x-timestamp: $TS"
echo "x-signature: $SIG"Agent Registration
Step 1: Register Your Agent
Register via cURL. Complete X verification to get your HMAC credentials (api_key_id + api_secret).
curl -X POST https://api.payagent.co/api/agents/register \
-H "Content-Type: application/json" \
-d '{
"username": "my-agent",
"email": "dev@example.com",
"wallet_address": "0xYourWalletAddress"
}'
# Response:
# {
# "success": true,
# "agent_id": "agent_my-agent_a1b2c3",
# "verification_challenge": "payagent-verify-my-agent-abc123",
# "instructions": "Post the challenge to X, then call /api/agents/verify-x"
# }
# After X verification โ you receive HMAC credentials:
# {
# "api_key_id": "pk_live_abc123...",
# "api_secret": "sk_live_xyz789...",
# "api_key_expires_at": "2026-02-21T..."
# }
# Save both โ they will NOT be shown again.Step 2: Verify on X (Twitter)
Post the verification challenge to X (Twitter), then call the verify endpoint with your tweet URL. On success, you'll receive your HMAC credentials.
# 1. Post to X (Twitter):
# "payagent-verify-my-agent-abc123"
# 2. Call verify endpoint with your tweet URL:
curl -X POST https://api.payagent.co/api/agents/verify-x \
-H "Content-Type: application/json" \
-d '{
"username": "my-agent",
"tweet_url": "https://x.com/yourhandle/status/1234567890"
}'
# Response (save both credentials โ shown ONCE):
# {
# "success": true,
# "api_key_id": "pk_live_abc123...",
# "api_secret": "sk_live_xyz789...",
# "api_key_expires_at": "2026-02-21T...",
# "x_username": "yourhandle"
# }POST /api/agents/rotate-key to regenerate before expiry.SDK & Payments
Install @payagent/sdk v0.2.0+. The SDK handles HMAC signing, transaction signing, broadcasting, and verification automatically.
Installation
npm install @payagent/sdk ethers
Full Implementation Example
const { PayAgentClient } = require('@payagent/sdk');
// โโ Initialize the client โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
const client = new PayAgentClient({
apiKeyId: 'pk_live_YOUR_KEY_ID', // public identifier
apiSecret: 'sk_live_YOUR_SECRET', // signing secret (never transmitted)
privateKey: process.env.WALLET_PRIVATE_KEY,
baseUrl: 'https:/.payagent.co/api',
});
console.log('Wallet address:', client.address);
// โโ Create a payment link โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
const link = await client.createLink({
amount: '10',
network: 'sepolia', // 'sepolia' | 'ethereum' | 'base'
token: 'USDC', // 'USDC' | 'USDT' | 'ETH' | 'LCX'
description: 'Service fee',
});
console.log('Link created:', link.linkId);
// โโ Pay a link (one call) โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
const result = await client.payLink(link.linkId);
console.log('Status:', result.status); // 'PAID'
for (const tx of result.transactions) {
console.log(` ${tx.description}: ${tx.txHash} (${tx.status})`);
}
// โโ Or step-by-step for more control โโโโโโโโโโโโโโโโโโโโ
const instructions = await client.getInstructions('REQ-ABC123');
// ... sign & broadcast yourself ...
const verification = await client.verifyPayment('REQ-ABC123', '0xTxHash');Create a Payment Link (cURL)
network is required. Supported: sepolia, ethereum, base. All requests use HMAC signing.
curl -X POST https://api.payagent.co/api/create-link \
-H "Content-Type: application/json" \
-H "x-api-key-id: pk_live_YOUR_KEY_ID" \
-H "x-timestamp: $(date +%s)" \
-H "x-signature: <computed HMAC signature>" \
-d '{
"amount": "10",
"network": "ethereum",
"token": "USDC",
"description": "Service fee"
}'
# Response:
# {
# "success": true,
# "linkId": "REQ-ABC123",
# "link": "/r/REQ-ABC123",
# "network": "ethereum",
# "token": "USDC",
# "amount": "10"
# }SDK Methods Reference
| Method | Description |
|---|---|
client.payLink(linkId) | Fetch instructions, sign, broadcast, and verify in one call |
client.createLink({ ... }) | Create a payment link (amount, network, token, description) |
client.getInstructions(linkId) | Fetch transfer instructions only (for manual control) |
client.verifyPayment(id, txHash) | Verify a payment by transaction hash |
client.getChains() | List supported chains and tokens |
client.address | Your wallet address (read-only property) |
AI Chat (Natural Language)
Talk to PayAgent AI (powered by Grok). It can create links, check status, and more. When creating a link, the AI will ask which chain to use.
curl -X POST https://api.payagent.co/api/chat \
-H "Content-Type: application/json" \
-H "x-api-key-id: pk_live_YOUR_KEY_ID" \
-H "x-timestamp: $(date +%s)" \
-H "x-signature: <computed>" \
-d '{ "message": "Create a 5 USDC payment link on base" }'Webhooks
Register webhook URLs to receive real-time notifications when payment events occur.
curl -X POST https://api.payagent.co/api/webhooks \
-H "Content-Type: application/json" \
-H "x-api-key-id: pk_live_YOUR_KEY_ID" \
-H "x-timestamp: $(date +%s)" \
-H "x-signature: <computed>" \
-d '{
"url": "https://your-agent.com/webhook",
"events": ["payment.paid", "payment.created"]
}'
# Events: payment.created, payment.paid, payment.expired
# Payloads include HMAC-SHA256 signature in X-PayAgent-Signature header| Event | Triggered When |
|---|---|
payment.created | A new payment link is created |
payment.paid | A payment link is settled on-chain |
payment.expired | A payment link expires without being paid |
Key Management
API keys expire after 10 days. Rotate, deactivate, or delete your agent. These actions require JWT authentication (wallet login) or can be done from the dashboard.
# Rotate API Key (JWT required โ via dashboard wallet login)
curl -X POST https://api.payagent.co/api/agents/rotate-key \
-H "Authorization: Bearer <your_jwt_token>"
# Response (save both โ shown ONCE):
# {
# "api_key_id": "pk_live_new_id...",
# "api_secret": "sk_live_new_secret...",
# "expires_at": "2026-02-23T..."
# }
# Deactivate Agent (soft โ can be reactivated)
curl -X POST https://api.payagent.co/api/agents/deactivate \
-H "Authorization: Bearer <your_jwt_token>"
# Delete Agent (soft โ payment history preserved)
curl -X DELETE https://api.payagent.co/api/agents/me \
-H "Authorization: Bearer <your_jwt_token>"Dashboard Authentication (Wallet)
The browser dashboard uses wallet-based authentication โ no secrets in the browser. Connect your wallet, sign a challenge message, and get a short-lived JWT session.
# 1. Get challenge nonce
POST /api/auth/challenge
{ "wallet_address": "0x..." }
โ { "nonce": "Sign this to login to PayAgent: abc123...", "expires_in": 300 }
# 2. Sign nonce with wallet (EIP-191) and verify
POST /api/auth/verify
{ "wallet_address": "0x...", "signature": "0x..." }
โ { "token": "eyJ...", "expires_in": 3600, "agent": { ... } }
# 3. Use JWT for dashboard actions
GET /api/agents/me
Authorization: Bearer eyJ...Authentication Methods Summary
| Method | Used By | How It Works |
|---|---|---|
| HMAC-SHA256 | SDK / AI Agents / cURL | x-api-key-id + x-timestamp + x-signature. Secret stays in your environment. |
| Wallet JWT | Browser Dashboard | Wallet signature (EIP-191) to get a 1-hour JWT. No secrets in the browser. |
| None (Public) | Anyone | /api/chains, /api/stats, /api/request/:id, /api/auth/* |
All Endpoints
Public (No Auth)
HMAC-Signed (SDK / Agents / cURL)
HMAC or JWT (Both Auth Methods)
JWT Only (Dashboard / Wallet Login)
Chains & Tokens
| Chain | Identifier |
|---|---|
| Ethereum Mainnet Live | ethereum |
| Base Mainnet Live | base |
| Sepolia Testnet Testnet | sepolia |
Tokens per chain: USDC, USDT, ETH (native), LCX. Query GET /api/chains for full details including contract addresses.
Network & Roadmap
Current
Ethereum mainnet. Live
Planned
| Feature | Status |
|---|---|
| Ethereum L2s (Base, Arbitrum, Optimism) | Planned |
| Liberty Chain by LCX | Planned |
| Advanced agent permissions | Planned |
| Volume-based fee tiers | Planned |
| Agent framework integrations (LangChain, AutoGPT, CrewAI) | Planned |
Security & Custody
- Non-custodial. PayAgent never holds user funds.
- Users and agents retain full control of their private keys at all times.
- Settlement happens on-chain via smart contracts.
- All transactions are publicly verifiable on Ethereum.
- HMAC secrets never leave your environment โ only signatures are transmitted.
- Dashboard uses wallet-signed JWT โ no secrets stored in browser.
FAQ
Is PayAgent free?
For humans, creating payment links is free. The payer covers a flat 2 LCX fee (~$0.08) plus Ethereum gas.
Who earns LCX?
The creator of the payment link, whether human or AI agent. 1 LCX per Standard, 2 LCX per Pro.
Who pays the fee?
The payer. If the payer doesn't hold LCX, it is auto-swapped via Uniswap.
Can AI agents use PayAgent?
Yes. Agents create links, pay, and earn rewards via API without human intervention.
Is PayAgent custodial?
No. Fully non-custodial. Users and agents control their own funds and keys.
What about gas fees?
Standard Ethereum gas fees apply and are paid by the payer, in addition to the flat LCX network fee.
How do API keys work?
After X verification, you receive a public key ID and a secret. Keys expire after 10 days and can be rotated via dashboard or API.
Is this a beta?
Yes. PayAgent is a beta product launch by LCX AI Labs.
Legal & Disclaimer
PayAgent is developed by LCX AI Labs. This is a beta product launch.
PayAgent is provided "as is" and may change. Users are responsible for complying with applicable laws. Terms of service are governed by LCX International.
PayAgent settles value in stablecoins, charges flat LCX network fees, and rewards creators on every payment.
PayAgent developed by LCX AI Labs. Beta product launch.