Custody
Create Wallet Transfer
Moves tokens between two custody wallets of your company and your users.
Request
| Field | Type | Required | Description |
|---|---|---|---|
| Authorization | Header | Yes | Bearer <access> obtained from POST /api/token. |
| clientId | Path | Yes | Your client ID, from GET /api/infoClient. |
| userId | Path | Yes | Your client ID or the ID of one of your users (from GET /api/b2b2b/{clientId}/users). The user must be approved. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| asset | string | Yes | Token to transfer, e.g. USDC. |
| walletOriginId | uuid | Yes | Origin custody wallet. |
| walletDestinationId | uuid | Yes | Destination custody wallet. |
| amountSent | number | Yes | Amount to transfer, greater than 0. |
Both wallets must be accepted, belong to your company or your users, hold the same token and be on the same network. The origin must have enough balance.
Response
The transfer: id, status (pending), symbolTypeSent, symbolTypeReceived, amountSent, amountReceived, walletOriginId, walletDestinationId, originUserId, destinationUserId, walletTransferType (transfer) and registerDate.
Errors
| Status | When |
|---|---|
| 400 | Invalid body, wallets not accepted or on different networks, or insufficient balance. |
| 401 | Missing or invalid token. |
POST
/
api
/
b2b2b
/
{clientId}
/
wallet
/
transfer
/
{userId}
Create Wallet Transfer
curl --request POST \
--url https://testapi.kravata.co/api/b2b2b/{clientId}/wallet/transfer/{userId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"asset": "USDC",
"walletOriginId": "{{walletId}}",
"walletDestinationId": "{{destinationWalletId}}",
"amountSent": 20
}
'import requests
url = "https://testapi.kravata.co/api/b2b2b/{clientId}/wallet/transfer/{userId}"
payload = {
"asset": "USDC",
"walletOriginId": "{{walletId}}",
"walletDestinationId": "{{destinationWalletId}}",
"amountSent": 20
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
asset: 'USDC',
walletOriginId: '{{walletId}}',
walletDestinationId: '{{destinationWalletId}}',
amountSent: 20
})
};
fetch('https://testapi.kravata.co/api/b2b2b/{clientId}/wallet/transfer/{userId}', 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://testapi.kravata.co/api/b2b2b/{clientId}/wallet/transfer/{userId}",
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([
'asset' => 'USDC',
'walletOriginId' => '{{walletId}}',
'walletDestinationId' => '{{destinationWalletId}}',
'amountSent' => 20
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://testapi.kravata.co/api/b2b2b/{clientId}/wallet/transfer/{userId}"
payload := strings.NewReader("{\n \"asset\": \"USDC\",\n \"walletOriginId\": \"{{walletId}}\",\n \"walletDestinationId\": \"{{destinationWalletId}}\",\n \"amountSent\": 20\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://testapi.kravata.co/api/b2b2b/{clientId}/wallet/transfer/{userId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"asset\": \"USDC\",\n \"walletOriginId\": \"{{walletId}}\",\n \"walletDestinationId\": \"{{destinationWalletId}}\",\n \"amountSent\": 20\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://testapi.kravata.co/api/b2b2b/{clientId}/wallet/transfer/{userId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"asset\": \"USDC\",\n \"walletOriginId\": \"{{walletId}}\",\n \"walletDestinationId\": \"{{destinationWalletId}}\",\n \"amountSent\": 20\n}"
response = http.request(request)
puts response.read_body{
"amountReceived": 18,
"amountSent": 20,
"destinationUserId": "08597c65-c25b-4a7c-8c68-f1180bce65f4",
"id": "2c05adbf-1e9e-4e8e-8983-becc4704bf9e",
"originUserId": "08597c65-c25b-4a7c-8c68-f1180bce65f4",
"registerDate": "2025-09-24 13:12:01.741481",
"status": "pending",
"symbolTypeReceived": "USDC",
"symbolTypeSent": "USDC",
"walletDestinationId": "18f5d977-988c-4a22-a366-e58a425c747e",
"walletOriginId": "bcfb7a40-e614-4d9b-a810-d129194a91fc",
"walletTransferMonetaries": [
{
"amount": 20,
"currency": "USDC",
"enviroment": "simulation",
"operation": "amountSent",
"result": 20,
"walletTransferRequestId": "2c05adbf-1e9e-4e8e-8983-becc4704bf9e"
},
{
"amount": 20,
"currency": "USDC",
"enviroment": "simulation",
"operation": "rateToken",
"result": 0,
"walletTransferRequestId": "2c05adbf-1e9e-4e8e-8983-becc4704bf9e"
},
{
"amount": 20,
"currency": "USDC",
"enviroment": "simulation",
"operation": "amountReceived",
"result": 18,
"walletTransferRequestId": "2c05adbf-1e9e-4e8e-8983-becc4704bf9e"
}
],
"walletTransferNumber": "T000001",
"walletTransferType": "transfer"
}Response
200 - application/json
OK
Create Wallet Transfer
curl --request POST \
--url https://testapi.kravata.co/api/b2b2b/{clientId}/wallet/transfer/{userId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"asset": "USDC",
"walletOriginId": "{{walletId}}",
"walletDestinationId": "{{destinationWalletId}}",
"amountSent": 20
}
'import requests
url = "https://testapi.kravata.co/api/b2b2b/{clientId}/wallet/transfer/{userId}"
payload = {
"asset": "USDC",
"walletOriginId": "{{walletId}}",
"walletDestinationId": "{{destinationWalletId}}",
"amountSent": 20
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
asset: 'USDC',
walletOriginId: '{{walletId}}',
walletDestinationId: '{{destinationWalletId}}',
amountSent: 20
})
};
fetch('https://testapi.kravata.co/api/b2b2b/{clientId}/wallet/transfer/{userId}', 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://testapi.kravata.co/api/b2b2b/{clientId}/wallet/transfer/{userId}",
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([
'asset' => 'USDC',
'walletOriginId' => '{{walletId}}',
'walletDestinationId' => '{{destinationWalletId}}',
'amountSent' => 20
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://testapi.kravata.co/api/b2b2b/{clientId}/wallet/transfer/{userId}"
payload := strings.NewReader("{\n \"asset\": \"USDC\",\n \"walletOriginId\": \"{{walletId}}\",\n \"walletDestinationId\": \"{{destinationWalletId}}\",\n \"amountSent\": 20\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://testapi.kravata.co/api/b2b2b/{clientId}/wallet/transfer/{userId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"asset\": \"USDC\",\n \"walletOriginId\": \"{{walletId}}\",\n \"walletDestinationId\": \"{{destinationWalletId}}\",\n \"amountSent\": 20\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://testapi.kravata.co/api/b2b2b/{clientId}/wallet/transfer/{userId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"asset\": \"USDC\",\n \"walletOriginId\": \"{{walletId}}\",\n \"walletDestinationId\": \"{{destinationWalletId}}\",\n \"amountSent\": 20\n}"
response = http.request(request)
puts response.read_body{
"amountReceived": 18,
"amountSent": 20,
"destinationUserId": "08597c65-c25b-4a7c-8c68-f1180bce65f4",
"id": "2c05adbf-1e9e-4e8e-8983-becc4704bf9e",
"originUserId": "08597c65-c25b-4a7c-8c68-f1180bce65f4",
"registerDate": "2025-09-24 13:12:01.741481",
"status": "pending",
"symbolTypeReceived": "USDC",
"symbolTypeSent": "USDC",
"walletDestinationId": "18f5d977-988c-4a22-a366-e58a425c747e",
"walletOriginId": "bcfb7a40-e614-4d9b-a810-d129194a91fc",
"walletTransferMonetaries": [
{
"amount": 20,
"currency": "USDC",
"enviroment": "simulation",
"operation": "amountSent",
"result": 20,
"walletTransferRequestId": "2c05adbf-1e9e-4e8e-8983-becc4704bf9e"
},
{
"amount": 20,
"currency": "USDC",
"enviroment": "simulation",
"operation": "rateToken",
"result": 0,
"walletTransferRequestId": "2c05adbf-1e9e-4e8e-8983-becc4704bf9e"
},
{
"amount": 20,
"currency": "USDC",
"enviroment": "simulation",
"operation": "amountReceived",
"result": 18,
"walletTransferRequestId": "2c05adbf-1e9e-4e8e-8983-becc4704bf9e"
}
],
"walletTransferNumber": "T000001",
"walletTransferType": "transfer"
}
