Request
Query parameters
| Name | Parameter type | Default value | Definition |
|---|---|---|---|
| amount* | string | Payout amount | |
| address* | string | The address of the wallet to which the withdrawal will be made | |
| currency* | string | Currency code for the payoutIf Currency if fiat, the to_currency parameter is required. | |
| to_currency | Cryptocurrency code in which the payout will be made. It is used when the currency parameter is fiat. See examples below | ||
| network | string | Blockchain network codeNot required when the currency/to_currency is a cryptocurrency and has only one network, for example BTC | |
| is_subtract* | boolean | Defines where the withdrawal fee will be deductedtrue - from your balancefalse - from payout amount, the payout amount will be decreased | |
| course_source | stringAvailable values• Binance• BinanceP2p• Exmo• Kucoin | Value from merchant's settings | The service from which the exchange rates are taken for conversion in the invoice.The parameter is applied only if the currency is fiat, otherwise the default value is taken from the merchant's settings. |
| priority | stringmin: 4max: 11Available values• recommended• economy• high• highest | recommended | The parameter for selecting the withdrawal priority. The cost of the withdrawal fee depends on the selected parameter.This parameter is applied only in case of using the BTC, ETH, POLYGON, and BSC networks. |
Parameter type
stringDefinition
Payout amountParameter type
stringDefinition
The address of the wallet to which the withdrawal will be madeParameter type
stringDefinition
Currency code for the payoutIf Currency if fiat, the to_currency parameter is required.Definition
Cryptocurrency code in which the payout will be made. It is used when the currency parameter is fiat. See examples belowParameter type
stringDefinition
Blockchain network codeNot required when the currency/to_currency is a cryptocurrency and has only one network, for example BTCParameter type
booleanDefinition
Defines where the withdrawal fee will be deductedtrue - from your balancefalse - from payout amount, the payout amount will be decreasedParameter type
string
Available values- Binance- BinanceP2p- Exmo- KucoinDefinition
The service from which the exchange rates are taken for conversion in the invoice.The parameter is applied only if the currency is fiat, otherwise the default value is taken from the merchant's settings.Parameter type
stringmin: 4max: 11
Available values- recommended- economy- high- highestDefinition
The parameter for selecting the withdrawal priority. The cost of the withdrawal fee depends on the selected parameter.This parameter is applied only in case of using the BTC, ETH, POLYGON, and BSC networks.
* - mandatory parameter
Request example
curl https://api.heleket.com/v1/payout/calc \
-X POST \
-H 'merchant: 8b03432e-385b-4670-8d06-064591096795' \
-H 'sign: fe99035f86fa436181717b302b95bacff1' \
-H 'Content-Type: application/json' \
-d '{
"amount": "5",
"address": "TDD97yguPESTpcrJMqU6h2ozZbibv4Vaqm",
"currency": "USDT",
"network": "TRON",
"is_subtract": "1",
}'
CopyResponse
Response parameters
| Name | Definition |
|---|---|
| commission | Heleket commission amount |
| merchant_amount | The amount to be removed from the merchant's balance |
| payer_amount | The amount that was sent to the address. |
Definition
Heleket commission amountDefinition
The amount to be removed from the merchant's balanceDefinition
The amount that was sent to the address.
Response example
1{
2 "state": 0,
3 "result": {
4 "commission":"0.00000000",
5 "merchant_amount":"1.00000000",
6 "payout_amount":"1.0"
7 }
8}
9CopyPossible errors
Validation errors
code : 422
example responses:
1{
2"state": 1,
3"errors": {
4"amount": ["validation.required"]
5}
6}CopyIf the payout is blocked on your merchant or user, you will receive this error message. This happens, for example, when you change your password and payouts are blocked for 24 hours.
1{
2"state": 1,
3"message": "You are forbidden"
4}CopyIf we don’t support the currency code you provided in currency parameter, you will receive this error message:
1{
2"state": 1,
3"message": "The currency was not found"
4}CopyIf we can not find the service for executing payout, you will receive this error message. You have to make sure that the cryptocurrency is supported. Check the correctness of the entered values in. currency, network, from_currency, to_currency:
1{
2"state": 1,
3"message": "The service was not found"
4}CopyIf the withdrawal amount is too small, you will receive this error message:
1{
2"state": 1,
3"message": "The withdrawal amount is too small"
4}CopyIf you will not have an active merchant wallet with a cryptocurrency of the payout, you will receive this error:
1{
2"state": 1,
3"message": "Wallet not found"
4}CopyIf the payout amount, including all commissions, is more than your balance, you will receive this error message:
1{
2"state": 1,
3"message": "Not enough funds"
4}CopyIf we don’t find the payout service of the currency that was passed in to_currency parameter, you will receive this error message:
1{
2"state": 1,
3"message": "Not found service to_currency"
4}CopyIf accidentally something happens when converting to to_currency, you will receive this error message:
1{
2"state": 1,
3"message": "Error convert to_currency"
4}CopyIf the payout amount is less than the minimum supported amount for cryptocurrency, you will receive this error message:
1{
2"state": 1,
3"message": "Minimum amount 0.5 USDT"
4}CopyIf the payout amount is greater than the maximum supported amount for cryptocurrency, you will receive this error message:
1{
2"state": 1,
3"message": "Maximum amount 10000000 USDT"
4}CopyIf you don’t have enough funds to make a payout, you will receive this error message:
1{
2"state": 1,
3"message": "Not enough funds"
4}CopyIf you don't have enough funds to convert the payout amount from from_currency, you will receive this error message:
1{
2"state": 1,
3"message": "Not enough balance for convert USDT to LTC"
4}CopyIf technical work occurs and the payout is temporarily unavailable, you will receive this error message
1{
2"state": 1,
3"message": "The terminal was not found"
4}CopyInternal server error
code : 500
example responses:
1{
2 "message": "Server error, #1",
3 "code": 500,
4 "error": null
5}Copy