Replenish user balance

In the Provider edition you can add money manually using admin panel in the adding and correction balance section.

The same operation can be done using Panel-API. You should do:

  • Authorize in Panel-API
  • Get an id of the user’s account
  • Add money to required ID


Panel-API is a part of API. Let’s consider the API is available at URI (see Nginx settings). Then Panel-API is available at URI


For authorization you can do GET or POST request /account/auth/ with parameters login (panel user login) and password (its password), that will return a JSON object, containing hash (key) session for the further operations.

For example, just after installation there is one panel user with login “admin” and password “admin”, you can authorize with this name like this (all examples of HTTP inquiries are given using the curl utility):

# GET:
$ curl ''
# or POST:
$ curl --data 'login=admin&password=admin' ''

And you’ll get answer like this:

  'hash': '1dc2b813769d846c2c15030884948117',
  'success': true,
  'permissions': {

Value of the hash field (in this case it’s “1dc2b813769d846c2c15030884948117”) it has to be remembered (kept) for further use.

In case you have made mistakes or incorrect requisites have been specified, HTTP answer code won’t be equal 200, value of the success field will be false, and status field will contain mistake description.

For example, if there is no such user the answer will be like this:

  'success': false,
  'status': {
    'code': 12,
    'description': 'Dealer not found'

Possible error codes:

  • code = 1, description = “Database error” – means a critical error in work of service with database.
  • 7 (Invalid parameters) – one of inquiry obligatory parameters isn’t transferred
  • 11 (Access denied) – the panel user is blocked
  • 12 (Dealer not found) – the panel user with such login and password isn’t found.

Descriptions of errors is just a hint and it can be changed in the future so you shouldn’t be guided by it.

You must keep in mind that string type containing any symbols except ASCII codes from 32 to 127 must be URL encoded before transfer.

For example, for authorization with the login “admin” and the password “password” the request should be:

$ curl --data 'login=admin&password=%D0%BF%D0%B0%D1%80%D0%BE%D0%BB%D1%8C' ''

ID of monitoring user

It is an identifier of user’s account that user can see among user information.

The same identifier is displayed in a list of users in the administrator’s panel.

The list of users can be received through Panel-APIv2 using /user/list/ request. All parameters, except hash aren’t obligatory:

  • hash – the session key that is received at authorization step.
  • filter – if it is specified, only those users will be loaded,
      one of properties (see further) includes this string.
      The filtration is made by fields (see description  below): *id*, *login*, *last_name*, *first_name*, 
        *middle_name*, *phone*, *post_city*, *post_region*, *post_country*, *post_index*, 
        *post_street_address*, *registered_country*, *registered_index*, *registered_region*, 
        *registered_city*, *registered_street_address*, *tin*, *iec* и *legal_name*.
  • order_by – sort by one of properties:
      *id* (by default), *login*, *last_name*, *balance*, *bonus*, 
      *phone* or *post_city*.
  • ascending – sort by increasing of the corresponding field (order_by),
      if value is *true*  (by default), or by decrease, if value is *false*.
  • limit – maximum number of entries which will be returned. It is used for splitting to pages.
  • offset – position in received list (after sorting and filtering). From this position records will be returned.
      By default *0*, i.e. from the beginning.

    For example, such inquiry:

      $ curl --data 'hash=1dc2b813769d846c2c15030884948117&limit=2&filter=demo' ''

It will return the following answer (the answer doesn’t contain comments that have been added for description):

  'success': true,
  'list': [
      'id': 3, // user ID you can doing further actions, for example add money.
      'dealer_id': 1, // panel user ID that doing request and that have monitoring user with id above.
      'activated': true, // the user passed activation (email confirmation).
      'login': '', // user login/email.
      'first_name': 'Test', // name.
      'middle_name': '', // middle name.
      'last_name': 'user', // surname.
      'legal_type': 'individual', // 'individual', 'legal_entity' or 'sole_trader'.
      'phone': '79123456789', // phone number.
      'post_country': 'Russia', // postal address.
      'post_city': 'Moscow',
      'post_index': '123456',
      'post_region': 'Moscow',
      'post_street_address': 'Pushkin 22',
      'registered_country': '', // legal address.
      'registered_index': '',
      'registered_region': '',
      'registered_city': '',
      'registered_street_address': '',
      'legal_name': '', // legal name.
      'tin': '', // TIN
      'iec': '', // IEC
      'balance': 96662.08, // balance.
      'bonus': 100.0919, // bonus balance.
      'creation_date': '2014-03-16 13:15:19' // registration date.
      ... // one more user
  'count': 79 // total number of users filtered by condition
               // (i.e. one of its properties includes a substring 'demo').

Balance changing

To change balance of a user you should do a request to Panel-APIv2 on /user/transaction/change_balance/. This request changes (increase or reduce, but not less zero) user balance or its bonus balance.

All parameters – obligatory:

  • hash – the session key received at authorization step.
  • user_id – user ID
  • amount – amount that will be added to balance (or to bonus balance) of the user. To reduce balance, you should specify a negative number.
  • type – type – what balance is required to change: “balance” (main balance of the user) or “bonus” (bonus balance)
  • text – description of transaction. It is must be not less than five symbols.

Request example:

$ curl --data 'hash=1dc2b813769d846c2c15030884948117&user_id=3&amount=100&type=balance&text=test+pay' 

In success request finishing necessary type of the user’s balance will have been changed and transaction with specified description will have been created. In the example above user’s balance will be increased by 100 and transaction with the description “test pay” will be added.

The answer in this case will be something like this:

{ 'success': true }

Possible errors:

  • 201 (Not found in database) – if the user with this ID doesn’t exist
  • 251 (Insufficient funds) – if amount is negative and user has got insufficient money to write off.

If you have more questions please contact our support team

Contact Us

USA: +1 858 815 9045

Mexico: +52 334 1642158

UK: +44 808 1641499

France: +33 644 605141

Germany: +49 157359 88250

Russia: +7 495 317 1622

Log in