Overview
Rewarded ads are full-screen video ads that provide users with in-game currency, extra lives, hints, or other rewards when they watch the video to completion.Key Features
- Full-screen video ads
- Rewards only provided when user fully watches the ad
- User chooses to watch the ad (e.g., “Watch video to get a life” button)
- Configurable reward type and amount
Use test unit IDs in development environments.
Implementation Methods
Rewarded ads can be implemented in two ways:- Class Method - Using
AdropRewardedAdclass directly - Hook Method - Using
useAdropRewardedAdHook (recommended)
Hook Method Implementation (Recommended)
Use React Hooks for a more concise and React-like implementation.Basic Example
useAdropRewardedAd Hook
The Hook automatically manages ad state.Parameters
Return Values
Browser target setting of the loaded ad (
BrowserTarget.EXTERNAL or BrowserTarget.INTERNAL).Class Method Implementation
You can implement ads using theAdropRewardedAd class directly.
Basic Example
AdropRewardedAd Class
Constructor
Properties
Browser target setting of the loaded ad (
BrowserTarget.EXTERNAL or BrowserTarget.INTERNAL) (read-only).Methods
Requests an ad. Results are delivered via
onAdReceived or onAdFailedToReceive listener callbacks.AdropListener Interface
All callbacks are optional. Set only the ones you need.Callbacks
Reward-specific Callback
Called when user has watched the ad to completion and earned a reward.
type: Reward type set in the Ad Control console (integer)amount: Reward amount set in the Ad Control console (integer)
Reward Handling
Hook Method Reward Handling
Class Method Reward Handling
Server-Side Verification
You can verify reward grants on your server to prevent fraud. UsesetServerSideVerificationOptions() to pass user and custom data that will be included in server-side verification callbacks.
To receive SSV callbacks on your server, register a callback URL in the console: [Settings] > [Integrations] > Reward Ad SSV. The
userId and customData set here are included in the encrypted payload sent to that URL. See the Reward Ad SSV guide for payload decryption and setup.Setup
ServerSideVerificationOptions
userId(string, optional): User identifier sent in the server callbackcustomData(string, optional): Custom data sent in the server callback
When the ad falls back to backfill,
customData is sanitized to base64url before being forwarded (+→-, /→_, = stripped; backfill 1.12.1+). If you pack a base64 payload into customData, decode it as base64url on your server.setServerSideVerificationOptions() should be called before load(). The options are sent to the server when the user earns a reward.Testing
Test Unit IDs
Always use test unit IDs during development. Testing with real unit IDs may result in invalid traffic and account suspension.Error Handling
Hook Method Error Handling
Class Method Error Handling
Best Practices
1. Preload Ads
Preload ads for better user experience.2. Check Ad Ready State
Check if ad is loaded and update UI accordingly.3. Memory Management
Clean up ad resources on component unmount.4. Error Handling
Improve user experience with proper error handling.Complete Example
Hook Method Complete Example
Backfill Ads
To use backfill ads, you must have the backfill dependency added to your native platforms (Android/iOS).
Related Documentation
Interstitial Ads
Interstitial ad implementation guide
Popup Ads
Popup ad implementation guide
Native Ads
Native ad implementation guide
Error Codes
Error code reference