curl --request POST \
--url https://api.kemycard.com/v1/wallets/{code}/withdrawals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"address": "DESTINATION_SOLANA_ADDRESS",
"amount": 100,
"idempotency_key": "payout-5521"
}
'import requests
url = "https://api.kemycard.com/v1/wallets/{code}/withdrawals"
payload = {
"address": "DESTINATION_SOLANA_ADDRESS",
"amount": 100,
"idempotency_key": "payout-5521"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
address: 'DESTINATION_SOLANA_ADDRESS',
amount: 100,
idempotency_key: 'payout-5521'
})
};
fetch('https://api.kemycard.com/v1/wallets/{code}/withdrawals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kemycard.com/v1/wallets/{code}/withdrawals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'address' => 'DESTINATION_SOLANA_ADDRESS',
'amount' => 100,
'idempotency_key' => 'payout-5521'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kemycard.com/v1/wallets/{code}/withdrawals"
payload := strings.NewReader("{\n \"address\": \"DESTINATION_SOLANA_ADDRESS\",\n \"amount\": 100,\n \"idempotency_key\": \"payout-5521\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kemycard.com/v1/wallets/{code}/withdrawals")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"DESTINATION_SOLANA_ADDRESS\",\n \"amount\": 100,\n \"idempotency_key\": \"payout-5521\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kemycard.com/v1/wallets/{code}/withdrawals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": \"DESTINATION_SOLANA_ADDRESS\",\n \"amount\": 100,\n \"idempotency_key\": \"payout-5521\"\n}"
response = http.request(request)
puts response.read_bodyWithdraw from a Wallet
Withdraws funds from the balance of a wallet of one of your customers, to an address of your choice. See the Crypto Wallets guide for the full flow.
- Same network, same currency. The withdrawal is made on the blockchain and in the currency of the
wallet.
addresscan be any valid address on that blockchain, except the address of the wallet itself. - Fees. The commission of your plan (Starter 1+11 + 0.75%, Premium 1+0.5networkfeeoftheblockchainaredeductedfrom‘amount‘.Afterthesefees,youmustreceiveatleast∗∗10**. Both are returned by
GET /wallets/balance(withdrawal_commissionandwithdrawal_network_fee). - Immediate debit.
amountis debited from the balance of the wallet as soon as the request is accepted. The transfer is sent automatically: the withdrawal isprocessing, thencompleted, and you receive thewallet.withdrawal_completedwebhook when it has been sent on the blockchain. - Safe to retry. With an
idempotency_key, calling again with the same key on the same wallet returns the existing withdrawal with a200status: nothing is debited a second time. A new withdrawal answers201. The same key used again with a differentaddressoramountis refused (422,details.withdrawal_code).
Protect your API keys. A withdrawal is made with your API key. API calls are only accepted from your allowed IP addresses (required): keep this list limited to your own servers, and keep your keys secret, on those servers only.
A blockchain transfer cannot be cancelled or reversed. Check the address and the blockchain before you call.
curl --request POST \
--url https://api.kemycard.com/v1/wallets/{code}/withdrawals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"address": "DESTINATION_SOLANA_ADDRESS",
"amount": 100,
"idempotency_key": "payout-5521"
}
'import requests
url = "https://api.kemycard.com/v1/wallets/{code}/withdrawals"
payload = {
"address": "DESTINATION_SOLANA_ADDRESS",
"amount": 100,
"idempotency_key": "payout-5521"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
address: 'DESTINATION_SOLANA_ADDRESS',
amount: 100,
idempotency_key: 'payout-5521'
})
};
fetch('https://api.kemycard.com/v1/wallets/{code}/withdrawals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kemycard.com/v1/wallets/{code}/withdrawals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'address' => 'DESTINATION_SOLANA_ADDRESS',
'amount' => 100,
'idempotency_key' => 'payout-5521'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kemycard.com/v1/wallets/{code}/withdrawals"
payload := strings.NewReader("{\n \"address\": \"DESTINATION_SOLANA_ADDRESS\",\n \"amount\": 100,\n \"idempotency_key\": \"payout-5521\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kemycard.com/v1/wallets/{code}/withdrawals")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"DESTINATION_SOLANA_ADDRESS\",\n \"amount\": 100,\n \"idempotency_key\": \"payout-5521\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kemycard.com/v1/wallets/{code}/withdrawals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": \"DESTINATION_SOLANA_ADDRESS\",\n \"amount\": 100,\n \"idempotency_key\": \"payout-5521\"\n}"
response = http.request(request)
puts response.read_bodyaddress is an address on the blockchain of the wallet before you call: funds sent to a wrong address are permanently lost.Authorizations
API key (sk_test_... or sk_live_...)
Path Parameters
Code of the wallet to withdraw from: the code returned when the wallet is created (POST /wallets).
Body
Destination address, on the blockchain of the wallet. It cannot be the address of the wallet itself.
"DESTINATION_SOLANA_ADDRESS"
Amount debited from the balance of the wallet, in USD, fees included. Must be greater than 0.
100
Optional. Your own unique key for this withdrawal (1 to 64 characters), for example the id of the request in your system. The same key on the same wallet returns the existing withdrawal instead of creating a new one.
64"payout-5521"