payment.appCashback ✎ Edit on GitHub

Selects and rewards game payers inside specified period.

NameRequiredTypeDescription
from true String

Period start inclusive. Format yyyy.MM.dd HH:mm. Example 2019.01.01 00:00

to true String

Period end exclusive. Format yyyy.MM.dd HH:mm. Example 2019.01.02 00:00

amount true Integer

Cashback amounts in OKs. Example 10000,1000,100

Authorization

Session is prohibited

Required permissions

  • VALUABLE_ACCESS

Application should have enough OKs on it’s cashback account

Be aware that all rewards are transferred to users at the moment method returned a response. Make sure you don’t invoke it for testing purpose

Example usage

Method is used to select winners for 1000 ОКs promo.

To select multiple winners you need to invoke a method single time.

With this method you can select required amount of winners by listing all rewards users are going to get for this promo in amount parameter of the method.

For example, you are running a following promo in your app:

  • duration: from 12:00 15 August 2019 to 18:00 16 August 2019;
  • total prize pool is 8 000 OKs;
  • total amount of winners is 5;
  • prizes are: 3 000 OKs, 2 000 OKs, 1 000 OKs, 1 000 OKs, 1 000 OKs

Then you need to invoke this method with following parameters’ values:

from: 2019.08.15 12:00

to: 2019.08.16 16:00

amount: 3000,2000,1000,1000,1000

If your cashback account has enough OKs on it then all winners are going to be listed in method’s response just like this:

{"users":[1234567890,1234567891,1234567892,1234567893,1234567894]}

Response

{ "users": [ "Long" ] }

Application paramters

User session data

Method

List of paramters

Используем для подписи secret_key = session_secret_key
Используем для подписи secret_key = application_secret_key
Используем для подписи secret_key = MD5(access_token + application_secret_key)
secret_key =
Сортируем и склеиваем параметры запроса и secret_key
Рассчитываем MD5 от полученной строки и получаем параметр sig