{"__v":47,"_id":"542998547a6b690800768074","category":{"__v":22,"_id":"542998547a6b690800768072","pages":["542a3de5e677b0080050898f","544e8298de6bac1000236fe9","542998547a6b690800768074","542ab90154d88d140075fbd4","5433300867f20a080097a04b","5433302067f20a080097a04d","544e7ae6de6bac1000236fb5","54330b4990d63b1c0030c129","543da24b31ca981a00a6ffe7","54333238a807e208003e72d2","544e8305bd51b9080037f9cb","54332b234aeeef0800410a73","5433306067f20a080097a051","543db19f31ca981a00a70053","543d31d6a10ab32000b3aa70","54a1f0af50465f1f00bfa3e8","54cfc5925ff7e617002bbda5","54f4f09158e9df0d00917b3e"],"project":"542998547a6b69080076806e","version":"542998547a6b690800768071","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-09-29T17:35:16.267Z","from_sync":false,"order":0,"slug":"getting-started","title":"Getting Started"},"is_link":false,"parentDoc":null,"project":"542998547a6b69080076806e","user":"542998207a6b690800768069","version":{"__v":9,"_id":"542998547a6b690800768071","project":"542998547a6b69080076806e","createdAt":"2014-09-29T17:35:16.249Z","releaseDate":"2014-09-29T17:35:16.249Z","categories":["542998547a6b690800768072","5433027990d63b1c0030c0f1","5433028190d63b1c0030c0f2","5433028d9a2b451a00ad4508","5433055790d63b1c0030c10a","5461417d37e5bc200049e1e4","54624066ddd31b0800a58db4","54625de66d1f1010002f3901","54d309955616470d0013cc55"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":["5446ba41ae0040140035fa0d","5446f320beb6320800da6ec5","5449e17227b7fc140078da24","5449ea4227b7fc140078da30","5449f4ce778b3e08002b2265","571104495039350e00abcd0a"],"next":{"pages":[],"description":""},"createdAt":"2014-09-29T17:35:16.308Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"basic_auth":false,"results":{"codes":[]},"settings":"","try":true,"auth":"never","params":[],"url":""},"isReference":false,"order":2,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Create a Publisher Account\"\n}\n[/block]\nA Publisher Account is required to use your application, website or game with SuperRewards.\n\nIf you have not already done so, register for a Publisher Account at [pub.superrewards.com](https://pub.superrewards.com/signup).\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"What about mobile web, or responsive web?\",\n  \"body\": \"This web widget works just as well on mobile devices, as it's made to be fully responsive and adapts to any screen size.\"\n}\n[/block]\nThe steps to go live:\n1. [Integrate the widget](#header-integrate)\n2. [Set up payment notifications](#header-notifications)\n3. [Test it out](#header-test)\n4. [Get paid](#header-paid)\n\n[block:html]\n{\n  \"html\": \"<a name='header-integrate'></a>\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"1. Integrate the Widget\"\n}\n[/block]\nThe web widget is very simple to add - use an `iframe` tag to display it in any HTML:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Buy or earn your gold with SuperRewards:\\n\\n<iframe \\n        src=\\\"https://wall.superrewards.com/super/offers?h=nhhpuxlrfgi.022815956433&uid=11111111\\\" \\n        frameborder=\\\"0\\\" \\n        width=\\\"728\\\" height=\\\"1750\\\" scrolling=\\\"no\\\">\\n</iframe>\",\n      \"language\": \"html\"\n    }\n  ]\n}\n[/block]\nThere are two required values:\n* `h`: the app hash for your app, generated by our system and available in your [Dashboard](https://pub.superrewards.com).  For more info see [Foundation: Hashes and Keys](doc:foundation-app-hashes-keys-and-signing).\n* `uid`: a unique ID for the user, either numeric or text. Check out our [Notes on UIDs](doc:notes-on-uids). \n\nThere are many other optional values that you can pass to make the system more effective (like demographics) or customize its function or look, check those out in the [Web Integration Options](doc:postback-parameters) .\n[block:html]\n{\n  \"html\": \"To get your app hash and try it out, <a class=\\\"btn btn-primary\\\" role=\\\"button\\\" href='https://pub.superrewards.com/signup'>Sign up</a> or <a href='https://pub.superrewards.com/login'>Log in</a>.\"\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<a name='header-notifications'></a>\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"2. Set up payment notifications\"\n}\n[/block]\nWhen a user completes a payment or [offer](doc:basics-how-offers-work) , we will send you a server-to-server notification (also called a ping back, callback or postback). \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n$SECRET_KEY     = \\\"abcdef123456\\\"; // secret for my app\\n$transaction_id = $_REQUEST['id'];\\n$user_id        = $_REQUEST['uid'];\\n$offer_id       = $_REQUEST['oid']; // completed offer or payment method\\n$new_currency   = $_REQUEST['new'];\\n$hash_signature = $_REQUEST['sig'];\\n\\n$hash = md5($transaction_id.':'.$new_currency.':'.$user_id.':'.$SECRET_KEY);\\nif ($hash != $hash_signature) {\\n  // signature doesn't match, respond with a failure\\n  echo \\\"0\\\\n\\\"; \\n  exit;\\n}\\n// all good!  \\nlog(\\\"User $user_id purchased $new_currency coins using $offer_id (txn: $transaction_id)\\\\n\\\");\\necho \\\"1\\\\n\\\";\\n\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]\nThe `$SECRET_KEY` is unique to your app, and can be found in your [Dashboard](https://pub.superrewards.com). For more info see [Foundation: Hashes and Keys](doc:foundation-app-hashes-keys-and-signing).\n[block:html]\n{\n  \"html\": \"To get your secret key and try it out, <a class=\\\"btn btn-primary\\\" role=\\\"button\\\" href='https://pub.superrewards.com/signup'>Sign up</a> or <a href='https://pub.superrewards.com/login'>Log in</a>.\"\n}\n[/block]\nYou can see a fully-functional PHP example in our GitHub [superrewards-postback](https://github.com/Playerize/superrewards-postback) library, with more languages coming soon. \n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Postback security\",\n  \"body\": \"Be sure to check out the detailed article on [Notification Postbacks](doc:notification-postbacks), especially for details on securing the postbacks against any fraud attempts.\"\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<a name='header-test'></a>\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"3. Test it out\"\n}\n[/block]\nWe have a test tool so that you can fire postbacks to your server, without a lot of clicking around.  Find it in your [Dashboard](https://pub.superrewards.com), under the Apps:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/F9LcTmHmTZa1kVA3oT1W_Screen-Shot-2014-10-02-at-11.03.01-AM%20(1).png\",\n        \"Screen-Shot-2014-10-02-at-11.03.01-AM (1).png\",\n        \"576\",\n        \"530\",\n        \"#2fb349\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<a name='header-paid'></a>\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"4. Get Paid\"\n}\n[/block]\nCheck your earnings in real-time in your [Dashboard](https://pub.superrewards.com).  We do payouts every two weeks, and our fees are the best around, check out the details in [Basics: Getting Paid](doc:basics-getting-paid).\n[block:html]\n{\n  \"html\": \"Enter your banking information in your <a href='https://pub.superrewards.com/account'>Dashboard</a>, or  <a class=\\\"btn btn-primary\\\" role=\\\"button\\\" href='https://pub.superrewards.com/signup'>Sign up</a>.\"\n}\n[/block]","excerpt":"Step-by-step instructions on how to integrate our most popular and full-featured product: our web payment page has full functions for global payments, and for sales through offers such as videos, surveys, and more.","slug":"getting-started","type":"basic","title":"Getting Started - Web"}

Getting Started - Web

Step-by-step instructions on how to integrate our most popular and full-featured product: our web payment page has full functions for global payments, and for sales through offers such as videos, surveys, and more.

[block:api-header] { "type": "basic", "title": "Create a Publisher Account" } [/block] A Publisher Account is required to use your application, website or game with SuperRewards. If you have not already done so, register for a Publisher Account at [pub.superrewards.com](https://pub.superrewards.com/signup). [block:callout] { "type": "success", "title": "What about mobile web, or responsive web?", "body": "This web widget works just as well on mobile devices, as it's made to be fully responsive and adapts to any screen size." } [/block] The steps to go live: 1. [Integrate the widget](#header-integrate) 2. [Set up payment notifications](#header-notifications) 3. [Test it out](#header-test) 4. [Get paid](#header-paid) [block:html] { "html": "<a name='header-integrate'></a>" } [/block] [block:api-header] { "type": "basic", "title": "1. Integrate the Widget" } [/block] The web widget is very simple to add - use an `iframe` tag to display it in any HTML: [block:code] { "codes": [ { "code": "Buy or earn your gold with SuperRewards:\n\n<iframe \n src=\"https://wall.superrewards.com/super/offers?h=nhhpuxlrfgi.022815956433&uid=11111111\" \n frameborder=\"0\" \n width=\"728\" height=\"1750\" scrolling=\"no\">\n</iframe>", "language": "html" } ] } [/block] There are two required values: * `h`: the app hash for your app, generated by our system and available in your [Dashboard](https://pub.superrewards.com). For more info see [Foundation: Hashes and Keys](doc:foundation-app-hashes-keys-and-signing). * `uid`: a unique ID for the user, either numeric or text. Check out our [Notes on UIDs](doc:notes-on-uids). There are many other optional values that you can pass to make the system more effective (like demographics) or customize its function or look, check those out in the [Web Integration Options](doc:postback-parameters) . [block:html] { "html": "To get your app hash and try it out, <a class=\"btn btn-primary\" role=\"button\" href='https://pub.superrewards.com/signup'>Sign up</a> or <a href='https://pub.superrewards.com/login'>Log in</a>." } [/block] [block:html] { "html": "<a name='header-notifications'></a>" } [/block] [block:api-header] { "type": "basic", "title": "2. Set up payment notifications" } [/block] When a user completes a payment or [offer](doc:basics-how-offers-work) , we will send you a server-to-server notification (also called a ping back, callback or postback). [block:code] { "codes": [ { "code": "<?php\n$SECRET_KEY = \"abcdef123456\"; // secret for my app\n$transaction_id = $_REQUEST['id'];\n$user_id = $_REQUEST['uid'];\n$offer_id = $_REQUEST['oid']; // completed offer or payment method\n$new_currency = $_REQUEST['new'];\n$hash_signature = $_REQUEST['sig'];\n\n$hash = md5($transaction_id.':'.$new_currency.':'.$user_id.':'.$SECRET_KEY);\nif ($hash != $hash_signature) {\n // signature doesn't match, respond with a failure\n echo \"0\\n\"; \n exit;\n}\n// all good! \nlog(\"User $user_id purchased $new_currency coins using $offer_id (txn: $transaction_id)\\n\");\necho \"1\\n\";\n", "language": "php" } ] } [/block] The `$SECRET_KEY` is unique to your app, and can be found in your [Dashboard](https://pub.superrewards.com). For more info see [Foundation: Hashes and Keys](doc:foundation-app-hashes-keys-and-signing). [block:html] { "html": "To get your secret key and try it out, <a class=\"btn btn-primary\" role=\"button\" href='https://pub.superrewards.com/signup'>Sign up</a> or <a href='https://pub.superrewards.com/login'>Log in</a>." } [/block] You can see a fully-functional PHP example in our GitHub [superrewards-postback](https://github.com/Playerize/superrewards-postback) library, with more languages coming soon. [block:callout] { "type": "warning", "title": "Postback security", "body": "Be sure to check out the detailed article on [Notification Postbacks](doc:notification-postbacks), especially for details on securing the postbacks against any fraud attempts." } [/block] [block:html] { "html": "<a name='header-test'></a>" } [/block] [block:api-header] { "type": "basic", "title": "3. Test it out" } [/block] We have a test tool so that you can fire postbacks to your server, without a lot of clicking around. Find it in your [Dashboard](https://pub.superrewards.com), under the Apps: [block:image] { "images": [ { "image": [ "https://files.readme.io/F9LcTmHmTZa1kVA3oT1W_Screen-Shot-2014-10-02-at-11.03.01-AM%20(1).png", "Screen-Shot-2014-10-02-at-11.03.01-AM (1).png", "576", "530", "#2fb349", "" ] } ] } [/block] [block:html] { "html": "<a name='header-paid'></a>" } [/block] [block:api-header] { "type": "basic", "title": "4. Get Paid" } [/block] Check your earnings in real-time in your [Dashboard](https://pub.superrewards.com). We do payouts every two weeks, and our fees are the best around, check out the details in [Basics: Getting Paid](doc:basics-getting-paid). [block:html] { "html": "Enter your banking information in your <a href='https://pub.superrewards.com/account'>Dashboard</a>, or <a class=\"btn btn-primary\" role=\"button\" href='https://pub.superrewards.com/signup'>Sign up</a>." } [/block]