{
  "name": "Verification API",
  "auth": "Send your API key as `Authorization: Bearer <key>` or `X-API-Key: <key>`.",
  "note": "Two operational endpoints only. Reward your user ONLY when join-check returns credited:true — that is the single signal that a real sponsor join happened and you were paid. joined:true with credited:false/ad:false means \"let them through, but there is nothing to reward\". Balance, stats, payout details and withdrawals are viewed in your cabinet on the site, not over the API.",
  "endpoints": {
    "GET /api/ad": "The ad to show. ALL THREE query params are required: ?serverId=<your guild>&botId=<your bot app id>&userId=<the Discord user>. Returns { adText, fallbackText, sponsor:{guildId,name,invite}|null }. It is the owner's per-server ad if set for your server, else a paid buyer campaign, else the global ad. A sponsor the user is already in is skipped. sponsor null → no ad right now; do NOT promise a reward. 400 if any of serverId/botId/userId is missing.",
    "POST /api/join-check": "Body: { userId, botId } — required (serverId is optional and ignored). We verify the EXACT sponsor that /api/ad last showed this user (call /api/ad first), so a different server they already belong to never counts. Reward the user ONLY on credited:true. Responses: 200 { joined:true, credited:true } → real join of the shown sponsor verified and you were paid → GIVE the reward; 403 { joined:false } → not a member of the shown sponsor → ask them to join, no reward; 200 { joined:true, credited:false, ad:false } → nothing was shown (no ad) → let them through but DO NOT reward. 503 → retry. 400 if userId/botId missing. Each member is paid once per sponsor; leaving reverses it."
  }
}