POST
/api/x402/payRequest payment quote or process payment proof. Returns HTTP 402 when payment is required.
Request
Body:
{
"serviceId": "string (required)",
"amount": "string (optional)",
"proof": "object (optional)"
}Responses
- 200:Success - Payment verified, service fulfilled
- 402:Payment Required - Contains payment quote
POST
/api/x402/verifyVerify payment proof with PayAI facilitator. Supports X-PAYMENT header (x402 spec).
Request
Body:
{
"proof": "object (required)",
"settle": "boolean (optional)"
}Headers:
{
"X-PAYMENT": "string (optional) - JSON-encoded payment proof"
}Responses
- 200:Verification result with settlement details
GET
/api/marketplace/servicesList available x402 services from database. Supports filtering by category and merchant.
Request
Query Parameters:
{
"category": "string (optional)",
"merchant": "string (optional)",
"network": "string (optional, default: base)",
"chainId": "number (optional, default: 8453)"
}Responses
- 200:List of services with metadata
POST
/api/sync/payaiSync services from PayAI facilitator to database. Can be called manually or via cron.
Request
Headers:
{
"Authorization": "Bearer YOUR_SYNC_SECRET (optional)"
}Responses
- 200:Sync result with counts
GET
/api/panel/user/statsGet user statistics and summary. Requires wallet address authentication.
Request
Query Parameters:
{
"address": "string (required) - User wallet address"
}Responses
- 200:User stats with transaction summary
GET
/api/panel/platform/analyticsGet platform-wide analytics. Admin-only access.
Request
Query Parameters:
{
"period": "string (optional) - 7d, 30d, 90d, all"
}Responses
- 200:Platform analytics and metrics