Create a payment
post
https://business-sandbox.cryptopay.me
/api/coin_withdrawals
Create a payment

Errors

Insufficient account balance

422 Unprocessable Entity in case you exceed your account balance:
1
{
2
"error": {
3
"code": "invalid",
4
"message": "invalid",
5
"details": [
6
{
7
"code": "must_be_less_than_or_equal",
8
"target": "charged_amount",
9
"message": "must be less than or equal to 167.75222297",
10
"args": {
11
"value": "167.75222297"
12
}
13
},
14
{
15
"code": "must_be_less_than_or_equal",
16
"target": "received_amount",
17
"message": "must be less than or equal to 12500.0",
18
"args": {
19
"value": "12500.0"
20
}
21
}
22
]
23
},
24
"meta": {
25
"request_id": "0919053f1c2675f62824bc3aabed3697"
26
}
27
}
Copied!

Minimal amount limit

422 Unprocessable Entity in case a payout amount is less than 5 EUR:
1
{
2
"error": {
3
"code": "invalid",
4
"message": "invalid",
5
"details": [
6
{
7
"code": "must_be_greater_than_or_equal",
8
"target": "charged_amount_to_send",
9
"message": "must be greater than or equal to 5.0",
10
"args": {
11
"value": "5.0"
12
}
13
}
14
]
15
},
16
"meta": {
17
"request_id": "6fd8b3b615f1fca80e1b29f7f102e090"
18
}
19
}
Copied!

Invalid address

422 Unprocessable Entity in case the address format is not valid:
1
{
2
"error": {
3
"code": "invalid",
4
"message": "invalid",
5
"details": [
6
{
7
"code": "invalid_coin_address",
8
"target": "address",
9
"message": "must be a valid BTC address",
10
"args": {
11
"currency": "BTC"
12
}
13
}
14
]
15
},
16
"meta": {
17
"request_id": "1ea0414b9b9bc9a558f9a31a392e9778"
18
}
19
}
Copied!

High-risk destination address

422 Unprocessable Entity in case a destination address is evaluated as high-risk:
1
{
2
"error": {
3
"code": "high_risk_address",
4
"message": "We were unable to process your request as the address of the recipient may be associated with resource primarily used for unlawful activities",
5
"details": []
6
},
7
"meta": {
8
"request_id": "e1327567dc4189901aa2463e85b96b93"
9
}
10
}
Copied!

Invalid currency

422 Unprocessable Entity in case you specified currency that is not valid:
1
{
2
"error": {
3
"code": "invalid",
4
"message": "invalid",
5
"details": [
6
{
7
"code": "must_be_included_in",
8
"target": "charged_currency",
9
"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",
10
"args": {
11
"list": [
12
"BTC",
13
"LTC",
14
"GBP",
15
"CNY",
16
"TRY",
17
"USD",
18
"RUB",
19
"KRW",
20
"NOK",
21
"INR",
22
"BCH",
23
"ETH",
24
"JPY",
25
"CAD",
26
"THB",
27
"AUD",
28
"HKD",
29
"MYR",
30
"NZD",
31
"TWD",
32
"MXN",
33
"BRL",
34
"COP",
35
"SEK",
36
"PLN",
37
"HUF",
38
"IDR",
39
"VND",
40
"XRP",
41
"EUR"
42
]
43
}
44
}
45
]
46
},
47
"meta": {
48
"request_id": "1cdd48b0d123f5445991e25eb1ce6f50"
49
}
50
}
Copied!
API call example.
1
curl -X POST \
2
https://business-sandbox.cryptopay.me/api/coin_withdrawals \
3
-H 'Authorization: HMAC ***' \
4
-H 'Content-Type: application/json' \
5
-H 'Date: Tue, 19 Mar 2019 10:11:40 GMT' \
6
-d '{"charged_currency":"EUR", "charged_amount_to_send":"10", "address":"2N122JKRz52gokTmaVYNiMA43qvdSqnhLGV", "received_currency":"BTC"}'
Copied!
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
slow, average or fast
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. low, medium or high depending on the score value
resource_name
string
A resource name the external wallet address relates to e.g. Bitstamp. Can be default if no data obtained
resource_category
string
A resource category the external wallet address relates to e.g. Exchange. Can be unknown if no data obtained
created_at
string
Coin withdrawal creation date and time
Last modified 11mo ago