Management
Link Wallet
Link a wallet address to a customer created with a reference key
POST
/
customers
/
api
/
manage
/
link-wallet
curl -X POST "https://api.trusset.org/customers/api/manage/link-wallet" \
-H "Content-Type: application/json" \
-H "X-API-Key: trusset_abc123xy_secret..." \
-d '{
"referenceKey": "ref_a1b2c3d4e5f67890abcdef12345678",
"walletAddress": "0xAbC123dEf456789012345678901234567890AbCd"
}'
const response = await fetch('https://api.trusset.org/customers/api/manage/link-wallet', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'trusset_abc123xy_secret...'
},
body: JSON.stringify({
referenceKey: 'ref_a1b2c3d4e5f67890abcdef12345678',
walletAddress: '0xAbC123dEf456789012345678901234567890AbCd'
})
});
const { data: customer } = await response.json();
import requests
response = requests.post(
'https://api.trusset.org/customers/api/manage/link-wallet',
headers={
'Content-Type': 'application/json',
'X-API-Key': 'trusset_abc123xy_secret...'
},
json={
'referenceKey': 'ref_a1b2c3d4e5f67890abcdef12345678',
'walletAddress': '0xAbC123dEf456789012345678901234567890AbCd'
}
)
customer = response.json()['data']
{
"success": true,
"data": {
"id": "cust_abc123",
"instanceId": "inst_xyz789",
"walletAddress": "0xAbC123dEf456789012345678901234567890AbCd",
"referenceKey": "ref_a1b2c3d4e5f67890abcdef12345678",
"name": "Acme Corp",
"country": "DE",
"investorType": "PROFESSIONAL",
"status": "pending",
"archived": false,
"createdAt": "2025-06-15T12:00:00.000Z",
"updatedAt": "2025-06-15T12:05:00.000Z"
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-06-15T12:05:00.000Z"
}
}
{
"success": false,
"error": {
"code": "CUSTOMER_NOT_FOUND",
"message": "No customer found with this reference key"
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-06-15T12:05:00.000Z"
}
}
{
"success": false,
"error": {
"code": "WALLET_ALREADY_LINKED",
"message": "This customer already has a linked wallet"
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-06-15T12:05:00.000Z"
}
}
{
"success": false,
"error": {
"code": "WALLET_IN_USE",
"message": "This wallet address is already assigned to another customer"
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-06-15T12:05:00.000Z"
}
}
Links an Ethereum wallet address to an existing customer that was created without a wallet. This is the second step of the deferred wallet flow: first create a customer without a
walletAddress to receive a referenceKey, then call this endpoint when the end-customer connects their wallet in your application.
The endpoint validates that the reference key exists, the customer does not already have a wallet, and the wallet is not already assigned to another customer in the same instance.
Request Body
string
required
The reference key returned when the customer was created without a wallet address. Format:
ref_ followed by 32 hex characters.string
required
Ethereum wallet address to link. Must be a valid checksummed or lowercased address.
Response Fields
boolean
Request status
object
The updated customer object with the linked wallet address
curl -X POST "https://api.trusset.org/customers/api/manage/link-wallet" \
-H "Content-Type: application/json" \
-H "X-API-Key: trusset_abc123xy_secret..." \
-d '{
"referenceKey": "ref_a1b2c3d4e5f67890abcdef12345678",
"walletAddress": "0xAbC123dEf456789012345678901234567890AbCd"
}'
const response = await fetch('https://api.trusset.org/customers/api/manage/link-wallet', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'trusset_abc123xy_secret...'
},
body: JSON.stringify({
referenceKey: 'ref_a1b2c3d4e5f67890abcdef12345678',
walletAddress: '0xAbC123dEf456789012345678901234567890AbCd'
})
});
const { data: customer } = await response.json();
import requests
response = requests.post(
'https://api.trusset.org/customers/api/manage/link-wallet',
headers={
'Content-Type': 'application/json',
'X-API-Key': 'trusset_abc123xy_secret...'
},
json={
'referenceKey': 'ref_a1b2c3d4e5f67890abcdef12345678',
'walletAddress': '0xAbC123dEf456789012345678901234567890AbCd'
}
)
customer = response.json()['data']
{
"success": true,
"data": {
"id": "cust_abc123",
"instanceId": "inst_xyz789",
"walletAddress": "0xAbC123dEf456789012345678901234567890AbCd",
"referenceKey": "ref_a1b2c3d4e5f67890abcdef12345678",
"name": "Acme Corp",
"country": "DE",
"investorType": "PROFESSIONAL",
"status": "pending",
"archived": false,
"createdAt": "2025-06-15T12:00:00.000Z",
"updatedAt": "2025-06-15T12:05:00.000Z"
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-06-15T12:05:00.000Z"
}
}
{
"success": false,
"error": {
"code": "CUSTOMER_NOT_FOUND",
"message": "No customer found with this reference key"
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-06-15T12:05:00.000Z"
}
}
{
"success": false,
"error": {
"code": "WALLET_ALREADY_LINKED",
"message": "This customer already has a linked wallet"
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-06-15T12:05:00.000Z"
}
}
{
"success": false,
"error": {
"code": "WALLET_IN_USE",
"message": "This wallet address is already assigned to another customer"
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-06-15T12:05:00.000Z"
}
}
⌘I
curl -X POST "https://api.trusset.org/customers/api/manage/link-wallet" \
-H "Content-Type: application/json" \
-H "X-API-Key: trusset_abc123xy_secret..." \
-d '{
"referenceKey": "ref_a1b2c3d4e5f67890abcdef12345678",
"walletAddress": "0xAbC123dEf456789012345678901234567890AbCd"
}'
const response = await fetch('https://api.trusset.org/customers/api/manage/link-wallet', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'trusset_abc123xy_secret...'
},
body: JSON.stringify({
referenceKey: 'ref_a1b2c3d4e5f67890abcdef12345678',
walletAddress: '0xAbC123dEf456789012345678901234567890AbCd'
})
});
const { data: customer } = await response.json();
import requests
response = requests.post(
'https://api.trusset.org/customers/api/manage/link-wallet',
headers={
'Content-Type': 'application/json',
'X-API-Key': 'trusset_abc123xy_secret...'
},
json={
'referenceKey': 'ref_a1b2c3d4e5f67890abcdef12345678',
'walletAddress': '0xAbC123dEf456789012345678901234567890AbCd'
}
)
customer = response.json()['data']
{
"success": true,
"data": {
"id": "cust_abc123",
"instanceId": "inst_xyz789",
"walletAddress": "0xAbC123dEf456789012345678901234567890AbCd",
"referenceKey": "ref_a1b2c3d4e5f67890abcdef12345678",
"name": "Acme Corp",
"country": "DE",
"investorType": "PROFESSIONAL",
"status": "pending",
"archived": false,
"createdAt": "2025-06-15T12:00:00.000Z",
"updatedAt": "2025-06-15T12:05:00.000Z"
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-06-15T12:05:00.000Z"
}
}
{
"success": false,
"error": {
"code": "CUSTOMER_NOT_FOUND",
"message": "No customer found with this reference key"
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-06-15T12:05:00.000Z"
}
}
{
"success": false,
"error": {
"code": "WALLET_ALREADY_LINKED",
"message": "This customer already has a linked wallet"
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-06-15T12:05:00.000Z"
}
}
{
"success": false,
"error": {
"code": "WALLET_IN_USE",
"message": "This wallet address is already assigned to another customer"
},
"metadata": {
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2025-06-15T12:05:00.000Z"
}
}
