Fund Wallet
curl --request POST \
--url https://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <x-api-key>' \
--data '
{
"amount": 10,
"chain": "base-sepolia",
"token": "usdxm"
}
'import requests
url = "https://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances"
payload = {
"amount": 10,
"chain": "base-sepolia",
"token": "usdxm"
}
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({amount: 10, chain: 'base-sepolia', token: 'usdxm'})
};
fetch('https://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances', 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://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances",
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([
'amount' => 10,
'chain' => 'base-sepolia',
'token' => 'usdxm'
]),
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://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances"
payload := strings.NewReader("{\n \"amount\": 10,\n \"chain\": \"base-sepolia\",\n \"token\": \"usdxm\"\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://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances")
.header("X-API-KEY", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 10,\n \"chain\": \"base-sepolia\",\n \"token\": \"usdxm\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances")
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 \"amount\": 10,\n \"chain\": \"base-sepolia\",\n \"token\": \"usdxm\"\n}"
response = http.request(request)
puts response.read_body{
"balances": {
"base": "121000000",
"ethereum": "121000000",
"total": "242000000"
},
"decimals": 6,
"token": "usdc"
}{
"error": true,
"message": "<error message>",
"code": "DEVICE_SIGNER_NOT_SUPPORTED"
}REST
Fund Wallet
Send funds to a wallet.
API scope required: wallets.fund
POST
/
v1-alpha2
/
wallets
/
{walletLocator}
/
balances
Fund Wallet
curl --request POST \
--url https://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <x-api-key>' \
--data '
{
"amount": 10,
"chain": "base-sepolia",
"token": "usdxm"
}
'import requests
url = "https://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances"
payload = {
"amount": 10,
"chain": "base-sepolia",
"token": "usdxm"
}
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({amount: 10, chain: 'base-sepolia', token: 'usdxm'})
};
fetch('https://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances', 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://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances",
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([
'amount' => 10,
'chain' => 'base-sepolia',
'token' => 'usdxm'
]),
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://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances"
payload := strings.NewReader("{\n \"amount\": 10,\n \"chain\": \"base-sepolia\",\n \"token\": \"usdxm\"\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://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances")
.header("X-API-KEY", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 10,\n \"chain\": \"base-sepolia\",\n \"token\": \"usdxm\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances")
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 \"amount\": 10,\n \"chain\": \"base-sepolia\",\n \"token\": \"usdxm\"\n}"
response = http.request(request)
puts response.read_body{
"balances": {
"base": "121000000",
"ethereum": "121000000",
"total": "242000000"
},
"decimals": 6,
"token": "usdc"
}{
"error": true,
"message": "<error message>",
"code": "DEVICE_SIGNER_NOT_SUPPORTED"
}This is an alpha API and subject to change.
This endpoint is only available in staging and only supports USDXM.
Headers
API key required for authentication
Path Parameters
A wallet locator can be of the format:
<walletAddress>email:<email>:<walletType>userId:<userId>:<walletType>userId:<userId>:<walletType>(white label user example)phoneNumber:<phoneNumber>:<walletType>twitter:<handle>:<walletType>x:<handle>:<walletType>me:<walletType>(Use when calling from the client side with a client API key)
Body
application/json
The amount of currency to fund the wallet with. Between 1 and 100
Required range:
1 <= x <= 100Example:
10
The chain to fund the wallet with
Available options:
arbitrum-sepolia, avalanche-fuji, base-sepolia, ethereum-sepolia, optimism-sepolia, polygon-amoy, sei-atlantic-2-testnet, skale-nebula-testnet, solana, soneium-minato-testnet, stellar, viction-testnet Example:
"base-sepolia"
The currency to fund the wallet with. Only USDXM is supported.
Available options:
usdxm Example:
"usdxm"
Response
Funds sent successfully.
The balance of the wallet in different chains
Show child attributes
Show child attributes
The number of decimals of the token
Example:
18
The token
Available options:
alphausd, ape, apt, avax, betausd, bnb, bonk, busd, chz, coti, credit, degen, eth, eurc, flow, fuel, hbar, ip, matic, mgusd, mnt, pathusd, phantom-cash, pirate, plume, pol, pyusd0, sei, sfuel, sol, sui, superverse, thetausd, u2u, usdc, usdce, usdf, usdg, usdm0, usdm1, usdt, usdxm, vic, weth, wirex-usdc, wirex-usdc, wld, xai, xion, xlm, xmeme, zcx Example:
"eth"
Example:
{
"balances": {
"base": "121000000",
"ethereum": "121000000",
"total": "242000000"
},
"decimals": 6,
"token": "usdc"
}
Was this page helpful?

