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
OverviewWhat Challenge is, which half of the integration you build and which half Challenge runs, the whole loop in two snippets, the vocabulary, and a map of every documentation page.QuickstartSix steps from an unmodified web game to a settled attempt in sandbox: two script tags, record, seed a bar, arm and startAttempt, report from a server, then verify with curl.How a round worksThe lifecycle of one paid round as a sequence diagram and a narration: arming, startAttempt and the freeze, your server reporting the measurement, settlement, the webhook, and the expiry refund.The trust modelThe three rules money in Challenge follows: scores enter only from an authenticated partner server, fees are charged before scores are heard, and the bar and prize freeze at attempt start. Includes the removed client-reporting APIs.
Concepts
Programs and keysThe program as the unit every request is scoped to: the public program ID the browser gets, the sk_test_ and sk_live_ keys your server gets, why every key failure answers one 401, approval, integrity tiers and rotation.ChallengesThe product unit: metric, direction, threshold, fee and prize; the calibrating / live / suspended status machine and which statuses accept attempts; how a Challenge is created and where it surfaces to players.CalibrationHow a Challenge gets its bar and keeps it: the observed, listen-first and partner-seeded paths with their exact sample floors, the provisional 20% ceiling, the 200-attempt half-prize ramp, and the drift monitor that suspends or promotes.The Challenge ladderWhat claiming a Challenge unlocks: a rung with twice the prize, a fee of 12.5%, a target pass rate halved once, spawned and priced by Challenge, visible on the island but omitted from /v1/challenges until unlocked.TournamentsHouse-funded recurring rank tables: a fixed purse announced before entry and split 51/31/18, 24-hour rounds, entry fees by tier, minimum fill or full refund, entering from the island or your server, and rank settlement.
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
SandboxTesting with an sk_test_ key: why a calibrating Challenge is free by database constraint, how to run the whole loop through POST /v1/players, /v1/attempts and the outcome call, how to seed a distribution to exercise the island path, and exactly what differs from production.Go-live checklistEverything that has to be true before sk_test_ becomes sk_live_: approval, the key swap, no key in any client bundle, tier ceilings, the 200-attempt prize ramp, provisional caps, webhook signature verification, duplicate deliveries, expiry refunds, error branching and logging.
Reference
Challenge.jsReference for the browser half: the two script tags, every init option with its default, init/record/startAttempt/disarm/destroy, every error code they throw, the three custom elements, and the options that are accepted and ignored.APIReference for the /v1 partner API: X-API-Key auth, decimal-string money, idempotency semantics, the error envelope, and every endpoint for challenges, players, attempts, tournaments and integrations.Webhook eventsEvery event Challenge emits with its trigger, field table and a complete example payload: attempt.settled, attempt.refunded, challenge.calibrated, challenge.suspended, settlement.paid, tournament.settled and tournament.cancelled.ErrorsEvery error code with its cause and fix, grouped by surface: the codes Challenge.js throws, the closed /v1 code set with HTTP statuses, and the webhook delivery debug table.
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.