Create a funds withdrawal request
curl --request POST \
--url https://api.bridge.xyz/v0/customers/{customerID}/card_accounts/{cardAccountID}/withdrawals \
--header 'Api-Key: <api-key>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"amount": "<string>",
"destination": {
"chain": "<string>",
"address": "<string>",
"memo": "<string>"
},
"client_note": "<string>"
}
'import requests
url = "https://api.bridge.xyz/v0/customers/{customerID}/card_accounts/{cardAccountID}/withdrawals"
payload = {
"amount": "<string>",
"destination": {
"chain": "<string>",
"address": "<string>",
"memo": "<string>"
},
"client_note": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
'Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: '<string>',
destination: {chain: '<string>', address: '<string>', memo: '<string>'},
client_note: '<string>'
})
};
fetch('https://api.bridge.xyz/v0/customers/{customerID}/card_accounts/{cardAccountID}/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.bridge.xyz/v0/customers/{customerID}/card_accounts/{cardAccountID}/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([
'amount' => '<string>',
'destination' => [
'chain' => '<string>',
'address' => '<string>',
'memo' => '<string>'
],
'client_note' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Api-Key: <api-key>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-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.bridge.xyz/v0/customers/{customerID}/card_accounts/{cardAccountID}/withdrawals"
payload := strings.NewReader("{\n \"amount\": \"<string>\",\n \"destination\": {\n \"chain\": \"<string>\",\n \"address\": \"<string>\",\n \"memo\": \"<string>\"\n },\n \"client_note\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("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.bridge.xyz/v0/customers/{customerID}/card_accounts/{cardAccountID}/withdrawals")
.header("Idempotency-Key", "<idempotency-key>")
.header("Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"<string>\",\n \"destination\": {\n \"chain\": \"<string>\",\n \"address\": \"<string>\",\n \"memo\": \"<string>\"\n },\n \"client_note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bridge.xyz/v0/customers/{customerID}/card_accounts/{cardAccountID}/withdrawals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"<string>\",\n \"destination\": {\n \"chain\": \"<string>\",\n \"address\": \"<string>\",\n \"memo\": \"<string>\"\n },\n \"client_note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"card_account_id": "<string>",
"customer_id": "<string>",
"amount": "<string>",
"currency": "usdc",
"destination": {
"chain": "<string>",
"address": "<string>",
"memo": "<string>",
"tx_hash": "<string>",
"gas_fee": {
"amount": "<string>",
"currency": "<string>"
}
},
"created_at": "<string>",
"updated_at": "<string>",
"type": "top_up_balance_withdrawal",
"client_note": "<string>"
}
Cards
Create a funds withdrawal request
Request a funds withdrawal from the card account, applicable to top-up accounts only. For Bridge wallets, create a transfer from the Bridge wallet.
POST
/
customers
/
{customerID}
/
card_accounts
/
{cardAccountID}
/
withdrawals
Create a funds withdrawal request
curl --request POST \
--url https://api.bridge.xyz/v0/customers/{customerID}/card_accounts/{cardAccountID}/withdrawals \
--header 'Api-Key: <api-key>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"amount": "<string>",
"destination": {
"chain": "<string>",
"address": "<string>",
"memo": "<string>"
},
"client_note": "<string>"
}
'import requests
url = "https://api.bridge.xyz/v0/customers/{customerID}/card_accounts/{cardAccountID}/withdrawals"
payload = {
"amount": "<string>",
"destination": {
"chain": "<string>",
"address": "<string>",
"memo": "<string>"
},
"client_note": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
'Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: '<string>',
destination: {chain: '<string>', address: '<string>', memo: '<string>'},
client_note: '<string>'
})
};
fetch('https://api.bridge.xyz/v0/customers/{customerID}/card_accounts/{cardAccountID}/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.bridge.xyz/v0/customers/{customerID}/card_accounts/{cardAccountID}/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([
'amount' => '<string>',
'destination' => [
'chain' => '<string>',
'address' => '<string>',
'memo' => '<string>'
],
'client_note' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Api-Key: <api-key>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-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.bridge.xyz/v0/customers/{customerID}/card_accounts/{cardAccountID}/withdrawals"
payload := strings.NewReader("{\n \"amount\": \"<string>\",\n \"destination\": {\n \"chain\": \"<string>\",\n \"address\": \"<string>\",\n \"memo\": \"<string>\"\n },\n \"client_note\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("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.bridge.xyz/v0/customers/{customerID}/card_accounts/{cardAccountID}/withdrawals")
.header("Idempotency-Key", "<idempotency-key>")
.header("Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"<string>\",\n \"destination\": {\n \"chain\": \"<string>\",\n \"address\": \"<string>\",\n \"memo\": \"<string>\"\n },\n \"client_note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bridge.xyz/v0/customers/{customerID}/card_accounts/{cardAccountID}/withdrawals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"<string>\",\n \"destination\": {\n \"chain\": \"<string>\",\n \"address\": \"<string>\",\n \"memo\": \"<string>\"\n },\n \"client_note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"card_account_id": "<string>",
"customer_id": "<string>",
"amount": "<string>",
"currency": "usdc",
"destination": {
"chain": "<string>",
"address": "<string>",
"memo": "<string>",
"tx_hash": "<string>",
"gas_fee": {
"amount": "<string>",
"currency": "<string>"
}
},
"created_at": "<string>",
"updated_at": "<string>",
"type": "top_up_balance_withdrawal",
"client_note": "<string>"
}
Path Parameters
Body
application/json
The withdrawal request
A card funds withdrawal
Response
The successfully created card funds withdrawal
A card funds withdrawal
Was this page helpful?