Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages

transferMoney method

Вы здесь:

This is a method to transfer money from one user to another. Both users must be linked to the reseller user calling the method. You can also transfer money from or to your account.

If you transfer money from your account and you have a reseller discount, the amount increased by the amount of this discount will be credited to the account of the user to whom you transfer money.

This method is only possible for accounts that have a reseller status.

Principle of use

Syntax and URL to call the method
transferMoney (string source_login, string target_login, int sum,
string currency)
https://api.unisender.com/en/api/transferMoney?format=json&api_key=KEY&source_login=FROM&target_login=TO&sum=
SUM&currency=CURR
Arguments
api_key *API access key.
source_login *Login of the user from whose account money is debited.
target_login *Login of the user to whose account money is credited.
sum *Amount transferred from one account to another.
currency *The currency in which the amount is specified – RUB, EUR, UAH or USD. If the currency does not match the account currencies of one of the users, the amount will be converted at the internal rate.
Return value
JSON object with the following fields:
source_old_balanceThe user account balance before debiting money.
source_new_balanceThe user account balance after debiting money.
source_currencyCurrency of the user from whose account money is debited.
target_old_balanceThe user account balance before crediting money.
target_new_balanceThe user account balance after crediting money.
target_currencyCurrency of the user to whose account money is credited.
Examples of return values:

{
  "error":"Your account balance is only 18.52 usd, and you want to transfer 25.97 usd",
  "code":"unspecified",
  "result":""
}
{
  "result":{
    "source_old_balance":18.52,
    "source_new_balance":17.52,
    "source_currency":"USD",
    "target_old_balance":18.52,
    "target_new_balance":19.52,
    "target_currency":"USD"
  }
}