TransferMoney

Transfers funds between clients' shared accounts.

This method is only available to advertising agencies.

There is a slight delay before transferring funds, usually no more than five minutes.

Restrictions

Funds can be transferred from one client's shared account to another client's shared account, provided they both use the same currency.

Only one transfer can be made in a single call of the action.

No more than 3 transfers per day can be made for a single account.

Input data

The input data structure in JSON is shown below.

Attention. It is mandatory to include the finance_token and operation_num parameters in the request. For information on generating the token, see the section Working with the shared account.
{
   "method": "AccountManagement",
   "finance_token": (string),
   "operation_num": (int),
   "param": {
      /* AccountManagementRequest */
      "Action": (string),
      "Transfers": [
         {  /* Transfer */
            "FromAccountID": (int),
            "ToAccountID": (int),
            "Amount": (float),
            "Currency": (string)
         }
         ...
      ]
   }
}

Parameters are described below.

Parameter Description Required
AccountManagementRequest object
Action Action: TransferMoney. Yes
Transfers Array containing a single Transfer object. Yes
Transfer object
FromAccountID ID of the shared account that funds are being deducted from. Yes
ToAccountID ID of the shared account that funds are being deposited to. Yes
Amount

The transfer amount (in the currency specified in the Currency parameter). For a value in a real currency, don't include VAT.

Before deducting or crediting the amount, it is mathematically rounded to the second decimal point (for all currencies, including the tenge).

Use the Get operation to find out the amount available for transfer.

Yes
Currency

The currency that the amount is shown in.

Acceptable values: RUB, CHF, EUR, KZT, TRY, UAH, USD, BYN. The value must match the currency of the shared account; otherwise, an error is returned with code 245.

Yes
Parameter Description Required
AccountManagementRequest object
Action Action: TransferMoney. Yes
Transfers Array containing a single Transfer object. Yes
Transfer object
FromAccountID ID of the shared account that funds are being deducted from. Yes
ToAccountID ID of the shared account that funds are being deposited to. Yes
Amount

The transfer amount (in the currency specified in the Currency parameter). For a value in a real currency, don't include VAT.

Before deducting or crediting the amount, it is mathematically rounded to the second decimal point (for all currencies, including the tenge).

Use the Get operation to find out the amount available for transfer.

Yes
Currency

The currency that the amount is shown in.

Acceptable values: RUB, CHF, EUR, KZT, TRY, UAH, USD, BYN. The value must match the currency of the shared account; otherwise, an error is returned with code 245.

Yes

Output data

The output data structure in JSON is shown below.

{
   "data": {
      /* AccountManagementResponse */
      "ActionsResult": [
         {  /* AccountActionResult */
            
            "AccountID": (int)
            "Errors": [
               {  /* Error */
                  "FaultCode": (int),
                  "FaultString": (string),
                  "FaultDetail": (string)
               }
               ...
            ]
         }
         ...
      ]
   }
}

Parameters are described below.

Parameter Description
AccountManagementResponse object
ActionsResult

Array of AccountActionResult objects. Each object corresponds to an item in the Transfers input array and contains:

  • The ID of the shared account, if the transfer was successful.
  • The Errors array, if an error occurred.

The items in the array are in the same order as the objects in the Transfers input array.

AccountActionResult object
AccountID ID of the shared account that funds were deducted from.
Errors Array of Error objects with errors that occurred while transferring funds.
Error object
FaultCode Error code.
FaultString Textual message about the error.
FaultDetail Detailed description of the reason for the error.
Parameter Description
AccountManagementResponse object
ActionsResult

Array of AccountActionResult objects. Each object corresponds to an item in the Transfers input array and contains:

  • The ID of the shared account, if the transfer was successful.
  • The Errors array, if an error occurred.

The items in the array are in the same order as the objects in the Transfers input array.

AccountActionResult object
AccountID ID of the shared account that funds were deducted from.
Errors Array of Error objects with errors that occurred while transferring funds.
Error object
FaultCode Error code.
FaultString Textual message about the error.
FaultDetail Detailed description of the reason for the error.

Examples of input data

Python

{
   'Action': 'TransferMoney',
   'Transfers': [
      {
         'FromAccountID': 1327837,
         'ToAccountID': 1327944,
         'Amount': 25000.0,
         'Currency': 'RUB'
      }
   ]
}

PHP

array(
   'Action' => 'TransferMoney',
   'Transfers' => array(
      array(
         'FromAccountID' => 1327837,
         'ToAccountID' => 1327944,
         'Amount' => 25000.0,
         'Currency' => 'RUB'
      )
   )
)

Perl

{
   'Action' => 'TransferMoney',
   'Transfers' => [
      {
         'FromAccountID' => 1327837,
         'ToAccountID' => 1327944,
         'Amount' => 25000.0,
         'Currency' => 'RUB'
      }
   ]
}