Create wallet (merchant or customer)
curl --request POST \
--url https://api-staging.stablestack.com/api/wallets \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"currency": "USDC",
"description": "My wallet",
"customer_id": "85b148ab-3f6b-4d55-917f-3c8de668a48e",
"network": "erc20"
}
'import requests
url = "https://api-staging.stablestack.com/api/wallets"
payload = {
"currency": "USDC",
"description": "My wallet",
"customer_id": "85b148ab-3f6b-4d55-917f-3c8de668a48e",
"network": "erc20"
}
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
currency: 'USDC',
description: 'My wallet',
customer_id: '85b148ab-3f6b-4d55-917f-3c8de668a48e',
network: 'erc20'
})
};
fetch('https://api-staging.stablestack.com/api/wallets', 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-staging.stablestack.com/api/wallets",
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([
'currency' => 'USDC',
'description' => 'My wallet',
'customer_id' => '85b148ab-3f6b-4d55-917f-3c8de668a48e',
'network' => 'erc20'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-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-staging.stablestack.com/api/wallets"
payload := strings.NewReader("{\n \"currency\": \"USDC\",\n \"description\": \"My wallet\",\n \"customer_id\": \"85b148ab-3f6b-4d55-917f-3c8de668a48e\",\n \"network\": \"erc20\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-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-staging.stablestack.com/api/wallets")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"USDC\",\n \"description\": \"My wallet\",\n \"customer_id\": \"85b148ab-3f6b-4d55-917f-3c8de668a48e\",\n \"network\": \"erc20\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.stablestack.com/api/wallets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"currency\": \"USDC\",\n \"description\": \"My wallet\",\n \"customer_id\": \"85b148ab-3f6b-4d55-917f-3c8de668a48e\",\n \"network\": \"erc20\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"id": "49468947-4006-4b9a-bd96-f6b0d0210ad3",
"asset_type": "STABLECOIN",
"currency": "USDC",
"balance": "0.00000000",
"description": "my erc account",
"status": "active",
"created_at": "2025-05-01T21:04:31.928Z",
"updated_at": "2025-05-01T21:04:31.928Z",
"customer_id": "85b148ab-3f6b-4d55-917f-3c8de668a48e",
"addresses": [
{
"id": "2381eeac-a592-4992-8bb9-4286634a0e94",
"crypto_wallet_id": "49468947-4006-4b9a-bd96-f6b0d0210ad3",
"address": "0xDt541923E23DcE32d1A346e96558dA89f87WD1aB",
"network": "erc20",
"created_at": "2025-05-01T21:04:32.179Z"
}
]
}
}Wallets
Create Wallet
API reference for creating wallets (both merchant and customer)
POST
/
wallets
Create wallet (merchant or customer)
curl --request POST \
--url https://api-staging.stablestack.com/api/wallets \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"currency": "USDC",
"description": "My wallet",
"customer_id": "85b148ab-3f6b-4d55-917f-3c8de668a48e",
"network": "erc20"
}
'import requests
url = "https://api-staging.stablestack.com/api/wallets"
payload = {
"currency": "USDC",
"description": "My wallet",
"customer_id": "85b148ab-3f6b-4d55-917f-3c8de668a48e",
"network": "erc20"
}
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
currency: 'USDC',
description: 'My wallet',
customer_id: '85b148ab-3f6b-4d55-917f-3c8de668a48e',
network: 'erc20'
})
};
fetch('https://api-staging.stablestack.com/api/wallets', 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-staging.stablestack.com/api/wallets",
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([
'currency' => 'USDC',
'description' => 'My wallet',
'customer_id' => '85b148ab-3f6b-4d55-917f-3c8de668a48e',
'network' => 'erc20'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-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-staging.stablestack.com/api/wallets"
payload := strings.NewReader("{\n \"currency\": \"USDC\",\n \"description\": \"My wallet\",\n \"customer_id\": \"85b148ab-3f6b-4d55-917f-3c8de668a48e\",\n \"network\": \"erc20\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-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-staging.stablestack.com/api/wallets")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"USDC\",\n \"description\": \"My wallet\",\n \"customer_id\": \"85b148ab-3f6b-4d55-917f-3c8de668a48e\",\n \"network\": \"erc20\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.stablestack.com/api/wallets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"currency\": \"USDC\",\n \"description\": \"My wallet\",\n \"customer_id\": \"85b148ab-3f6b-4d55-917f-3c8de668a48e\",\n \"network\": \"erc20\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"id": "49468947-4006-4b9a-bd96-f6b0d0210ad3",
"asset_type": "STABLECOIN",
"currency": "USDC",
"balance": "0.00000000",
"description": "my erc account",
"status": "active",
"created_at": "2025-05-01T21:04:31.928Z",
"updated_at": "2025-05-01T21:04:31.928Z",
"customer_id": "85b148ab-3f6b-4d55-917f-3c8de668a48e",
"addresses": [
{
"id": "2381eeac-a592-4992-8bb9-4286634a0e94",
"crypto_wallet_id": "49468947-4006-4b9a-bd96-f6b0d0210ad3",
"address": "0xDt541923E23DcE32d1A346e96558dA89f87WD1aB",
"network": "erc20",
"created_at": "2025-05-01T21:04:32.179Z"
}
]
}
}Creates a new wallet for either merchant or customer.
Customer FIAT Wallet:
Merchant STABLECOIN Wallet:
Merchant FIAT Wallet:
Key Features:
- Supports both STABLECOIN (with network) and FIAT wallets
customer_idis optional (null for merchant wallets)- Automatic network validation based on currency type
- Returns complete wallet details with addresses (for crypto)
Request Body:
Customer STABLECOIN Wallet:{
"customer_id": "85b148ab-3f6b-4d55-917f-3c8de668a48e",
"currency": "USDC",
"network": "erc20",
"description": "my USDC account"
}
{
"customer_id": "85b148ab-3f6b-4d55-917f-3c8de668a48e",
"currency": "CAD",
"description": "my cad account"
}
{
"currency": "USDC",
"network": "polygon",
"description": "merchant USDC account"
}
{
"currency": "CAD",
"description": "merchant CAD account"
}
Headers
Body
application/json
Currency code
Available options:
USDC, ZAR Example:
"USDC"
Optional description (Recommended)
Maximum string length:
255Example:
"My wallet"
Required for customer wallets, omit for merchant wallets
Example:
"85b148ab-3f6b-4d55-917f-3c8de668a48e"
Required for STABLECOIN only
Available options:
erc20, polygon Example:
"erc20"