Skip to main content

Implementation

About Subscriptions

This page discusses the different available Subscriptions APIs and their specific implementation details.

The Overwolf Subscriptions APIs are several sets of endpoints, allowing App developers to easily integrate subscriptions into their Apps, using Tebex Checkout. Apps using this API can then access a simple subscriptions management system, without needing to worry about processing payments and keeping track of subscription statuses, and without the need for any server-side logic.

Getting Started

To get started, it is important to choose the right API for you and your use-case

Subscription API

tebex nametebex name
checkout

tebex nametebex name
headless

overwolf nameoverwolf name
subscriptions

Implementation Overhead

Plan Management

No
Yes
Yes

Requires Baskets

Yes
Yes
No

Requires a Server

Yes
Yes
No

Implementation Details

Framework Independent

Yes
Yes
Yes

Can be Combined

Yes
Yes
Yes

Authentication

Any
Any
Any

Supported Plans

Any
Any
Subscriptions

The Overwolf Subscriptions API works by exposing a few simple endpoints, which the App can then interact with, in order to perform most common interactions with the Tebex Checkout API.

Sample App

For an example implementation of the Overwolf Subscriptions API, see the relevant sample app.

Creating an Overwolf App Tebex Store

The Tebex Checkout API requires an appropriate "Store" to be defined. To create a store:

Setting up webhook

To make sure that the store is synchronized with the Overwolf Subscriptions API, you MUST create a webhook linking the two:

  • Head to the Webhooks Endpoints page (make sure you're viewing the right store).
  • First of all - at the bottom of the page, you'll find the Secret Key, used for linking your store with the Overwolf Subscriptions API.
  • Now, Create a new Endpoint, and mark ALL Webhook Types for it.
  • For the Endpoint's URL, use https://subscriptions-api.overwolf.com/tebex-webhooks/${YOUR_PUBLIC_TOKEN}.

Setting up subscription plans

Package Deliverables

You MUST first configure a webhook before you can create a package.

The store is now set up, but it still needs to define packages that can be sold. To do that:

  • Head to the Packages page (make sure you're viewing the right store).
  • Create a package for every plan you wish to support, supplying it with all the details you want. Keep in mind that:
    • Pricing - The package MUST be set to Recurring Payment = Charge a recurring subscription, to ensure that it is an actual subscription.

Store ID and Private Key

In order to link your store to the Overwolf API, you will need to know your store's public and private keys. These can be found in the API Keys page.

  • Private Key - A private key, used by the Overwolf Subscriptions API.
  • Public Token - Also called Store ID - A public key, used as your store's identifier with the Overwolf Subscriptions API.

To finish linking your Tebex Store with the Overwolf Subscriptions API, contact us. You will then be asked to provide the following:

{
// Can be gotten [here](#store-id-and-private-key)
public_token: '',
// Can be gotten [here](#store-id-and-private-key)
private_key: '',
// Can be gotten [here](#setting-up-webhook)
webhook_token: '',
/**
* Your App's UID.
* - Overwolf Platform: Can be seen in the Overwolf Packages view window under your App's entry, under the `UID` field
* - Overwolf Electron: Can be gotten [as follows](https://overwolf.github.io/tools/ow-electron#fetching-your-app-id)
*/
app_id: '',
/**
* Your desired deeplink scheme. This scheme will be used to notify you of the Checkout flow's progress.
* - Overwolf Platform: Can be set using [url_protocol](https://overwolf.github.io/api/manifest#url_protocol-object)
* - Overwolf Electron: See [Electron Deeplinks](https://www.electronjs.org/docs/latest/tutorial/launch-app-from-url-in-another-app)
*/
deeplink_scheme: '',
}

Implementation

Full API documentation for the Overwolf Subscriptions API is available here.

In order to actually implement subscriptions in your App, you need to implement the following three general flows:

The exact implementation may vary drastically between Apps, in the same way that the plans themselves may differ. However, usually, it'll act in the following way:

  • On App launch, check for the current subscription status, and initialize the different features accordingly.
  • In a specific section of the App, show users a listing of all available subscription plans.
  • If they choose to purchase a specific plan, open the relevant checkout link for them in their browser, where they can purchase it.
  • Periodically, and especially after a successful subscription purchase, re-check the current subscription status, and change the App's behavior accordingly.