Subscriptions in games

OK offers users an opportunity to get in-app bonuses, items, and services in the form of regular subscriptions, rather than the form of a one-time purchase.

In this case, OKs for services will be withdrawn from the user’s account once for a certain amount of time instead of just once.

Subscriptions are supported on all platforms:

  • desktop web;
  • mobile web;
  • android;
  • iOS.

What it looks like

Game subscriptions are integrated into the OK interface. Users can activate a game subscription on its dialog screen with the description, cost and additional information about the subscription. Users can unsubscribe or purchase an in-game service on the same screen.

Desktop web subscription

Subscription on mobile platforms

If the user has successfully subscribed to an in-game service, they will see a list of active user subscriptions in the game subscription section (WEB, MOB) for the current game:


We highly recommend to use a trial period to promote your game subscriptions. According to our data, most users refuse to subscribe if they cannot try the features of the subscription for free.

The flexible subscription configuration system allows:

  • management of the subscription’s trial period, the time period during which users can try the features of the subscription for free. The duration of the trial period can be set as days, hours, or minutes.
  • management of the subscription’s period, the time period during which the users can enjoy all features of the subscription. The cost of the subscription is debited from the user’s account at the beginning of each period. The duration of the subscription period can be set as days, hours, or minutes.
  • setting a unique name, description or image for the subscription to tell users about the features of the subscription. You can list a name, a description and an image to be displayed to the user when subscribing for each subscription.
  • setting the subscription’s cost. You can set an individual cost of subscription period for each subscription. The cost of subscription is shown in OKs.

How it works

Follow the steps below to implement your game subscription:

  • register your new game subscription;
  • implement the subscription function using our API.

How to add a game subscription

To register your game subscription send us the following subscription data using email

Trial periodTrial period duration. The minimum duration of a trial period is 1 dayDays, hours, minutes
DurationPaid subscription duration. The minimum subscription duration is 1 weekDays, hours, minutes
CostCost of a single subscription periodOKs
Subscription imageLink to the subscription image (size of the image: 256×256) 
ProductIdSubscription string identifier on OK 
NameName of the subscription (1–3 words). The name should reflect the essence of the subscription 
DescriptionShort description of the subscription (1–2 sentences). The description should outline the main features of the subscription service the user is buying 

The subscription can look as follows:

  • trial period: 3 days;
  • duration: 1 day;
  • cost: 50 OKs;
  • productId: apples;
  • name: “three apples daily”;
  • description: “receive three bonus apples daily!”

In this case, when the subscription is active the user should receive three bonus apples and pay 50 OKs every day. The first three days of the subscription will be for free.

Subscription call

You can offer your subscription to users by showing them a special screen with the information about subscription and activation button.

To do this use FAPI-method ui.showPaymentSubscription.

Subscription payments

After the activation of the subscription and the end of its trial period the cost of the subscription will be debited from the user’s account in the form of OKs.

All payments should be listed in the application payments statistics.

If the user does not have enough OKs to pay for the subscription, the cost of the subscription is debited from the bank card linked to the user’s profile.

Cancellation of subscription

Users can unsubscribe at any time.

Users will no longer pay for the subscription if they have unsubscribed

How to monitor the status of the subscription

Subscription monitoring system works similarly to the payment callbacks. After every subscription action (e.g. new subscription, cancellation of subscription or payment for the subscription) the callback url of the application receives the appropriate GET request with the subscription parameters.

In response to this request, our service waits for the reply similar to the reply to the general in-game payment: callbacks.payment

The request should be validated. If it is approved by the game, the callback service sends a 200 code reply in XML format.

According to the subscription action, the application should react as follows:

  • new subscription (first payment for the subscription): the user receives the bonus/service and an optional notification that the game subscription is successful;
  • cancellation of the subscription: the user can receive an optional notification about the end/cancellation of the subscription. The bonuses and other features of the subscription become unavailable to the user;
  • payment for the subscription: the user receives bonuses or other features of the subscription.

With every such action, the subscription end date parameter used to manage the subscriptions in your game will be returned to you. The subscription end date parameter is returned as one of the attributes of the field extra_attributes, subscriptionEndDate.

Subscription end date format: DD-MM-YYYY hh:mm:ss.

Request for new subscription/payment for subscription

Moscow time (UTC+3:00) is used as a time zone for all events

Request for a subscription payment and for a new subscription payment is the same. The callback url receives the following request:

&extra_attributes={“subscriptionEndDate”:”20-11-2018 13:07:04”,”action”:”reg_subscription”}

Request for trial subscription

When the user activates the trial period, the callback url receives the request with a different value of the parameter extra_attributes without a transaction id:

&extra_attributes={“subscriptionEndDate”:”20-11-2018 13:07:04”,”action”: “trial_subscription”}

Please pay attention to the value of the amount parameter. When the user selects the trial period, this value is 0.

Request for cancellation of the subscription

When the user unsubscribes, the callback url receives the request with the cancellation information in the extra_attributes parameter:

&extra_attributes={“subscriptionEndDate”:”20-11-2018 13:07:04”,”action”: “unsubscribe”}

Please pay attention to the value of the amount parameter. When the user unsubscribes, this value is 0.