PayBot

Mock Mode

Interactive Payment Flow Demo

Walk through the complete PayBot payment lifecycle. Each step makes real API calls to api.paybotcore.com in mock mode.

Step 1

Server Health Check

Verify the API is reachable and check audit chain integrity.

REQUEST
GET https://api.paybotcore.com/health
X-API-Key: pb_test_default_key
Step 2

Register & Login

Create a new operator account and obtain a JWT access token. A random email is generated per session to avoid conflicts.

REQUEST (register)
POST https://api.paybotcore.com/auth/register
Content-Type: application/json

{
  "email": "demo-...@paybot.demo",
  "password": "DemoPass123!"
}
Step 3

Register Bot

Register a bot at Trust Level 1 (Basic). This grants micropayment access up to $1.00 per transaction and $10.00 daily.

REQUEST
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
0Sandbox$0.00$0.000
1Basic$1.00$10.0010
2Verified$10.00$100.0050
3Trusted$100.00$1,000.00200
4Premium$1,000.00$10,000.00500
5EnterpriseCustomCustom9999
Step 4

Check Balance & Limits

Query the bot's current spending status and remaining daily limits.

REQUEST
GET https://api.paybotcore.com/balance?botId=demo-bot-...
Authorization: Bearer <token>
Step 5

Pay (Verify + Settle)

Execute a $0.05 USDC payment. First verify (5-gate trust check + commission injection), then settle (mock on-chain execution).

REQUEST (verify)
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
  }
}
Step 6

Audit Trail

Retrieve the bot's tamper-evident event history. Each event is hash-chained to the previous one, making unauthorized modifications detectable.

REQUEST
GET https://api.paybotcore.com/history?botId=demo-bot-...&limit=10
Authorization: Bearer <token>