Using the StreamKit Rewards Sandbox

René Preuß
3 min readJan 5, 2019

--

Introduction

In this article we introduce our latest Developer Tools, which allows you to test your StreamKit Rewards. Rewards are a fun new way to distribute merchandise or products from sponsors just for watching streamers on Twitch! StreamKit reports users’ viewing activity to you, so you can define the rewards and reward logic for Rewards.

The Basics

The Rewards System is available in two variants:

  • Programmable (explained here).
  • As a complete solution without self-hosting anything.

Since our tool is primarily intended for game developers & automated systems, we will focus in this article on the programmable solution. Another article for our complete solution will follow.

Rewards Heartbeat Service

The StreamKit Rewards Heartbeat Service sends a Heartbeat to your Heartbeat endpoint every 10 minutes. Information such as viewers, rewards campaign and other metadata is sent to this endpoint.

Your Heartbeat endpoint decides when requirements have been met. If you think the spectator has reached the requirements, you can release the drop for the spectator.

Rewards Fulfilment Service

With the Rewards Fulfilment Service you can send your reward to the viewer. The Rewards Fulfilment Service calls your Fulfilment endpoint as soon as the user clicks on the “Claim Reward” button. As response you can define a message, which is then sent to the user.

Example:

1. The viewer clicks “Claim Reward”.
2. Your fulfillment creates a voucher in Shopify.
3. We send your voucher as item or whisper/e-mail.

Getting Started

In the following two PHP examples are shown. They show how a request should be handled. The two requests are sent as POST requests, in addition a data attribute is transmitted in the body in which the data was signed by JWT:

StreamKit Rewards Campaign Heartbeat Backend Example
StreamKit Rewards Campaign Fulfillment Backend Example

Testing Rewards

In our developer area Developers > Rewards Sandbox you will find our sandbox for testing our Rewards Heartbeat & Fulfillment Service.

The two services simulate the requests at your backend, the requests are filled exactly as if you had a real StreamKit Reward Campaign. With this way you can test our service without having a partner account or reward campaign and know at the end that your backend will also work productively later.

Interface of the StreamKit Rewards Sandbox

How to Become a Rewards Partner

If you want to become a rewards creator, please send us your application at partners@bitinflow.com with the Subject “StreamKit Rewards”.

Conclusion

With our Rewards Heartbeat & Fulfillment Service Sandbox you can test your backend in a few steps without having a partner account or a rewards campaign.

Did You Find This Article Wonderful?

Show us that you like the content and give us a round of applause! Follow us on Medium, Twitter & Discord to stay up to date with the latest news from bitinflow Studios!

--

--

René Preuß
René Preuß

Written by René Preuß

I am a software developer. On the Internet I am known as GhostZero.

No responses yet