Skip to main content

Subscriptions implementation

Getting Started

To get started, it is important to choose the right API for your use-case. There are three types of Tebex integrations available for your app.

To review the different types of implementations, see the Subscription types table.

The Overwolf Subscriptions APIs are several sets of endpoints that allow 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.

Sample app

For an example of how to implement the Overwolf Subscriptions API, see the sample app.

Prerequisites

  • A registered account with Tebex.

Step 1: Create an Overwolf App Tebex Store

To create a Tebex store:

  1. Login to your Tebex account and press Projects from the menu.
  2. Press Create another project.
  3. Enter the name of your project.
  4. Choose a currency. (default is USD)
  5. In the *Your project section, choose I have an Overwolf app.
  6. Check the agreements box, then press Continue, and then Confirm.
important

Once you have created your project, the apps integration keys are displayed. Make sure you copy them and keep them in a secure place, then press Continue for the next step.

Step 2: Setting up a webhook

Webhooks are required in order to make sure your store is working with the Overwolf Subscriptions API.

To create a webhook:

  1. Press Configure webhooks, then Setup webhooks.
  2. In the Endpoint URL, use https://subscriptions-api.overwolf.com/tebex-webhooks/<YOUR_PUBLIC_TOKEN>.
  3. In the Webhook types, select all of the options, then press Add.
note

If the endpoint URL validation fails, you are not able to edit the URL and you need to delete the endpoint and try again.

Step 3: Setting up subscription plans

Once you have completed setting up the store, you are ready to create packages. You can create both tiered and non-tiered packages.

Creating categories

tip

Create new categories based on the packages that you are offering.

important
  • You must enable tiers in order to enable upgrade/downgrade options for packages.
  • Once you have enabled tiers in your category, you are not able to disable this option.

To create a category:

  1. In the left menu press Packages, then press Add new and select Category.
  2. Enter a name for the category of your package.
  3. Upload an image (optional).
  4. In the tabs below, enable the settings you need for your package(s).
General tab

In the General tab, enable/disable the following options:

  1. Tiers—enables upgrade/downgrade options for packages in the category.
  2. Parent category—choose a parent category. If there is no parent category, leave the default (Don't set this category as a subcategory of another).
  3. Package display formation— select from the drop down.
Visibility tab

In the Visibility tab enable/disable the following options:

  1. Only show if customer has purchased package— select an option from the drop down.
  2. Disable this category and remove it from the webstore—enable/disable.
  3. Order the packages in this category by price—enable/disable.
Cumulative tab

In the Cumulative tab enable/disable the following options: (only available when tiers are not enabled)

  1. Cumulate the purchases inside of this category—enable/disable.
  2. Disable cumulative packages that have a lower price—enable/disable.
Advanced tab

In the Advanced tab enable/disable the following options:

  1. Allow the customer to only purchase one package from this category—enable/disable.
  2. Delete pending expiry commands of other packages—enable/disable.
  3. Add any remaining time of other purchased packages—enable/disable.
  1. When the package has been configured, press Create.

Once you have created your category, you can create packages.

Creating packages

To create a package:

  1. When in a category, press Create a package. You can also pressAdd new, and select Package.
  2. Enter a name for the package.
  3. Enter a description of the package.
  4. Make sure your package is assigned to the correct category. If no category is assigned, select one from the drop down menu. If the category you need is not listed, follow the create a category step first.
note

The package configuration menu changes based on the category that you assign it.

Packages with tiers
  1. In the Pricing tab, enter the price for the package, then configure the Remove from Customer after settings.
  2. In the Visibility tab, select dates from the calendar drop down for the Publish on webstore and Remove from webstore options. You can also use the slider to enable or disable Show this package to customers who haven't logged into the webstore and Display this package on the webstore and disable it entirely options.
  3. In the Variables tab, create a new variable. You are redirected to the New variables form.
  4. In the Goal tab, create a new community goal. You are redirected to the Community goals page. Press Create your first community goal to create a new goal.
  5. In the Webhooks tab, create a webhook that assigns custom data to the package.
  6. In the Discord actions pane, press + Discord actions to enable and configure Discord actions for the package.
Packages without tiers
  1. In the Pricing tab, enter the price for the package. Select a recurring payment option from the Recurring payment drop down, and then configure the Remove from Customer after settings.
  2. In the Limits tab, press Configure to configure the Global limit and the User limit settings. Use the slider to enable/disable Including packages that have been removed from customers when calculating limits option.
  3. In the Restrictions tab, select a package from the Require packages drop down, then use the sliders to configure the Require the customer to have purchased one package from the selected list and the Allow the customer to increase the quantity of this package when purchasing options.
  4. In the Visibility tab, select dates from the calendar drop down for the Publish on webstore and Remove from webstore options. You can also use the slider to enable or disable Show this package to customers who haven't logged into the webstore and Display this package on the webstore and disable it entirely options.
  5. Int he Gifting tab, use the sliders to enable/disable the Allow package to be purchased using gift cards and Allow this package to be gifted options.
  6. In the Variables tab, create a new variable. You are redirected to the New variables form.
  7. In the Goal tab, create a new community goal. You are redirected to the Community goals page. Press Create your first community goal to create a new goal.
  8. In the Upselling tab, to add Additional products, to Increase quantity, or offer Alternative products. Press +Add, then fill out the form including an image, the Package it belongs to, and the Offer price.
  9. In the Webhooks tab, create a webhook that assigns custom data to the package.
  10. In the Discord actions pane, configure what the customer receives when purchasing the package. Press + Discord actions to enable and configure Discord actions for the package. Press +File doownload +Gift card

Store ID and Private Key

To link your store to the Overwolf API, you need your store's public and private keys.

To see your store's API keys: In your Tebex store, in the left menu, press Integrations, then press API Keys.

note

You can only see the API keys of the project you are currently logged in to.

You can then view your keys:

  • Private Key—the private key you need to pass to the Overwolf Subscriptions API.
  • Public Token—called the Store ID. This is the public key used as your store's identifier and passed to the Overwolf Subscriptions API.

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

  • Retrieve from the Tebex store account. public_token: '',
  • Retrieve from the Tebex store account. private_key: '',
  • Retrieve from the Tebex store account. webhook_token: '',
  • Your app's UUID:
    • Overwolf Platform—retrieve from the Overwolf Packages view window under your App's entry, under the UID field.
    • Overwolf Electron—retrieve your Unique app ID.
  • Your app_id: '' for the desired deeplink scheme. This scheme is used to notify you of the Checkout flow's progress.

Implementation

Implementations may vary based on your app and subscription plans. Typically the app flow will be as follows:

  1. The current subscription status is checked at app launch and then it initializes the subscription's features.

    Use the active subscriptions endpoint to retrieve a list of active subscriptions.

  2. There is a dedicated section of the app that show users a listing of all available subscription plans.

    Use the subscription plans endpoint to retrieve a listing of available subscriptions.

  3. If the user chooses to purchase a specific plan, the relevant checkout link opens for them in their browser.

    Use the Checkout link endpoint to generate the purchase link.

  4. Return to step 1 after a successful subscription purchase.

For more information, see the API documentation for Overwolf Subscriptions.