Rewarded ads for your app, with a split you choose
One server call and one widget. You earn your share of every verified view; your users see the split before every ad.
Quick start
- Create an account, open Developers in the app and register your app. Choose the percentage of each payout you keep and list the origins that may embed the widget.
- Store the secret key on your server. It is shown once.
- On your server, request a token for the signed-in user (below).
- On your page, mount the widget with that token.
1. Server: mint a one-time token
const res = await fetch('https://centhead.com/api/v1/embed-tokens', {
method: 'POST',
headers: {
authorization: 'Bearer ' + process.env.CENTHEAD_SECRET,
'content-type': 'application/json',
},
body: JSON.stringify({ external_user_id: String(user.id) }),
});
const { token } = await res.json(); // valid for 10 minutes, single use
2. Page: mount the widget
<div id="earn"></div>
<script src="https://centhead.com/sdk/centhead.js"></script>
<script>
const widget = Centhead.mount('#earn', {
getToken: () => fetch('/my-backend/centhead-token').then(r => r.json()).then(j => j.token),
onEarned: (e) => console.log('viewer earned', e.viewerFormatted),
});
</script>
How it behaves
- The ad runs in Centhead’s own frame. Only origins you registered can embed it (enforced with
frame-ancestors). - Viewers confirm they are 18+ and accept the terms inside the widget, and see the exact split before each ad.
- Viewers earn into a pseudonymous account keyed to your user id, and can claim and withdraw it from a full Centhead account with a one-time code.
- You never see a viewer’s balance, and you cannot trigger ads or earnings from your side.
- Your share is held and reversed together with the payout it came from.
Rules
- Do not reward viewers for clicking or for extra views, and do not generate views yourself. Apps that do are suspended and earnings forfeited.
- Do not target children. See the Integrator Terms.
- Never expose your secret key in a browser or mobile app binary.
Try the split
| Centhead (1%) | — |
| The app | — |
| You | — |
API reference
| Call | Purpose |
|---|---|
| POST /api/v1/embed-tokens | Server to server. Bearer secret key. Body {"external_user_id"}. Returns {token, embedUrl}. |
Widget events (onEarned, onReady, onError) are delivered with postMessage, verified against Centhead’s origin by the SDK.
Ready to try it? The developer console in the app has copy-ready snippets and live earnings per app.