Custody
Create Custody Wallet
Creates a custody wallet managed by Kravata for your company or one of your users. Custody wallets are created already accepted and can receive funds right away.
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 |
|---|---|---|---|
| token | string | Yes | Token the wallet holds, e.g. USDC. |
| network | string | No | POLYGON (default) or SUI. |
Response
The wallet: id, wallet (address, partially masked), supportedToken, supportedNetwork, supportedCustodian (Kravata), status (accepted), isCustodial (true), registerDate and userId.
POST
/
api
/
b2b2b
/
{clientId}
/
wallet
/
custody
/
{userId}
Create Custody Wallet
curl --request POST \
--url https://testapi.kravata.co/api/b2b2b/{clientId}/wallet/custody/{userId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"token": "USDC",
"network": "SUI"
}
'import requests
url = "https://testapi.kravata.co/api/b2b2b/{clientId}/wallet/custody/{userId}"
payload = {
"token": "USDC",
"network": "SUI"
}
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({token: 'USDC', network: 'SUI'})
};
fetch('https://testapi.kravata.co/api/b2b2b/{clientId}/wallet/custody/{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/custody/{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([
'token' => 'USDC',
'network' => 'SUI'
]),
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/custody/{userId}"
payload := strings.NewReader("{\n \"token\": \"USDC\",\n \"network\": \"SUI\"\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/custody/{userId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"USDC\",\n \"network\": \"SUI\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://testapi.kravata.co/api/b2b2b/{clientId}/wallet/custody/{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 \"token\": \"USDC\",\n \"network\": \"SUI\"\n}"
response = http.request(request)
puts response.read_body{
"id": "507218f2-5e61-44af-ac1d-c0511fabe151",
"registerDate": "2025-09-29 19:52:20.361139",
"status": "accepted",
"supportedCustodian": {
"code": "KRAVATA",
"id": 140,
"name": "KRAVATA",
"status": true
},
"supportedNetwork": {
"id": 8,
"name": "POLYGON",
"status": true
},
"supportedToken": {
"id": 1,
"status": true,
"token": "USDC"
},
"userId": "08597c65-c25b-4a7c-8c68-f1180bce65f4",
"wallet": "0xc857a3d67f9d5ffd185b32c10139a5d9372f4c68"
}Create Custody Wallet
curl --request POST \
--url https://testapi.kravata.co/api/b2b2b/{clientId}/wallet/custody/{userId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"token": "USDC",
"network": "SUI"
}
'import requests
url = "https://testapi.kravata.co/api/b2b2b/{clientId}/wallet/custody/{userId}"
payload = {
"token": "USDC",
"network": "SUI"
}
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({token: 'USDC', network: 'SUI'})
};
fetch('https://testapi.kravata.co/api/b2b2b/{clientId}/wallet/custody/{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/custody/{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([
'token' => 'USDC',
'network' => 'SUI'
]),
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/custody/{userId}"
payload := strings.NewReader("{\n \"token\": \"USDC\",\n \"network\": \"SUI\"\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/custody/{userId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"USDC\",\n \"network\": \"SUI\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://testapi.kravata.co/api/b2b2b/{clientId}/wallet/custody/{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 \"token\": \"USDC\",\n \"network\": \"SUI\"\n}"
response = http.request(request)
puts response.read_body{
"id": "507218f2-5e61-44af-ac1d-c0511fabe151",
"registerDate": "2025-09-29 19:52:20.361139",
"status": "accepted",
"supportedCustodian": {
"code": "KRAVATA",
"id": 140,
"name": "KRAVATA",
"status": true
},
"supportedNetwork": {
"id": 8,
"name": "POLYGON",
"status": true
},
"supportedToken": {
"id": 1,
"status": true,
"token": "USDC"
},
"userId": "08597c65-c25b-4a7c-8c68-f1180bce65f4",
"wallet": "0xc857a3d67f9d5ffd185b32c10139a5d9372f4c68"
}
