---
title: Rewarded interstitial ads
description: Display full-screen rewarded interstitial ads that reward users without requiring opt-in.
---

Rewarded Interstitial Ads are full-screen ads that cover the interface of an app until closed by the user. The content of a rewarded interstitial
advert is controlled via the Google AdMob dashboard.

The purpose of a rewarded interstitial ad is to reward users with _something_ after completing an action inside of the advert, such
as watching a video or submitting an option via an interactive form. If the user completes the action, you can reward them
with something (e.g. in-game currency). Unlike rewarded ads, users aren't required to opt-in to view a rewarded interstitial.

<img
  width="300"
  src="https://developers.google.com/static/admob/images/format-rewarded-interstitial.svg"
  alt="Rewarded interstitial ad shown at a natural transition"
/>

<Warning>
  Before showing a rewarded interstitial ad, you must present an intro screen that provides clear
  reward messaging and an option to skip the ad before it starts. See Google's [rewarded
  interstitial guide](https://developers.google.com/admob/android/rewarded-interstitial).
</Warning>

<Warning>
  Complete consent and SDK initialization before calling `load()`. See [Consent & privacy
  basics](/consent-basics) and the shared [load best
  practices](/ad-formats#load-and-refresh-best-practices).
</Warning>

To create a new rewarded interstitial ad, call the `createForAdRequest` method from the `RewardedInterstitialAd` class. The first argument
of the method is the "Ad Unit ID". For testing, we can use a Test ID, however for production the ID from the
Google AdMob dashboard under "Ad units" should be used:

```js
import { RewardedInterstitialAd, TestIds } from 'react-native-google-mobile-ads';

const adUnitId = __DEV__
  ? TestIds.REWARDED_INTERSTITIAL
  : 'ca-app-pub-xxxxxxxxxxxxx/yyyyyyyyyyyyyy';

const rewardedInterstitial = RewardedInterstitialAd.createForAdRequest(adUnitId, {
  keywords: ['fashion', 'clothing'],
});
```

The second argument is additional optional request options object to be sent whilst loading an advert, such as keywords & location.
Setting additional request options helps AdMob choose better tailored ads from the network.
View the [`RequestOptions`](https://github.com/invertase/react-native-google-mobile-ads/blob/main/packages/core/src/types/RequestOptions.ts) source code to see the full range of options available.

The call to `createForAdRequest` returns an instance of the [`RewardedInterstitialAd`](https://github.com/invertase/react-native-google-mobile-ads/blob/main/packages/core/src/ads/RewardedInterstitialAd.ts) class,
which provides a number of utilities for loading and displaying rewarded interstitial ads.

To listen to events, such as when the advert from the network has loaded or when an error occurs, we can subscribe via the
`addAdEventListener` method:

```js
import React, { useEffect, useRef, useState } from 'react';
import { Button, Text, View } from 'react-native';
import {
  AdEventType,
  RewardedInterstitialAd,
  RewardedAdEventType,
  TestIds,
} from 'react-native-google-mobile-ads';

const adUnitId = __DEV__
  ? TestIds.REWARDED_INTERSTITIAL
  : 'ca-app-pub-xxxxxxxxxxxxx/yyyyyyyyyyyyyy';

const rewardedInterstitial = RewardedInterstitialAd.createForAdRequest(adUnitId, {
  keywords: ['fashion', 'clothing'],
});

// onContinue moves the app on to its next step.
function LevelTransition({ onContinue }) {
  const [loaded, setLoaded] = useState(false);
  const [introVisible, setIntroVisible] = useState(false);
  const onContinueRef = useRef(onContinue);
  onContinueRef.current = onContinue;
  const showPendingRef = useRef(false);

  useEffect(() => {
    const unsubscribeLoaded = rewardedInterstitial.addAdEventListener(
      RewardedAdEventType.LOADED,
      () => {
        setLoaded(true);
      },
    );
    const unsubscribeEarned = rewardedInterstitial.addAdEventListener(
      RewardedAdEventType.EARNED_REWARD,
      reward => {
        console.log('User earned reward of ', reward);
      },
    );
    const unsubscribePaid = rewardedInterstitial.addAdEventListener(AdEventType.PAID, event => {
      console.log('Rewarded interstitial revenue', event.value, event.currency);
    });
    const unsubscribeClosed = rewardedInterstitial.addAdEventListener(AdEventType.CLOSED, () => {
      showPendingRef.current = false;
      setLoaded(false);
      // Preload the next ad on the same instance, then move on.
      rewardedInterstitial.load();
      onContinueRef.current();
    });
    // show() resolves once presentation is handed to the SDK; a later failure arrives here.
    const unsubscribeError = rewardedInterstitial.addAdEventListener(AdEventType.ERROR, error => {
      console.warn(error);
      setLoaded(false);
      if (showPendingRef.current) {
        showPendingRef.current = false;
        onContinueRef.current();
      }
    });

    // Start loading the rewarded interstitial ad straight away
    rewardedInterstitial.load();

    // Unsubscribe from events on unmount
    return () => {
      unsubscribeLoaded();
      unsubscribeEarned();
      unsubscribePaid();
      unsubscribeClosed();
      unsubscribeError();
    };
  }, []);

  if (introVisible) {
    return (
      <View>
        <Text>Watch a short ad to earn 50 coins?</Text>
        <Button
          title="Watch ad"
          onPress={() => {
            if (showPendingRef.current) return;
            setIntroVisible(false);
            showPendingRef.current = true;
            // Not loaded, already showing, or a platform decline reject; a destroyed ad throws.
            rewardedInterstitial.show().catch(error => {
              showPendingRef.current = false;
              console.warn(error);
              onContinue();
            });
          }}
        />
        <Button
          title="Skip"
          onPress={() => {
            setIntroVisible(false);
            onContinue();
          }}
        />
      </View>
    );
  }

  // Without a loaded advert, the transition goes straight to the next step.
  return (
    <Button title="Continue" onPress={() => (loaded ? setIntroVisible(true) : onContinue())} />
  );
}
```

The code above subscribes to the rewarded interstitial ad events (via `addAdEventListener()`) and immediately starts to load a new advert from
the network (via `load()`). At the natural transition, pressing "Continue" shows an intro screen that states the reward and
offers to skip, but only once an advert has loaded; otherwise the app moves straight on. Only when the user chooses to watch
is the `show` method on the rewarded interstitial ad instance called, showing the advert over-the-top of your application.
"Skip", a rejected show, an `ERROR` event after `show()` resolved, and the `CLOSED` event all call `onContinue`, and the
`CLOSED` listener also loads the next advert on the same instance. The sample assumes `EARNED_REWARD` arrives before
`CLOSED`; for valuable rewards, confirm the grant with [server-side verification](#server-side-verification-ssv).

Like Interstitial Ads, you can listen to the events with the `addAdEventListener` such as when the user clicks the advert or closes
the advert and returns back to your app. However, you can listen to an extra `EARNED_REWARD` event which is triggered when user completes the
advert action. An additional `reward` payload is sent with the event, containing the amount and type of rewarded (specified via the dashboard).

To learn more, view the [`RewardedAdEventType`](https://github.com/invertase/react-native-google-mobile-ads/blob/main/packages/core/src/RewardedAdEventType.ts) source code.

Forward `AdEventType.PAID` payloads to your
[revenue telemetry](/revenue-telemetry-and-auction-diagnostics) pipeline.

## Server-side verification (SSV)

While the `EARNED_REWARD` event only occurs on the client, Server Side Verification (or SSV) can be used for confirming a user completed an advert action. For this, you have to specify the Server Side Verification callback URL in your Ads dashboard.

You can customize SSV parameters when your SSV callback is called by setting the `serverSideVerificationOptions` field in your [`RequestOptions`](https://github.com/invertase/react-native-google-mobile-ads/blob/main/packages/core/src/types/RequestOptions.ts) parameter.

```js
const rewardedInterstitialAd = RewardedInterstitialAd.createForAdRequest(adUnitId, {
  serverSideVerificationOptions: {
    userId: '9999',
    customData: 'my-custom-data',
  },
});
```

If you request an Advert as in the example above, AdMob will call your server with the `userId` and `customData` fields as shown below:

```
[14/Aug/2020 12:51:43] "GET /views/admob-ssv/?ad_network=...&ad_unit=...&custom_data=my-custom-data&reward_amount=1&reward_item=test_reward_item&timestamp=1597377102267&transaction_id=148cc85...&user_id=9999&signature=MEUCIQCQSi3cQ2PlxlEAkpN...&key_id=3335... HTTP/1.1" 200 0
```

You still need to verify these incoming requests yourself to ensure they are genuine. To learn more about callback parameters and verifying, see the [AdMob SDK Server Side Verification(SSV) documentation](https://developers.google.com/admob/android/rewarded-video-ssv).
