{"title":"PylunPay API Documentation","version":"1.0.0","baseUrl":"/api","authentication":{"type":"Bearer Token","header":"Authorization: Bearer pp_live_...","note":"Create API keys via POST /api/keys (admin only)"},"endpoints":[{"group":"Games","routes":[{"method":"GET","path":"/api/games","description":"List all registered games","auth":false},{"method":"GET","path":"/api/games/owner/:address","description":"List games owned by wallet address","auth":false},{"method":"GET","path":"/api/games/:id","description":"Get game details with vault balance & stats","auth":false},{"method":"GET","path":"/api/games/:id/vault","description":"Get vault details and withdraw requests","auth":false}]},{"group":"Payments","routes":[{"method":"GET","path":"/api/payments?game_id=0&limit=50&offset=0","description":"List payments (auth required)","auth":true},{"method":"GET","path":"/api/payments/verify/:orderId","description":"Verify a payment by order ID","auth":false},{"method":"GET","path":"/api/payments/stats/:gameId","description":"Payment statistics for a game","auth":false}]},{"group":"Tournaments","routes":[{"method":"GET","path":"/api/tournaments","description":"List all tournaments","auth":false},{"method":"GET","path":"/api/tournaments/:id","description":"Get tournament details with participants","auth":false},{"method":"GET","path":"/api/tournaments/game/:gameId","description":"List tournaments for a game","auth":false}]},{"group":"Items","routes":[{"method":"GET","path":"/api/items","description":"List all game items","auth":false},{"method":"GET","path":"/api/items/:id","description":"Get item details","auth":false},{"method":"GET","path":"/api/items/:id/balance/:address","description":"Check player's item balance","auth":false},{"method":"GET","path":"/api/items/owner/:address","description":"List all items owned by wallet address","auth":false}]},{"group":"Subscriptions","routes":[{"method":"GET","path":"/api/subscriptions/plans","description":"List all subscription plans","auth":false},{"method":"GET","path":"/api/subscriptions/plans/:id","description":"Get plan details","auth":false},{"method":"GET","path":"/api/subscriptions/:id","description":"Get subscription details","auth":false},{"method":"GET","path":"/api/subscriptions/check/:planId/:address","description":"Check if user has active subscription","auth":false}]},{"group":"Webhooks","routes":[{"method":"POST","path":"/api/webhooks","description":"Register a webhook (write auth)","auth":true},{"method":"GET","path":"/api/webhooks","description":"List webhooks for your game","auth":true},{"method":"DELETE","path":"/api/webhooks/:id","description":"Delete a webhook","auth":true}]},{"group":"API Keys (Admin)","routes":[{"method":"POST","path":"/api/keys","description":"Create API key for a game","auth":"admin"},{"method":"GET","path":"/api/keys/:gameId","description":"List keys for a game","auth":"admin"},{"method":"DELETE","path":"/api/keys/:id","description":"Revoke an API key","auth":"admin"}]}],"webhookEvents":["payment.completed","payment.refunded","tournament.created","tournament.player_joined","tournament.prizes_distributed","tournament.cancelled","subscription.created","subscription.renewed","subscription.cancelled","item.purchased"],"contracts":{"registry":"0xD94C7dF55F8057c79E914D415c6d459523648A27","gateway":"0x6D4791CbBef55188615Bef23e5C5154ca33e7C40","vaultImpl":"0x5D1de7D3f11FeB31760187C6B6b2Fc99cA52652C","tournament":"0x36b2b637dd10174dDb3eeaaCe06FD19273505a00","subscription":"0xd91B95FE7d564a49229FdCfDbc5fA558FC733e39","itemRegistry":"0x8d21790Ba3Bcf25ef8910E46c6C4DdE3f66E1125"}}