offerwall-html5-game

Demo mode. No server runs here. The offers are made up, and coins are kept only in this browser. Set up the real server

Live demo, open source

A Phaser game with an Earn coins button

Catch stars, then press Earn coins. In the real setup the button opens the Moonetix offerwall, and a small Node.js server signs the link and credits coins from signed postbacks. Here the offerwall is a demo panel, and each postback runs through the repo's own src/postback.js in your browser.

Move with the arrow keys or the pointer. Press E or click Earn coins in the game.

What happens on Earn coins

  1. The first time, the player confirms they are 16 or older and gets a guest sign-in.
  2. The server signs the offerwall link for that player with the link hash salt.
  3. The offerwall opens over the game. The player completes an offer.
  4. Moonetix sends a signed postback. The server checks the hash and credits each transaction once.
  5. The game reads the new balance. It never adds coins itself.

In demo mode a script on this page stands in for the server, with fake keys. On your site the salt and the postback key stay on the server.

Postback log

    No postbacks yet. Complete an offer to see one.

    Run it with the real server

    Node.js 22.13 or later, no npm packages, and an approved Moonetix app.

    git clone https://github.com/moonetix/offerwall-html5-game.git
    cd offerwall-html5-game
    cp .env.example .env
    npm start

    Put your App ID, link hash salt and postback secret key in .env. The README has the postback URL to save and a test checklist.