Create a payment

post
Create a payment

https://business-sandbox.cryptopay.me/api/coin_withdrawals
This endpoint allows you to create a payment.
Request
Response
Headers
Authorization
required
string
HMAC using API key and signature
Content-Type
required
string
application/json
Date
required
string
Current date in HTTP-date format
Query Parameters
network_fee_level
optional
string
slow, average or fast. average is used by default
charged_currency
optional
string
An account currency to send a transaction from
charged_amount_to_send
optional
string
An exact transaction amount to send. All applicable fees will be added on top of this amount and debited from your account. Use this param if you want to send a transaction from fiat accounts only
charged_amount
optional
number
All applicable fees will be deducted from this amount before processing a transaction
address
required
string
A recipient's cryptocurrency wallet address
custom_id
required
string
Payment reference ID in your system
force_commit
optional
string
Set false by default. Use false for two-step transfers and commit it within 30 seconds. Use true for instant withdrawal
received_amount
optional
number
An exact transaction amount to send. All applicable fees will be added on top of this amount and debited from your account. Use this param if you want to send a transactions from cryptocurrency accounts only
received_currency
optional
string
Cryptocurrency type
201: Created
{
"id": "f04d3cac-837a-4245-840d-1b525a4d693d",
"custom_id": "113562013",
"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"
}

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"}'

Withdrawals from fiat accounts

If you want to send a bitcoin transaction from a fiat account e.g. EUR, you need to construct your API request body using a charged_amount or charged_amount_to_send parameters as follows

{
"charged_currency": "EUR",
"charged_amount_to_send": 10,
"address": "2N122JKRz52gokTmaVYNiMA43qvdSqnhLGV",
"received_currency": "BTC"
}

paremeter

meaning

charged_amount

All applicable fees will be deducted from this amount before processing a transaction

charged_amount_to_send

An exact transaction amount to send. All applicable fees will be added on top of this amount and debited from your account

Withdrawals from cryptocurrency accounts

If you want to send a bitcoin transaction from a cryptocurrency account e.g. BTC, you need to construct your API request body using a charged_amount or received_amount parameters as follows

{
"charged_currency": "BTC",
"address": "2N122JKRz52gokTmaVYNiMA43qvdSqnhLGV",
"received_amount": "0.1",
"received_currency": "BTC"
}

parameter

meaning

charged_amount

All applicable fees will be deducted from this amount before processing a transaction

received_amount

An exact transaction amount to send. All applicable fees will be added on top of this amount and debited from your account

Response schema.

Parameter

Type

Description

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 a 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 a 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