Contents

Extensions Monetization Guide

Introduction

There are two ways to monetize an Extension:

Before you can monetize your extension, you must enable and configure monetization, as described in the next two sections.

Enabling Monetization 

Overview

Enabling monetization (onboarding) allows you to create products to use in your extension. During monetization onboarding, we require your tax and financial information, so we can validate your identity and pay out any revenue you earn.

Notes

Process

On the Monetization tab of the Extensions Manager, click Continue to Onboarding. Follow the steps on the page to go to the onboarding form. Be sure to complete all sections of the form.

After you provide all requested financial information, the approval process will begin. It can take up to two business days. If you are approved, you will receive a notification email. If not, information is provided in Extensions Monetization Developer Onboarding on your broadcaster dashboard. Check there if you don’t get approval email within two business days.

Changing Information After Onboarding


Changing onboarding information is done through your broadcaster dashboard, under Extensions Monetization Developer Onboarding.

To change your payment method, select Change Payment Method.

To change other information, on the Extensions Monetization Developer Onboarding main menu, click Start Over. This clears any information you have in our system, so you must complete the entire onboarding process again.

Extension Monetization in Organizations


For extensions managed by an Organization, you will need to follow a modified set of steps to enable bits and subscriptions features. To learn more, see the Organizations Guide.

Configuring Monetization

All broadcasters can install and activate Bits-enabled extensions. However, Bits features will not succeed on channels that cannot accept Bits. We recommend that you build experiences that account for both eligible and ineligible channels.

Overview

Extensions that use Bits in Extensions features can be installed by all broadcasters, regardless of their ability to receive Bits on their channels. Check the twitch.ext.features.isBitsEnabled feature flag to determine if Bits in Extensions features will work in your extension on the current channel. 

Note: It is mandatory to check for that flag for any monetized extensions.

This flag will be false if:

If this flag is false, you should disable or hide the Bits in Extensions features in your extension. We recommend that you build experiences that account for both eligible and ineligible channels.

Process

  1. Go to the Extensions developer console: log in to the Twitch developer site with your Twitch ID, click Your Console (top right), then click the Extensions tab.
  2. Go to the Extensions manager: find the extension/version you want to configure and click Manage.
  3. Click the Monetization tab.
  4. If you are a Twitch partner/affiliate, proceed to Step 5. If not, click Continue to Onboarding. The other fields on the page are not selectable until you complete onboarding. After you complete onboarding, proceed to Step 5.
  5. Select one or more monetization options:
    • Under Bits Support, select Bits enabled to enable your extension to offer Bits-enabled products.
    • Under Subscription Support, select Subscriber support enabled to enable your extension to get a viewer’s subscription status.
  6. Manage the Bits Product Catalog (see next section). If you enable Bits, you can manage your product catalog inside the Extensions Developer Rig.

Managing the Bits Product Catalog

Introduction


To manage your Bits products, you use the Bits Product Catalog. If your extension is enabled for Bits monetization, then when you configure the Developer Rig to run with your extension, you will see a Manage Products tab. Here, you can view, create, edit, and deprecate products as long as your extension is enabled and configured for Bits and you are logged in to the account that owns your extension.

If you try to redeem Bits for a product in an extension which, on your own channel, is in a testing state (Local or Hosted), it will succeed and charge you no Bits.

Creating a Bits Product

To create a Bits product and add it to the Catalog:

  1. Click Add Product. This adds an unsaved new product to the list of your products. Refreshing the page will delete all unsaved changes.
  2. Set the catalog fields as desired. All fields are required.
  3. Click Save All, to save the new product to your catalog. Once you save a product, you cannot delete it or change its SKU.

A catalog can contain at most 250 products. You can deprecate products.

Editing a Bits Product

To edit a product:

  1. Change fields as desired (see descriptions below). All fields are required. While you are editing, the purple dot on the right indicates a product was edited.
  2. Click Save All, to save all edited and new products. 

