payout
Using the payout model methods, a merchant can:
- Create payout payment order - method payout.create
- Calculate preliminary parameters of a payout order - method payout.calc
- Get information about the selected payment transaction - method payout.get
- Cancel a payout order - method payout.cancel
endpoint
Queries for the model's methods are sent to endpoint https://api.any.money/.
payout.create
The method creates a payment transaction order and returns its representation.
If in_curr argument is not transmitted than its value will be taken equal to out_curr value.
Input method arguments
| Param | Required | Example | Description |
|---|---|---|---|
| amount | yes | "128" | payout amount |
| externalid | yes | "123" | unique ID specified by the merchant |
| out_curr | yes | "UAH" | debit currency name |
| payway | yes | "anycash" | payment payway. * When sending cryptocurrencies, it is necessary to pass the correct combination of payment system and currency according to the description, otherwise the method will return an error |
| callback_url | no | "https://any_money.redirect.com" | url-address for order status change messages. Messages format |
| in_curr | no | "USD" | credit currency name |
| is_multipay | no | true | indicates whether this payment can be split into several transactions. The default is true. In case of payout in one transaction, this payout is limited by the maximum limit out_singlepay_max (see method payway.list) |
Combinations payway and out_curr
| Cryptocurrency | Request parameter payway | Request parameter out_curr |
|---|---|---|
| Bitcoin | btc | BTC |
| Ether | eth | ETH |
| Litecoin | ltc | LTC |
| USDT (ERC-20 token on the Ethereum network) | erc20 | USDT |
| USDT (TRC-20 token on the TRON network) | trc20 | USDT |
| TRX | tron | TRX |
In the list of method input arguments, depending on the used payway the query must contain the following additional values:
Required arguments for the payways
- advcash, nixmoney, qiwi, payeer, perfect, webmoney
-
- payee - details of the recipient in the payway (wallet number)
- BTC, LTC, USDT, ETH
-
- payee - cryptoaddress
- cash
-
- contact - phone number or telegram username (e.g. "380441232344")
- region - payment region name (e.g. "kiev")
- iban UAH
-
- payee - recipient's IBAN account number
- individual_tax_number - individual tax number of the recipient
- recipient_name - full name of the recipient (last name, first name and patronymic)
- sender_name - full name of the sender (last name, first name and patronymic)
- iban EUR
-
- payee - recipient's IBAN account number
- recipient_name - full name of the recipient (first name and last name)
- mobile
-
- payee - payee phone number. In the international format without "+" (e.g. "380661234567")
- privat24, monobank, sberbank, alfa_bank, tinkoff_cs, vtb24, card UAH, visamc_p2p
-
- payee - paycard number
- card EUR/USD
-
- payee - paycard number
- recipient_name - full name of the recipient (first name and last name)
- recipient_phone - payee phone number. In the international format without "+" (e.g. "380661234567")
Caution!
For typed merchants, a transmitted payway must match the merchant type, and the in_curr must be equal to out_curr or absent, otherwise there will be exceptions raised
Caution!
Right after the query receival - order is created and the its processing is called. After the method execution, funds will be immediately debited from the merchant's balance
Method response data
payout transaction order representation
Exceptions
- EParamAmountFormatInvalid
- amount argument wrong volume or format
- EParamAmountTooBig
- amount exceeds the operation maximum
- EParamAmountTooSmall
- amount is less than the operation minimum
- EParamCurrencyInvalid
- no currency in Any.Money
- EParamFieldInvalid
- invalid callback_url argument
- EParamInvalid
-
- wrong argument value is transmitted
- payway does not match the merchant type
- EParamOffLimits
- transmitted argument exceeds the limits
- EParamPaywayInvalid
- wrong payway transmitted
- EParamUnique
- an order with transmitted externalid already exists
- EStateCurrencyInactive
- inactive credit / debit currency
- EStateCurrencyUnavail
- transmitted currency is unavailable in transmitted payway
- EStateExchangeUnavail
-
- exchange direction is not available
- in_curr does not match the out_curr for the typed merchant
- EStateInsufficientFunds
- amount exceeds the merchant debit currency balance
- EStateOutPayUnavailable
- payments in the entire Any.Money system or for this merchant are blocked
- EStatePaywayInactive
-
- inactive payway
- payway is administratively blocked in Any.Money
- EStatePaywayUnavail
- payway is not available for current merchant
- EStatePwcurrencyUnavail
- payway currency is not available for current merchant
- EStatePwcurrencyInactive
- payway currency is inactive for current merchant
payout.calc
Method for calculating payment parameters taking into account the amount.
If the parameter in_curr is not transmitted, the payment in out_curr currency
and withdrawals in the out_curr balance except for the payway fee will be calculated.
Input method arguments
| Param | Required | Example | Description |
|---|---|---|---|
| amount | yes | "238" | payout amount |
| out_curr | yes | "USD" | debit currency name |
| payway | yes | "anycash" | payment payway |
| in_curr | no | "UAH" | credit currency name |
Caution!
For typed merchants, a transmitted payway must match the merchant type, and the in_curr must be equal to out_curr or absent, otherwise there will be exceptions raised
Method response data
Payment order parameters
- account_amount
- debit amount except for the fee
- in_amount
- credit amount
- in_fee_amount
- fee amount in the credit currency
- orig_amount
- original payment amount, was ordered when creating the order
- out_amount
- debit amount
- out_fee_amount
- fee amount in the debit currency
- rate
- currency convertation rate, when performed. In the
"rate": ["25.30301", "1"]format
Exceptions
- EParamAmountFormatInvalid
- amount wrong format
- EParamAmountTooBig
- amount exceeds the operation maximum
- EParamAmountTooSmall
- amount is less than the operation minimum
- EParamCurrencyInvalid
- no currency in Any.Money
- EParamInvalid
-
- argument wrong value transmitted
- transmitted payway does not match the merchant type
- EParamPaywayInvalid
- wrong payway transmitted
- EStateCurrencyInactive
- currency is inactive in transmitted payway
- EStateExchangeUnavail
-
- exchange direction is not available
- in_curr not equal to out_curr for the typed merchant
- EStateInsufficientFunds
- the processed amount is greater than the merchant's balance in debit currency
- EStatePaywayInactive
-
- inactive payway
- payway is administratively blocked in Any.Money
- EStatePaywayUnavail
- payway is not available for current merchant
- EStatePwcurrencyUnavail
- payway currency is not available for current merchant
- EStatePwcurrencyInactive
- payway currency is inactive for current merchant
payout.get
The method for obtaining the parameter representation of the payment order by its identifier (externalid).
Input method arguments
| Param | Required | Example | Description |
|---|---|---|---|
| externalid | yes | "221" | unique order's ID specified by the merchant |
Method response data
order representation of payout transaction
Exceptions
- EParamInvalid
- wrong externalid argument value
- EParamNotFound
- no order was found with the corresponding externalid
- EParamType
- wrong externalid format
payout.cancel
Method for canceling a payment order by identifier (externalid). Returns a representation of a canceled order.
Input method arguments
| Param | Required | Example | Description |
|---|---|---|---|
| externalid | yes | "221" | unique order's ID specified by the merchant |
Method response data
data representation of the canceled order
Exceptions
- EParamInvalid
- externalid argument value is not transmitted or wrong
- EParamNotFound
- no order was found with the corresponding externalid
- EParamType
- wrong externalid format
- EStateForbidden
- an order is finalized and cannot be canceled