Custody Wallet Transfer
Initiate a transfer from a Carbn custody wallet to an external address
curl --request POST \
--url https://api.carbnconnect.com/payment/api/v1/custody-wallet/transfer \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"custody_wallet_id": "c10dad79-4bd8-47f4-933e-4f197c5af680",
"user_id": "810b82b7-bd72-48c2-980f-0887fe20f08e",
"to_address": "3BsSGETYNCjfULdgYEBVmzwXgaspS6E5pgncJr3bfBeU",
"crypto": "usdc",
"amount": 1,
"customer_fee": 0.1,
"customer_transaction_id": "3n39b7-bd72-48c2-980f-0887fe20f08e"
}
'import requests
url = "https://api.carbnconnect.com/payment/api/v1/custody-wallet/transfer"
payload = {
"custody_wallet_id": "c10dad79-4bd8-47f4-933e-4f197c5af680",
"user_id": "810b82b7-bd72-48c2-980f-0887fe20f08e",
"to_address": "3BsSGETYNCjfULdgYEBVmzwXgaspS6E5pgncJr3bfBeU",
"crypto": "usdc",
"amount": 1,
"customer_fee": 0.1,
"customer_transaction_id": "3n39b7-bd72-48c2-980f-0887fe20f08e"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
custody_wallet_id: 'c10dad79-4bd8-47f4-933e-4f197c5af680',
user_id: '810b82b7-bd72-48c2-980f-0887fe20f08e',
to_address: '3BsSGETYNCjfULdgYEBVmzwXgaspS6E5pgncJr3bfBeU',
crypto: 'usdc',
amount: 1,
customer_fee: 0.1,
customer_transaction_id: '3n39b7-bd72-48c2-980f-0887fe20f08e'
})
};
fetch('https://api.carbnconnect.com/payment/api/v1/custody-wallet/transfer', 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.carbnconnect.com/payment/api/v1/custody-wallet/transfer",
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([
'custody_wallet_id' => 'c10dad79-4bd8-47f4-933e-4f197c5af680',
'user_id' => '810b82b7-bd72-48c2-980f-0887fe20f08e',
'to_address' => '3BsSGETYNCjfULdgYEBVmzwXgaspS6E5pgncJr3bfBeU',
'crypto' => 'usdc',
'amount' => 1,
'customer_fee' => 0.1,
'customer_transaction_id' => '3n39b7-bd72-48c2-980f-0887fe20f08e'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.carbnconnect.com/payment/api/v1/custody-wallet/transfer"
payload := strings.NewReader("{\n \"custody_wallet_id\": \"c10dad79-4bd8-47f4-933e-4f197c5af680\",\n \"user_id\": \"810b82b7-bd72-48c2-980f-0887fe20f08e\",\n \"to_address\": \"3BsSGETYNCjfULdgYEBVmzwXgaspS6E5pgncJr3bfBeU\",\n \"crypto\": \"usdc\",\n \"amount\": 1,\n \"customer_fee\": 0.1,\n \"customer_transaction_id\": \"3n39b7-bd72-48c2-980f-0887fe20f08e\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.carbnconnect.com/payment/api/v1/custody-wallet/transfer")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"custody_wallet_id\": \"c10dad79-4bd8-47f4-933e-4f197c5af680\",\n \"user_id\": \"810b82b7-bd72-48c2-980f-0887fe20f08e\",\n \"to_address\": \"3BsSGETYNCjfULdgYEBVmzwXgaspS6E5pgncJr3bfBeU\",\n \"crypto\": \"usdc\",\n \"amount\": 1,\n \"customer_fee\": 0.1,\n \"customer_transaction_id\": \"3n39b7-bd72-48c2-980f-0887fe20f08e\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.carbnconnect.com/payment/api/v1/custody-wallet/transfer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"custody_wallet_id\": \"c10dad79-4bd8-47f4-933e-4f197c5af680\",\n \"user_id\": \"810b82b7-bd72-48c2-980f-0887fe20f08e\",\n \"to_address\": \"3BsSGETYNCjfULdgYEBVmzwXgaspS6E5pgncJr3bfBeU\",\n \"crypto\": \"usdc\",\n \"amount\": 1,\n \"customer_fee\": 0.1,\n \"customer_transaction_id\": \"3n39b7-bd72-48c2-980f-0887fe20f08e\"\n}"
response = http.request(request)
puts response.read_body{
"id": "6956a36c-528b-43c3-bc39-6000dc234fd8",
"custody_wallet_id": "c10dad79-4bd8-47f4-933e-4f197c5af680",
"to_address": "3BsSGETYNCjfULdgYEBVmzwXgaspS6E5pgncJr3bfBeU",
"crypto": "usdc",
"status": "INITIATED"
}Authorizations
API key for authentication. Must be included in the x-api-key header.
Body
The unique identifier of the custody wallet
"c10dad79-4bd8-47f4-933e-4f197c5af680"
The unique identifier of the user
"810b82b7-bd72-48c2-980f-0887fe20f08e"
The destination wallet address
"3BsSGETYNCjfULdgYEBVmzwXgaspS6E5pgncJr3bfBeU"
The cryptocurrency to transfer
"usdc"
The amount to transfer
1
Fee charged to the customer for this transfer (denominated in the same crypto currency)
0.1
Customer-provided transaction identifier for tracking and idempotency
"3n39b7-bd72-48c2-980f-0887fe20f08e"
Response
Transfer initiated successfully
Unique identifier of the transfer
"6956a36c-528b-43c3-bc39-6000dc234fd8"
Source custody wallet ID
"c10dad79-4bd8-47f4-933e-4f197c5af680"
Destination wallet address
"3BsSGETYNCjfULdgYEBVmzwXgaspS6E5pgncJr3bfBeU"
Cryptocurrency transferred
"usdc"
Transfer status
"INITIATED"
curl --request POST \
--url https://api.carbnconnect.com/payment/api/v1/custody-wallet/transfer \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"custody_wallet_id": "c10dad79-4bd8-47f4-933e-4f197c5af680",
"user_id": "810b82b7-bd72-48c2-980f-0887fe20f08e",
"to_address": "3BsSGETYNCjfULdgYEBVmzwXgaspS6E5pgncJr3bfBeU",
"crypto": "usdc",
"amount": 1,
"customer_fee": 0.1,
"customer_transaction_id": "3n39b7-bd72-48c2-980f-0887fe20f08e"
}
'import requests
url = "https://api.carbnconnect.com/payment/api/v1/custody-wallet/transfer"
payload = {
"custody_wallet_id": "c10dad79-4bd8-47f4-933e-4f197c5af680",
"user_id": "810b82b7-bd72-48c2-980f-0887fe20f08e",
"to_address": "3BsSGETYNCjfULdgYEBVmzwXgaspS6E5pgncJr3bfBeU",
"crypto": "usdc",
"amount": 1,
"customer_fee": 0.1,
"customer_transaction_id": "3n39b7-bd72-48c2-980f-0887fe20f08e"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
custody_wallet_id: 'c10dad79-4bd8-47f4-933e-4f197c5af680',
user_id: '810b82b7-bd72-48c2-980f-0887fe20f08e',
to_address: '3BsSGETYNCjfULdgYEBVmzwXgaspS6E5pgncJr3bfBeU',
crypto: 'usdc',
amount: 1,
customer_fee: 0.1,
customer_transaction_id: '3n39b7-bd72-48c2-980f-0887fe20f08e'
})
};
fetch('https://api.carbnconnect.com/payment/api/v1/custody-wallet/transfer', 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.carbnconnect.com/payment/api/v1/custody-wallet/transfer",
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([
'custody_wallet_id' => 'c10dad79-4bd8-47f4-933e-4f197c5af680',
'user_id' => '810b82b7-bd72-48c2-980f-0887fe20f08e',
'to_address' => '3BsSGETYNCjfULdgYEBVmzwXgaspS6E5pgncJr3bfBeU',
'crypto' => 'usdc',
'amount' => 1,
'customer_fee' => 0.1,
'customer_transaction_id' => '3n39b7-bd72-48c2-980f-0887fe20f08e'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.carbnconnect.com/payment/api/v1/custody-wallet/transfer"
payload := strings.NewReader("{\n \"custody_wallet_id\": \"c10dad79-4bd8-47f4-933e-4f197c5af680\",\n \"user_id\": \"810b82b7-bd72-48c2-980f-0887fe20f08e\",\n \"to_address\": \"3BsSGETYNCjfULdgYEBVmzwXgaspS6E5pgncJr3bfBeU\",\n \"crypto\": \"usdc\",\n \"amount\": 1,\n \"customer_fee\": 0.1,\n \"customer_transaction_id\": \"3n39b7-bd72-48c2-980f-0887fe20f08e\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.carbnconnect.com/payment/api/v1/custody-wallet/transfer")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"custody_wallet_id\": \"c10dad79-4bd8-47f4-933e-4f197c5af680\",\n \"user_id\": \"810b82b7-bd72-48c2-980f-0887fe20f08e\",\n \"to_address\": \"3BsSGETYNCjfULdgYEBVmzwXgaspS6E5pgncJr3bfBeU\",\n \"crypto\": \"usdc\",\n \"amount\": 1,\n \"customer_fee\": 0.1,\n \"customer_transaction_id\": \"3n39b7-bd72-48c2-980f-0887fe20f08e\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.carbnconnect.com/payment/api/v1/custody-wallet/transfer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"custody_wallet_id\": \"c10dad79-4bd8-47f4-933e-4f197c5af680\",\n \"user_id\": \"810b82b7-bd72-48c2-980f-0887fe20f08e\",\n \"to_address\": \"3BsSGETYNCjfULdgYEBVmzwXgaspS6E5pgncJr3bfBeU\",\n \"crypto\": \"usdc\",\n \"amount\": 1,\n \"customer_fee\": 0.1,\n \"customer_transaction_id\": \"3n39b7-bd72-48c2-980f-0887fe20f08e\"\n}"
response = http.request(request)
puts response.read_body{
"id": "6956a36c-528b-43c3-bc39-6000dc234fd8",
"custody_wallet_id": "c10dad79-4bd8-47f4-933e-4f197c5af680",
"to_address": "3BsSGETYNCjfULdgYEBVmzwXgaspS6E5pgncJr3bfBeU",
"crypto": "usdc",
"status": "INITIATED"
}