Deleting, Deprecating, and Restoring a Bits Product

You cannot delete a product.

You can deprecate a product, so it no longer shows up for end users. Deprecated products are not included in the products returned by getProducts

To deprecate a product:

  1. Click Deprecate next to the product.
  2. Click Save All.

To restore a deprecated product:

  1. Click Restore next to the product.
  2. Click Save All.

Bits Catalog Fields

Here are the catalog fields:

Field Name Description
Product Name Name of your product, to be displayed in your extension. Maximum length: 255 characters.
SKU SKU of your product. This must be unique across all your products. It cannot contain white space. Maximum length: 255 characters. The SKU cannot be changed after saving.
Amount (in Bits) Number of Bits for which your product will be exchanged. Valid values: 1 - 10000.
In Development Toggles whether your product “in development” and hence not included in the products returned by getProducts in production. Default: Yes.
Broadcast Toggles which extension instances execute the onTransactionComplete callback.  For more information, see the table near the end of If the Viewer is Logged In.

Notes on Bits in Extensions

Extension Initialization

Normally, an extension does bootstrapping or initialization operations in [onAuthorized](/extensions/reference/#onauthorized)callback. For Bits in Extensions purchases, getProducts also must be called to get Bits products.

Bits in Extensions

Getting Bits-in-Extensions Products

The number of Bits necessary to exchange for a product is a flat rate, regardless of the viewer’s geographical location. To display the amount to the viewer, the extension helper for Bits in Extensions uses the getProductsfunction. You call getProductsas part of your extension’s initialization process, to get the correct list of products that you will display on your extension’s storefront. This helper method returns a promise, which you can use as follows:

Twitch.ext.bits.getProducts().then(function(products) {
   console.log(products); // [ { sku: 'abc123', cost: { type: 'bits', amount: '10' } } ]
});

For details, see getProducts in the section on Bits in Extension helper methods (in the Extensions Reference).

Exchanging Bits for a Product

When a viewer wants to use Bits within an extension, you call the [useBits](/extensions/reference/#helper-bits) function on the extension helper. This function takes in the SKU of the product the viewer wants to exchange. The function is invoked as follows:

let productSku = 'abc123';
Twitch.ext.bits.useBits(productSku);

If the Viewer is Logged In

When useBits is invoked, if the viewer is logged in, the Twitch UI displays a dialog, showing:

If … Then …
There are enough Bits in the account. A Confirm button is displayed. The dialog shows what the remaining Bits balance will be after the transaction is completed. It also informs users that clicking on the button will share their identity with your extension. 
There are not enough Bits in the account. No Confirm button is displayed. The dialogue shows how many more Bits are needed to confirm the transaction

Note:  Before confirmation, while the dialog UI is open, users are blocked from interacting with the extension. Clicking anywhere outside the dialog causes the dialog to close and allows the user to interact with the extension again. Also, users can cancel the flow at any point in the process.

When a user confirms a transaction, the Bits amount displayed in the dialog is locked in.

When processing is completed, a message is sent to your extension front end through the onTransactionComplete()callback:

If ...Then ...
The product is configured in the catalog to broadcast to all users.A message is sent to all instances of your extension running on the channel where the Bits transaction was initiated.
The product is not configured to broadcast to all users.A message is sent only to instances of your extension running on the channel where:
  • The Bits transaction was initiated and
  • The viewer who initiated the transaction is logged in.

If the Viewer is Not Logged In

If the viewer is not logged in when useBitsis invoked, the UI indicates that login is required. If there is any other error (for example, if the user is banned or the SKU was removed from the catalog after products were loaded by the extension front end), a generic error message is displayed to the user. This message disappears after 3 seconds.

For More Information

For … See …
Current information on Bits pricing Cheer with Bits
Bits-related reference information Extensions Reference
Information to familiarize yourself with Extensions, before using Bits in Extensions All the Extensions documentation
Information on JSON Web Tokens (JWTs), including how to verify them JSON Web Tokens