Challenge
Docs

Documentation

Guides and reference for adding a Bounty to your game: install Challenge.js, record rounds, start a paid attempt, and report the score from your server.

Get started

Concepts

Build

Install Challenge.jsThe two script tags, what the instant-render stub does, init({ program }) and the options worth setting, overlay and inline placement, SPA re-init versus explicit destroy(), and apiBase for local development.Record roundsChallenge.record(metric, score) at the end of every round, why it ships before anything chargeable, exactly what it feeds and what it does not, the throttle and queue limits, and how metric names are normalised.Start a paid attemptArming on the island, await Challenge.startAttempt(), the five frozen fields it resolves, the tournamentRound variant, and a complete error table for every code it can reject with.Report the score from your serverPOST /v1/attempts/{id}/outcome with X-API-Key and Idempotency-Key: measurement never verdict, the settlement response, replay semantics, both server templates inlined in full, and the hardening a production handler needs.Server-created attemptsThe second door, only for games with no browser client: POST /v1/players to link a player_ref to an existing Challenge account, POST /v1/attempts with exactly one parent, and the calibrating free loop this door alone permits.WebhooksWriting and registering a handler, verifying X-Webhook-Signature in Node and Python, the delivery debug table, the published retry schedule and timeout, and why attempt.settled means re-fetch rather than reconstruct.Real-time settlementWhat Challenge.js already does for settlement (WS attempt:{id} raced against a 3-second poll), the player-token WebSocket, channel authorisation, the message envelopes, and why a partner server should use webhooks instead.

Test and go live

Reference

For AI agents

Ready to integrate?

Put a Bounty in your game in minutes.

Challenge for Players

Create an account, deposit funds, and compete for real money in games you already play.

Challenge for Developers

Add Challenge to your game and start earning from every match. Integration takes minutes.