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_email, string target_email, int sum, string currency) |
https://api.selzy.com/en/api/transferMoney?format=json&api_key=KEY&source_email=FROM&target_email=TO&sum= SUM¤cy=CURR |
Arguments | |
api_key * | API access key. |
source_email * | Email of the user from whose account money is debited. |
target_email * | Email 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 – EUR, UAH, USD or RUB. 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_balance | The user account balance before debiting money. |
source_new_balance | The user account balance after debiting money. |
source_currency | Currency of the user from whose account money is debited. |
target_old_balance | The user account balance before crediting money. |
target_new_balance | The user account balance after crediting money. |
target_currency | Currency 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" } } |