Update a Blockchain Deposit Address Beta
curl --request PATCH \
--url https://api.sandbox.lead.bank/beta/blockchain_deposit_addresses/{blockchain_deposit_address_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"account_identifier": {
"type": "account_number_id",
"value": "account_number_xyz123"
}
}
'import requests
url = "https://api.sandbox.lead.bank/beta/blockchain_deposit_addresses/{blockchain_deposit_address_id}"
payload = { "account_identifier": {
"type": "account_number_id",
"value": "account_number_xyz123"
} }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
account_identifier: {type: 'account_number_id', value: 'account_number_xyz123'}
})
};
fetch('https://api.sandbox.lead.bank/beta/blockchain_deposit_addresses/{blockchain_deposit_address_id}', 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.sandbox.lead.bank/beta/blockchain_deposit_addresses/{blockchain_deposit_address_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'account_identifier' => [
'type' => 'account_number_id',
'value' => 'account_number_xyz123'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.sandbox.lead.bank/beta/blockchain_deposit_addresses/{blockchain_deposit_address_id}"
payload := strings.NewReader("{\n \"account_identifier\": {\n \"type\": \"account_number_id\",\n \"value\": \"account_number_xyz123\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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.patch("https://api.sandbox.lead.bank/beta/blockchain_deposit_addresses/{blockchain_deposit_address_id}")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account_identifier\": {\n \"type\": \"account_number_id\",\n \"value\": \"account_number_xyz123\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.lead.bank/beta/blockchain_deposit_addresses/{blockchain_deposit_address_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_identifier\": {\n \"type\": \"account_number_id\",\n \"value\": \"account_number_xyz123\"\n }\n}"
response = http.request(request)
puts response.read_body{
"account_identifier": {
"type": "account_number_id",
"value": "account_number_xyz123"
},
"id": "blockchain_deposit_address_2GvQ9cTn4HsWq7JkLp1RzYe8Bx3",
"status": "active",
"chain": "base",
"token": "USDC",
"wallet_address": "0x5a0b54d5dc17e0aadc383d2db43b0a0d3e029c4c",
"is_debtor_self": true,
"created_at": "2024-06-27T11:22:33Z",
"updated_at": "2024-06-27T11:22:33Z"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}Blockchain Payments
Update a Blockchain Deposit Address
Updates the account_identifier of a Blockchain Deposit Address.
PATCH
/
beta
/
blockchain_deposit_addresses
/
{blockchain_deposit_address_id}
Update a Blockchain Deposit Address Beta
curl --request PATCH \
--url https://api.sandbox.lead.bank/beta/blockchain_deposit_addresses/{blockchain_deposit_address_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"account_identifier": {
"type": "account_number_id",
"value": "account_number_xyz123"
}
}
'import requests
url = "https://api.sandbox.lead.bank/beta/blockchain_deposit_addresses/{blockchain_deposit_address_id}"
payload = { "account_identifier": {
"type": "account_number_id",
"value": "account_number_xyz123"
} }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
account_identifier: {type: 'account_number_id', value: 'account_number_xyz123'}
})
};
fetch('https://api.sandbox.lead.bank/beta/blockchain_deposit_addresses/{blockchain_deposit_address_id}', 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.sandbox.lead.bank/beta/blockchain_deposit_addresses/{blockchain_deposit_address_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'account_identifier' => [
'type' => 'account_number_id',
'value' => 'account_number_xyz123'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.sandbox.lead.bank/beta/blockchain_deposit_addresses/{blockchain_deposit_address_id}"
payload := strings.NewReader("{\n \"account_identifier\": {\n \"type\": \"account_number_id\",\n \"value\": \"account_number_xyz123\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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.patch("https://api.sandbox.lead.bank/beta/blockchain_deposit_addresses/{blockchain_deposit_address_id}")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account_identifier\": {\n \"type\": \"account_number_id\",\n \"value\": \"account_number_xyz123\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.lead.bank/beta/blockchain_deposit_addresses/{blockchain_deposit_address_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_identifier\": {\n \"type\": \"account_number_id\",\n \"value\": \"account_number_xyz123\"\n }\n}"
response = http.request(request)
puts response.read_body{
"account_identifier": {
"type": "account_number_id",
"value": "account_number_xyz123"
},
"id": "blockchain_deposit_address_2GvQ9cTn4HsWq7JkLp1RzYe8Bx3",
"status": "active",
"chain": "base",
"token": "USDC",
"wallet_address": "0x5a0b54d5dc17e0aadc383d2db43b0a0d3e029c4c",
"is_debtor_self": true,
"created_at": "2024-06-27T11:22:33Z",
"updated_at": "2024-06-27T11:22:33Z"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}Authorizations
Headers
A unique key for this request, up to 255 characters. Retrying with the same key and request returns the original response instead of performing the operation again. See Idempotency. A unique key for this request, up to 255 characters. Retrying with the same key and body returns the original response instead of performing the operation again.
Required string length:
1 - 255Example:
"3f1c9a52-7d4e-4b8a-9c21-6e0f5d2a8b14"
Path Parameters
Body
application/json
Response
The updated Blockchain Deposit Address object.
An on-chain address that receives stablecoins.
Was this page helpful?

