Interactive Payment Flow Demo
Walk through the complete PayBot payment lifecycle. Each step makes real API calls to api.paybotcore.com in mock mode.
Server Health Check
Verify the API is reachable and check audit chain integrity.
GET https://api.paybotcore.com/health
X-API-Key: pb_test_default_key
Register & Login
Create a new operator account and obtain a JWT access token. A random email is generated per session to avoid conflicts.
POST https://api.paybotcore.com/auth/register
Content-Type: application/json
{
"email": "demo-...@paybot.demo",
"password": "DemoPass123!"
}
Register Bot
Register a bot at Trust Level 1 (Basic). This grants micropayment access up to $1.00 per transaction and $10.00 daily.
POST https://api.paybotcore.com/bots
Authorization: Bearer <token>
Content-Type: application/json
{
"botId": "demo-bot-...",
"trustLevel": 1
}
View Trust Level Table
| Level | Name | Max Tx | Daily Limit | Tx/Hour |
|---|---|---|---|---|
| 0 | Sandbox | $0.00 | $0.00 | 0 |
| 1 | Basic | $1.00 | $10.00 | 10 |
| 2 | Verified | $10.00 | $100.00 | 50 |
| 3 | Trusted | $100.00 | $1,000.00 | 200 |
| 4 | Premium | $1,000.00 | $10,000.00 | 500 |
| 5 | Enterprise | Custom | Custom | 9999 |
Check Balance & Limits
Query the bot's current spending status and remaining daily limits.
GET https://api.paybotcore.com/balance?botId=demo-bot-...
Authorization: Bearer <token>
Pay (Verify + Settle)
Execute a $0.05 USDC payment. First verify (5-gate trust check + commission injection), then settle (mock on-chain execution).
POST https://api.paybotcore.com/verify
Authorization: Bearer <token>
Content-Type: application/json
{
"botId": "demo-bot-...",
"payload": {
"x402Version": 1,
"resource": "https://api.example.com/data",
"accepted": true,
"payload": "payer:0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
},
"requirements": {
"scheme": "exact",
"network": "eip155:84532",
"asset": "eip155:84532/erc20:0x036CbD53842c5426634e7929541eC2318f3dCF7e",
"amount": "50000",
"payTo": "0x0000000000000000000000000000000000000001",
"maxTimeoutSeconds": 60
}
}
Audit Trail
Retrieve the bot's tamper-evident event history. Each event is hash-chained to the previous one, making unauthorized modifications detectable.
GET https://api.paybotcore.com/history?botId=demo-bot-...&limit=10
Authorization: Bearer <token>
Each event's hash incorporates the previous event hash, forming a tamper-evident chain. If any event is modified or deleted, subsequent hashes will not match.