slow
, average
or fast
. average
is used by default'address' + '?dt=' + '123'
. If there is no destination tag to specify, leave it as 0
, e.g. address?dt=0
false
by default. Use false
for two-step transfers and commit it within 30 seconds, otherwise, your request will expire and no payout will be processed. Use true
for instant withdrawal with no need to commit your initial request{"id": "f04d3cac-837a-4245-840d-1b525a4d693d","custom_id": "113562013","customer_id": null,"address": "2MyYeAkU162aMh3otEhYHP9yhUR7xqS7S1r","txid": null,"status": "pending","charged_amount": "10.17","charged_currency": "EUR","received_amount": "0.00103102","received_currency": "BTC","network_fee": "0.0000054","network_fee_level": "average","fee": "0.0","fee_currency": "BTC","exchange": {"pair": "BTCEUR","rate": "9699.0409","fee": "0.11","fee_currency": "EUR"},"risk": null,"created_at": "2019-05-02T12:08:46Z"}
422 Unprocessable Entity
in case you exceed your account balance:
{"error": {"code": "invalid","message": "invalid","details": [{"code": "must_be_less_than_or_equal","target": "charged_amount","message": "must be less than or equal to 167.75222297","args": {"value": "167.75222297"}},{"code": "must_be_less_than_or_equal","target": "received_amount","message": "must be less than or equal to 12500.0","args": {"value": "12500.0"}}]},"meta": {"request_id": "0919053f1c2675f62824bc3aabed3697"}}
422 Unprocessable Entity
in case a payout amount is less than 5 EUR:
{"error": {"code": "invalid","message": "invalid","details": [{"code": "must_be_greater_than_or_equal","target": "charged_amount_to_send","message": "must be greater than or equal to 5.0","args": {"value": "5.0"}}]},"meta": {"request_id": "6fd8b3b615f1fca80e1b29f7f102e090"}}
422 Unprocessable Entity
in case the address format is not valid:
{"error": {"code": "invalid","message": "invalid","details": [{"code": "invalid_coin_address","target": "address","message": "must be a valid BTC address","args": {"currency": "BTC"}}]},"meta": {"request_id": "1ea0414b9b9bc9a558f9a31a392e9778"}}
422 Unprocessable Entity
in case a destination address is evaluated as high-risk:
{"error": {"code": "high_risk_address","message": "We were unable to process your request as the address of the recipient may be associated with resource primarily used for unlawful activities","details": []},"meta": {"request_id": "e1327567dc4189901aa2463e85b96b93"}}
422 Unprocessable Entity
in case you specified currency that is not valid:
{"error": {"code": "invalid","message": "invalid","details": [{"code": "must_be_included_in","target": "charged_currency","message": "must be one of: BTC, LTC, GBP, CNY, TRY, USD, RUB, KRW, NOK, INR, BCH, ETH, JPY, CAD, THB, AUD, HKD, MYR, NZD, TWD, MXN, BRL, COP, SEK, PLN, HUF, IDR, VND, XRP, EUR","args": {"list": ["BTC","LTC","GBP","CNY","TRY","USD","RUB","KRW","NOK","INR","BCH","ETH","JPY","CAD","THB","AUD","HKD","MYR","NZD","TWD","MXN","BRL","COP","SEK","PLN","HUF","IDR","VND","XRP","EUR"]}}]},"meta": {"request_id": "1cdd48b0d123f5445991e25eb1ce6f50"}}
API call example.
curl -X POST \https://business-sandbox.cryptopay.me/api/coin_withdrawals \-H 'Authorization: HMAC ***' \-H 'Content-Type: application/json' \-H 'Date: Tue, 19 Mar 2019 10:11:40 GMT' \-d '{"charged_currency":"EUR", "charged_amount_to_send":"10", "address":"2N122JKRz52gokTmaVYNiMA43qvdSqnhLGV", "received_currency":"BTC"}'
Response schema.
Parameter | Type | Description |
customer_id | type | The reference ID of your customer. See Customers section on the left for more information |
id | string | Coin withdrawal ID |
custom_id | string | Payment reference ID in your system |
address | string | Recipient's cryptocurrency wallet address |
txid | string | Cryptocurrency transaction ID on the blockchain |
status | string | Coin withdrawal status. Refer to the status list​ |
charged_amount | string | Payment amount. Amount charged from your account |
charged_currency | string | Account currency the payment has been sent from |
received_amount | string | Cryptocurrency transaction amount. Exact amount received by a recipient |
received_currency | string | Cryptocurrency type |
network_fee | string | Network fee amount. Refer to the network fee section |
network_fee_level | string |
|
exchange | object | Exchange details |
pair | string | Currency pair |
rate | string | Exchange rate |
fee | string | Exchange fee |
fee_currency | string | Exchange fee currency |
risk | object | Cryptocurrency transaction risk level details |
score | number | Transaction risk score |
level | string | Transaction risk level. |
resource_name | string | A resource name the external wallet address relates to e.g. |
resource_category | string | A resource category the external wallet address relates to e.g. |
created_at | string | Coin withdrawal creation date and time |