Mint test tokens
curl --request POST \
--url https://api.sandbox.spherepay.co/v2/sandbox/faucet \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"address": "0xdEc79ba951875fc930F5309181d5b71b821E97FE",
"network": "ethereum",
"amount": "1000"
}
'import requests
url = "https://api.sandbox.spherepay.co/v2/sandbox/faucet"
payload = {
"address": "0xdEc79ba951875fc930F5309181d5b71b821E97FE",
"network": "ethereum",
"amount": "1000"
}
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({
address: '0xdEc79ba951875fc930F5309181d5b71b821E97FE',
network: 'ethereum',
amount: '1000'
})
};
fetch('https://api.sandbox.spherepay.co/v2/sandbox/faucet', 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.sandbox.spherepay.co/v2/sandbox/faucet",
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([
'address' => '0xdEc79ba951875fc930F5309181d5b71b821E97FE',
'network' => 'ethereum',
'amount' => '1000'
]),
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://api.sandbox.spherepay.co/v2/sandbox/faucet"
payload := strings.NewReader("{\n \"address\": \"0xdEc79ba951875fc930F5309181d5b71b821E97FE\",\n \"network\": \"ethereum\",\n \"amount\": \"1000\"\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://api.sandbox.spherepay.co/v2/sandbox/faucet")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"0xdEc79ba951875fc930F5309181d5b71b821E97FE\",\n \"network\": \"ethereum\",\n \"amount\": \"1000\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.spherepay.co/v2/sandbox/faucet")
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 \"address\": \"0xdEc79ba951875fc930F5309181d5b71b821E97FE\",\n \"network\": \"ethereum\",\n \"amount\": \"1000\"\n}"
response = http.request(request)
puts response.read_body{
"address": "<string>",
"amount": "<string>",
"createdAt": "<string>",
"currency": "SPHEREUSDC",
"id": "<string>",
"network": "ethereum",
"status": "pending",
"txHash": "<string>"
}{
"code": "address/invalid",
"correlationId": "28c61e885c6e5eaa78c1a2183a9b883c",
"detail": "Invalid request parameters",
"status": 400
}{
"code": "resource/not-found",
"correlationId": "28c61e885c6e5eaa78c1a2183a9b883c",
"detail": "Resource not found",
"status": 404
}{
"code": "validation/failed",
"correlationId": "28c61e885c6e5eaa78c1a2183a9b883c",
"detail": "Validation failed",
"errors": [
{
"detail": "Invalid email format",
"pointer": "/email"
},
{
"detail": "Name is required",
"pointer": "/name"
}
],
"status": 422
}Simulação de Sandbox
Emitir Tokens de Teste
Sandbox only. Mints SPHEREUSDC, the sandbox test stablecoin, to the given address on a test network (ethereum is Sepolia, sol is Solana Devnet). The mint is submitted asynchronously: poll GET /v2/sandbox/faucet/ for the tx hash. Send an Idempotency-Key header to make retries safe: the same key returns the same mint, and reusing a key with different parameters is rejected with 409. Limits: 10 mints per hour per application, at most 1000 per mint, and a wallet balance cap of 10000 (409 when a mint would exceed it).
Mint test tokens
curl --request POST \
--url https://api.sandbox.spherepay.co/v2/sandbox/faucet \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"address": "0xdEc79ba951875fc930F5309181d5b71b821E97FE",
"network": "ethereum",
"amount": "1000"
}
'import requests
url = "https://api.sandbox.spherepay.co/v2/sandbox/faucet"
payload = {
"address": "0xdEc79ba951875fc930F5309181d5b71b821E97FE",
"network": "ethereum",
"amount": "1000"
}
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({
address: '0xdEc79ba951875fc930F5309181d5b71b821E97FE',
network: 'ethereum',
amount: '1000'
})
};
fetch('https://api.sandbox.spherepay.co/v2/sandbox/faucet', 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.sandbox.spherepay.co/v2/sandbox/faucet",
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([
'address' => '0xdEc79ba951875fc930F5309181d5b71b821E97FE',
'network' => 'ethereum',
'amount' => '1000'
]),
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://api.sandbox.spherepay.co/v2/sandbox/faucet"
payload := strings.NewReader("{\n \"address\": \"0xdEc79ba951875fc930F5309181d5b71b821E97FE\",\n \"network\": \"ethereum\",\n \"amount\": \"1000\"\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://api.sandbox.spherepay.co/v2/sandbox/faucet")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"0xdEc79ba951875fc930F5309181d5b71b821E97FE\",\n \"network\": \"ethereum\",\n \"amount\": \"1000\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.spherepay.co/v2/sandbox/faucet")
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 \"address\": \"0xdEc79ba951875fc930F5309181d5b71b821E97FE\",\n \"network\": \"ethereum\",\n \"amount\": \"1000\"\n}"
response = http.request(request)
puts response.read_body{
"address": "<string>",
"amount": "<string>",
"createdAt": "<string>",
"currency": "SPHEREUSDC",
"id": "<string>",
"network": "ethereum",
"status": "pending",
"txHash": "<string>"
}{
"code": "address/invalid",
"correlationId": "28c61e885c6e5eaa78c1a2183a9b883c",
"detail": "Invalid request parameters",
"status": 400
}{
"code": "resource/not-found",
"correlationId": "28c61e885c6e5eaa78c1a2183a9b883c",
"detail": "Resource not found",
"status": 404
}{
"code": "validation/failed",
"correlationId": "28c61e885c6e5eaa78c1a2183a9b883c",
"detail": "Validation failed",
"errors": [
{
"detail": "Invalid email format",
"pointer": "/email"
},
{
"detail": "Name is required",
"pointer": "/name"
}
],
"status": 422
}Este endpoint funciona apenas em
https://api.sandbox.spherepay.co. Ele emite SPHEREUSDC, a stablecoin de teste do sandbox, para o endereço informado em uma rede de teste (ethereum é Sepolia, sol é Solana Devnet). A emissão é enviada de forma assíncrona, então consulte Recuperar uma Emissão de Tokens de Teste para obter o hash da transação. Envie um header Idempotency-Key para tornar as novas tentativas seguras: a mesma chave retorna a mesma emissão, e reutilizar uma chave com parâmetros diferentes retorna 409. Os limites são 10 emissões por hora por aplicação, no máximo 1000 por emissão, e um teto de saldo por carteira de 10000 (409 quando uma emissão o ultrapassaria).Autorizações
Cabeçalhos
Corpo
application/json
Resposta
Última modificação em 16 de novembro de 2026