Add Dummy Balance [Sandbox Only]
curl --request POST \
--url https://api.saber.money/api/v2/wallet/transaction/create-crypto-deposit-record \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--header 'X-Request-Id: <x-request-id>' \
--header 'X-Signature: <x-signature>' \
--header 'X-Timestamp: <x-timestamp>' \
--header 'X-User-Id: <x-user-id>' \
--data '
{
"user_id": "550e8400-e29b-41d4-a716-446655440000",
"symbol": "USDC",
"amount": 1,
"network": "MATIC"
}
'import requests
url = "https://api.saber.money/api/v2/wallet/transaction/create-crypto-deposit-record"
payload = {
"user_id": "550e8400-e29b-41d4-a716-446655440000",
"symbol": "USDC",
"amount": 1,
"network": "MATIC"
}
headers = {
"X-Api-Key": "<x-api-key>",
"X-Signature": "<x-signature>",
"X-Timestamp": "<x-timestamp>",
"X-Request-Id": "<x-request-id>",
"X-User-Id": "<x-user-id>",
"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>',
'X-Signature': '<x-signature>',
'X-Timestamp': '<x-timestamp>',
'X-Request-Id': '<x-request-id>',
'X-User-Id': '<x-user-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
user_id: '550e8400-e29b-41d4-a716-446655440000',
symbol: 'USDC',
amount: 1,
network: 'MATIC'
})
};
fetch('https://api.saber.money/api/v2/wallet/transaction/create-crypto-deposit-record', 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.saber.money/api/v2/wallet/transaction/create-crypto-deposit-record",
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([
'user_id' => '550e8400-e29b-41d4-a716-446655440000',
'symbol' => 'USDC',
'amount' => 1,
'network' => 'MATIC'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <x-api-key>",
"X-Request-Id: <x-request-id>",
"X-Signature: <x-signature>",
"X-Timestamp: <x-timestamp>",
"X-User-Id: <x-user-id>"
],
]);
$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.saber.money/api/v2/wallet/transaction/create-crypto-deposit-record"
payload := strings.NewReader("{\n \"user_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"symbol\": \"USDC\",\n \"amount\": 1,\n \"network\": \"MATIC\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<x-api-key>")
req.Header.Add("X-Signature", "<x-signature>")
req.Header.Add("X-Timestamp", "<x-timestamp>")
req.Header.Add("X-Request-Id", "<x-request-id>")
req.Header.Add("X-User-Id", "<x-user-id>")
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.saber.money/api/v2/wallet/transaction/create-crypto-deposit-record")
.header("X-Api-Key", "<x-api-key>")
.header("X-Signature", "<x-signature>")
.header("X-Timestamp", "<x-timestamp>")
.header("X-Request-Id", "<x-request-id>")
.header("X-User-Id", "<x-user-id>")
.header("Content-Type", "application/json")
.body("{\n \"user_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"symbol\": \"USDC\",\n \"amount\": 1,\n \"network\": \"MATIC\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.saber.money/api/v2/wallet/transaction/create-crypto-deposit-record")
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["X-Signature"] = '<x-signature>'
request["X-Timestamp"] = '<x-timestamp>'
request["X-Request-Id"] = '<x-request-id>'
request["X-User-Id"] = '<x-user-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"symbol\": \"USDC\",\n \"amount\": 1,\n \"network\": \"MATIC\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"transaction_type": "EXTERNAL_SELL",
"status": "CREATED",
"created_at": 123,
"updated_at": 123,
"id": "<string>",
"crypto_symbol": "<string>",
"fiat_symbol": "<string>",
"exchange_rate": 123,
"crypto_amount": 123,
"fiat_amount": 123,
"bank_transaction_id": "<string>",
"source_id": "<string>",
"user_id": "<string>",
"usd_value": 123,
"deposit_crypto_address": "<string>",
"deposit_network": "<string>",
"destination_instrument_id": "<string>",
"amount": 123,
"uuid": "<string>",
"symbol": "<string>",
"tag": "<string>",
"source_address": "<string>",
"address": "<string>",
"network": "<string>",
"txn_hash": "<string>"
}
}Crypto Deposit
Add Dummy Balance [Sandbox Only]
Creates a dummy crypto deposit record against a user’s wallet so you can fund a sandbox user without a real on-chain transfer. Sandbox only, not available in production.
POST
/
api
/
v2
/
wallet
/
transaction
/
create-crypto-deposit-record
Add Dummy Balance [Sandbox Only]
curl --request POST \
--url https://api.saber.money/api/v2/wallet/transaction/create-crypto-deposit-record \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--header 'X-Request-Id: <x-request-id>' \
--header 'X-Signature: <x-signature>' \
--header 'X-Timestamp: <x-timestamp>' \
--header 'X-User-Id: <x-user-id>' \
--data '
{
"user_id": "550e8400-e29b-41d4-a716-446655440000",
"symbol": "USDC",
"amount": 1,
"network": "MATIC"
}
'import requests
url = "https://api.saber.money/api/v2/wallet/transaction/create-crypto-deposit-record"
payload = {
"user_id": "550e8400-e29b-41d4-a716-446655440000",
"symbol": "USDC",
"amount": 1,
"network": "MATIC"
}
headers = {
"X-Api-Key": "<x-api-key>",
"X-Signature": "<x-signature>",
"X-Timestamp": "<x-timestamp>",
"X-Request-Id": "<x-request-id>",
"X-User-Id": "<x-user-id>",
"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>',
'X-Signature': '<x-signature>',
'X-Timestamp': '<x-timestamp>',
'X-Request-Id': '<x-request-id>',
'X-User-Id': '<x-user-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
user_id: '550e8400-e29b-41d4-a716-446655440000',
symbol: 'USDC',
amount: 1,
network: 'MATIC'
})
};
fetch('https://api.saber.money/api/v2/wallet/transaction/create-crypto-deposit-record', 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.saber.money/api/v2/wallet/transaction/create-crypto-deposit-record",
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([
'user_id' => '550e8400-e29b-41d4-a716-446655440000',
'symbol' => 'USDC',
'amount' => 1,
'network' => 'MATIC'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <x-api-key>",
"X-Request-Id: <x-request-id>",
"X-Signature: <x-signature>",
"X-Timestamp: <x-timestamp>",
"X-User-Id: <x-user-id>"
],
]);
$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.saber.money/api/v2/wallet/transaction/create-crypto-deposit-record"
payload := strings.NewReader("{\n \"user_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"symbol\": \"USDC\",\n \"amount\": 1,\n \"network\": \"MATIC\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<x-api-key>")
req.Header.Add("X-Signature", "<x-signature>")
req.Header.Add("X-Timestamp", "<x-timestamp>")
req.Header.Add("X-Request-Id", "<x-request-id>")
req.Header.Add("X-User-Id", "<x-user-id>")
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.saber.money/api/v2/wallet/transaction/create-crypto-deposit-record")
.header("X-Api-Key", "<x-api-key>")
.header("X-Signature", "<x-signature>")
.header("X-Timestamp", "<x-timestamp>")
.header("X-Request-Id", "<x-request-id>")
.header("X-User-Id", "<x-user-id>")
.header("Content-Type", "application/json")
.body("{\n \"user_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"symbol\": \"USDC\",\n \"amount\": 1,\n \"network\": \"MATIC\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.saber.money/api/v2/wallet/transaction/create-crypto-deposit-record")
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["X-Signature"] = '<x-signature>'
request["X-Timestamp"] = '<x-timestamp>'
request["X-Request-Id"] = '<x-request-id>'
request["X-User-Id"] = '<x-user-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"symbol\": \"USDC\",\n \"amount\": 1,\n \"network\": \"MATIC\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"transaction_type": "EXTERNAL_SELL",
"status": "CREATED",
"created_at": 123,
"updated_at": 123,
"id": "<string>",
"crypto_symbol": "<string>",
"fiat_symbol": "<string>",
"exchange_rate": 123,
"crypto_amount": 123,
"fiat_amount": 123,
"bank_transaction_id": "<string>",
"source_id": "<string>",
"user_id": "<string>",
"usd_value": 123,
"deposit_crypto_address": "<string>",
"deposit_network": "<string>",
"destination_instrument_id": "<string>",
"amount": 123,
"uuid": "<string>",
"symbol": "<string>",
"tag": "<string>",
"source_address": "<string>",
"address": "<string>",
"network": "<string>",
"txn_hash": "<string>"
}
}Once the record is created, the credited balance is visible via Get Wallet Balance.
Headers
Your API key (configured in credentials)
HMAC-SHA256 signature (auto-generated) To test manually: HMAC-SHA256 of apiKey + timestamp (or apiKey + timestamp + userId when X-User-Id is required), keyed with your API secret. The HMAC Generator flow computes this for you.
Unix timestamp in seconds (auto-generated) Unix seconds, e.g. Math.floor(Date.now() / 1000). Must match the timestamp used in the X-Signature computation.
Unique request identifier (auto-generated) Any unique string per request, e.g. a UUID.
UUID of the user receiving the balance.
Body
application/json
Was this page helpful?