How to Integrate Roku In-App Billing with a Third-Party Subscription Billing Service

Tom Schaeffer
Float Left Insights
4 min readMar 2, 2017

This article provides a sample workflow for publishers looking to deploy SVOD or TVOD services on Roku. It describes how to implement a Roku Channel using the Roku In-App-Billing (IAB) system, in conjunction with an existing subscription service. This would allow a user to subscribe to a Roku Channel using their Roku payment info, or login to an existing subscription.

What is Roku In App Billing (IAB)?

This allows a user to install a Roku Channel for Free, without having to do a one time or monthly payment up front. This feature would allow the potential subscriber to browse the channel content while placing other content behind a paywall.

Roku’s IAB system allows content publishers to leverage Roku’s billing platform within their channel, as either one-time payments, or as daily, monthly, or yearly subscriptions.

Integration Process

The Welcome Screen (Launching App) — This should include 3 options for the user:

  • Create New Account — This will implement the Roku In App Billing
  • Login — Allow user to login to an existing account (through third-party service)
  • Browse — Allow the user to browse the channel content without a subscription

Create New Account:

  • Display information on screen about the subscription and costs, along with two action buttons:
  • Subscribe — continue account creation
  • Back — Exit account creation

Display a request to share information. This information comes directly from Roku for a given user — this includes first name, last name, and email. (Other user data available if needed.) This info is required so we can send this data to the client via API service, as part of the account creation on the content publishers end. Two action buttons:

  • Don’t Share — Exit account creation
  • Share — Continue account creation

Using the Email address, call the content publisher’s API for email validation. API should have a returned response, as such:

  • Does email exist, and if so, is it tied to active subscription?

If “Yes” — prompt user that they can login using their existing email & password.

If “No” — continue account creation

Display Pin Number Screen — This shows the Roku pin entry form that a user has to complete to confirm their subscription. Display three action buttons:

  • Subscribe for $X/month — Confirms and activates subscription
  • Subscription Terms — Launches dialog box with info
  • Back — Returns to previous screen

After subscription is completed and confirmed, we need to send information to the content publisher’s API, so that they can complete the account creation on their database. This will allow a user to login to other devices, using the account created through the Roku.Send to API: first name, last name, email, subscription token IDContent publisher should source this user as coming from the Roku billing platform

Receive response for success or failure

If the Content Publisher’s API for account creation fails, we need to store the user data locally on the Roku, to attempt sending this data at a future time.

Store data on Roku: firstname, lastname, email, subscription token ID, flagAccountCreated = false

Each time the Roku channel starts, if flagAccountCreated = false, attempt to re-send the data to the client’s API call.

If the API call is successful, set the flagAccountCreated =True

Login:

Different login methods could be implemented in the channel. One method or both could be implemented:

  1. Login using Username/Password
  2. Device Authentication

Login with Username/Password:

  • Display Username keyboard entry form
  • Display Password keyboard entry form
  • Call content publisher’s login API to confirm credentials

If Login is successful:

  • Store Username/Password on the Roku device. Upon each Channel load, we will call the publishers login API to confirm credentials are still valid.
  • Proceed into channel

If Login is not successful

  • Prompt user with message
  • Device Authentication:
  • Display message to the user, directing them to a website to login, and enter the code on the screen.
  • Once the code has been entered, allow them access into the channel
  • The Roku serial is passed to the publisher, and a connection is made between the Roku device and the existing user account.

Browse:

  • This would allow a user to continue into the channel, browsing content. Content that requires an account can be placed behind a paywall. The paywall would display, allowing the user to login, create an account, or continue browsing.

How does the Client check a Roku User’s Billing Status?

If a user signs up with Roku In App Billing, the publisher needs a way to confirm if the user has an active subscription through Roku’s billing platform. Call Roku’s API using the subscription token ID “transactionid”.

http://sdkdocs.roku.com/display/sdkdoc/Web+Service+API/listen/transaction-service.svc/validate-transaction/{devtoken}/{transactionid}.

The parameter passed in, “transactionid” for this call = “subscription token ID”, which was sent during account creation. As a subscription renews a new transaction id is generated for each renewal, but you can always verify the current state of the subscription using the original transaction id the user subscribed with.

The publisher can have a scheduled job that runs on their users who have signed up using the Roku billing platform, to check the status of their account.

Account Creation on Publisher’s Side

After a user creates an account through the Roku IAB system, and we send user data to the publisher’s API, the following steps are recommended:

  • Add the User to your database
  • Source these users as Roku IAB users
  • Send a welcome email to the user, with their username/email, and auto-generated password. Inform them that they can login to the website and/or other connected devices with their credentials.

Tom Schaeffer is the CEO of Float Left Interactive, an award-winning technology company helping content owners, programmers, and operators transition to digital distribution through high-quality TV experiences.

Visit Tom’s Blog, here.

--

--

Tom Schaeffer
Float Left Insights

Digital Writer & Solopreneur || Ghostwriter for B2B Tech Founders & CEOs || Building Influential Personal Brands Through High-Impact Writing