Example Usage: https://pusha.one/game?api-url
Example Usage: https://pusha.one/game?mywebsite.com/api.php

The concept is that by using your API callback URL you can customise what the prizes that the coin pusher game will reward to the user, the prizes display a javascript alert() box once they are won and using this alert box you are able to reward the user with a link, product keys, discount codes, etc. The user makes this request from their browser allowing you to create session cookies so that each user gets a unique discount code or similar. You could have a limited supply and when they run out just return "this prize giveaway has ended" or similar.

Your API url will receive the following url query parameters;
- {pid} present box theme id
Present Box Theme ID's
  1. Maroon with Silver ribbon
  2. Maroon with Gold ribbon
  3. Purple with Silver ribbon
  4. Purple with Gold ribbon
  5. Purple with Silver ribbon
  6. Pink with Silver ribbon
  7. Turquoise with White ribbon
  8. Purple with Sky Blue ribbon
  9. White with Cobalt ribbon
  10. Cobalt with Silver ribbon
  11. Cobalt with Gold ribbon
- {coins} how many coins played since game start
- {elapsed} how many seconds elapsed since game start
- {winnum} current number of presents won
- {width} screen width
- {height} screen height

Request Example:
mywebsite.com/api.php?pid=1&coins=92&elapsed=34.16&winnum=1&width=320&height=240

What format to supply as your API URL?
mywebsite.com/api.php

Just the domain and page with no query parameters or http/https, all urls must be https accessible.

Make sure you enabled cores for Pusha.one
Access-Control-Allow-Origin: https://Pusha.one.

Tip: Press 'c' to switch between Perspective and Orthographic.


Demo Game [pop]

Example API endpoint in PHP <?php header("Access-Control-Allow-Origin: https://pusha.one"); echo $_SERVER['QUERY_STRING']; ?>