{"_id":"542998547a6b690800768074","is_link":false,"parentDoc":null,"__v":47,"category":{"_id":"542998547a6b690800768072","version":"542998547a6b690800768071","pages":["542a3de5e677b0080050898f","544e8298de6bac1000236fe9","542998547a6b690800768074","542ab90154d88d140075fbd4","5433300867f20a080097a04b","5433302067f20a080097a04d","544e7ae6de6bac1000236fb5","54330b4990d63b1c0030c129","543da24b31ca981a00a6ffe7","54333238a807e208003e72d2","544e8305bd51b9080037f9cb","54332b234aeeef0800410a73","5433306067f20a080097a051","543db19f31ca981a00a70053","543d31d6a10ab32000b3aa70","54a1f0af50465f1f00bfa3e8","54cfc5925ff7e617002bbda5","54f4f09158e9df0d00917b3e"],"project":"542998547a6b69080076806e","__v":22,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-09-29T17:35:16.267Z","from_sync":false,"order":0,"slug":"getting-started","title":"Getting Started"},"githubsync":"","user":"542998207a6b690800768069","version":{"_id":"542998547a6b690800768071","__v":9,"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"},"project":"542998547a6b69080076806e","updates":["5446ba41ae0040140035fa0d","5446f320beb6320800da6ec5","5449e17227b7fc140078da24","5449ea4227b7fc140078da30","5449f4ce778b3e08002b2265","571104495039350e00abcd0a"],"next":{"pages":[],"description":""},"createdAt":"2014-09-29T17:35:16.308Z","link_external":false,"link_url":"","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.