Skip to main content
POST
/
payment
/
api
/
v1
/
custody-wallet
/
transfer
Custody Wallet Transfer
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

x-api-key
string
header
required

API key for authentication. Must be included in the x-api-key header.

Body

application/json
custody_wallet_id
string<uuid>
required

The unique identifier of the custody wallet

Example:

"c10dad79-4bd8-47f4-933e-4f197c5af680"

user_id
string<uuid>
required

The unique identifier of the user

Example:

"810b82b7-bd72-48c2-980f-0887fe20f08e"

to_address
string
required

The destination wallet address

Example:

"3BsSGETYNCjfULdgYEBVmzwXgaspS6E5pgncJr3bfBeU"

crypto
string
required

The cryptocurrency to transfer

Example:

"usdc"

amount
number
required

The amount to transfer

Example:

1

customer_fee
number

Fee charged to the customer for this transfer (denominated in the same crypto currency)

Example:

0.1

customer_transaction_id
string

Customer-provided transaction identifier for tracking and idempotency

Example:

"3n39b7-bd72-48c2-980f-0887fe20f08e"

Response

Transfer initiated successfully

id
string<uuid>

Unique identifier of the transfer

Example:

"6956a36c-528b-43c3-bc39-6000dc234fd8"

custody_wallet_id
string<uuid>

Source custody wallet ID

Example:

"c10dad79-4bd8-47f4-933e-4f197c5af680"

to_address
string

Destination wallet address

Example:

"3BsSGETYNCjfULdgYEBVmzwXgaspS6E5pgncJr3bfBeU"

crypto
string

Cryptocurrency transferred

Example:

"usdc"

status
string

Transfer status

Example:

"INITIATED"