Saltar al contenido principal
Create a Virtual Account
curl --request POST \
  --url https://api.spherepay.co/v2/virtual-account \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "destinationCurrency": "usdc",
  "network": "ethereum",
  "walletAddress": "0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97",
  "customerId": "customer_b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7",
  "sourceCurrency": "usd",
  "integratorFeeBps": "100"
}
'
import requests

url = "https://api.spherepay.co/v2/virtual-account"

payload = {
"destinationCurrency": "usdc",
"network": "ethereum",
"walletAddress": "0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97",
"customerId": "customer_b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7",
"sourceCurrency": "usd",
"integratorFeeBps": "100"
}
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({
destinationCurrency: 'usdc',
network: 'ethereum',
walletAddress: '0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97',
customerId: 'customer_b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7',
sourceCurrency: 'usd',
integratorFeeBps: '100'
})
};

fetch('https://api.spherepay.co/v2/virtual-account', 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.spherepay.co/v2/virtual-account",
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([
'destinationCurrency' => 'usdc',
'network' => 'ethereum',
'walletAddress' => '0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97',
'customerId' => 'customer_b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7',
'sourceCurrency' => 'usd',
'integratorFeeBps' => '100'
]),
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.spherepay.co/v2/virtual-account"

payload := strings.NewReader("{\n \"destinationCurrency\": \"usdc\",\n \"network\": \"ethereum\",\n \"walletAddress\": \"0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97\",\n \"customerId\": \"customer_b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7\",\n \"sourceCurrency\": \"usd\",\n \"integratorFeeBps\": \"100\"\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.spherepay.co/v2/virtual-account")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"destinationCurrency\": \"usdc\",\n \"network\": \"ethereum\",\n \"walletAddress\": \"0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97\",\n \"customerId\": \"customer_b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7\",\n \"sourceCurrency\": \"usd\",\n \"integratorFeeBps\": \"100\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.spherepay.co/v2/virtual-account")

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 \"destinationCurrency\": \"usdc\",\n \"network\": \"ethereum\",\n \"walletAddress\": \"0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97\",\n \"customerId\": \"customer_b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7\",\n \"sourceCurrency\": \"usd\",\n \"integratorFeeBps\": \"100\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "virtualAccount_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
  "active": true,
  "depositInstructions": {
    "currency": "usd",
    "bankName": "Lead Bank",
    "bankAddress": "1801 Main St, Kansas City, MO 64108",
    "bankAccountNumber": "9876543210",
    "bankRoutingNumber": "021000089",
    "bankBeneficiaryName": "Bridge Financial Inc.",
    "bankBeneficiaryAddress": "123 Finance St, San Francisco, CA 94105",
    "iban": "DE89370400440532013000",
    "bic": "COBADEFFXXX"
  },
  "destination": {
    "currency": "usdc",
    "walletAddress": "0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97",
    "network": "ethereum"
  },
  "created": "2025-01-15T10:30:00.000Z",
  "updated": "2025-01-15T12:00:00.000Z",
  "customer": "customer_b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7",
  "fee": {
    "totalBpsRate": "130",
    "integratorFee": {
      "bpsRate": "100"
    },
    "platformFee": {
      "bpsRate": "30"
    }
  }
}
{
"status": 400,
"detail": "Invalid request parameters",
"code": "address/invalid",
"correlationId": "28c61e885c6e5eaa78c1a2183a9b883c"
}
{
"status": 404,
"detail": "Resource not found",
"code": "resource/not-found",
"correlationId": "28c61e885c6e5eaa78c1a2183a9b883c"
}
{
"status": 422,
"detail": "Validation failed",
"code": "validation/failed",
"correlationId": "28c61e885c6e5eaa78c1a2183a9b883c",
"errors": [
{
"detail": "Invalid email format",
"pointer": "/email"
},
{
"detail": "Name is required",
"pointer": "/name"
}
]
}
Usa este endpoint para crear un Onramper Account para un cliente. Un Onramper Account le otorga a tu cliente un número de cuenta bancaria virtual dedicado. Cualquier fiat depositado en esa cuenta es automáticamente convertido a la stablecoin especificada y enviado a la dirección de billetera de destino — no se requiere ninguna llamada a la API por transferencia. Siempre crea un Onramper Account por cliente, incluso si múltiples clientes comparten la misma billetera de destino, para garantizar que los depósitos puedan ser atribuidos correctamente.
Los Onramper Accounts son un producto separado de la Transfer API. Usan endpoints diferentes y no admiten la creación de cuentas bancarias a través de la Transfer API.

Autorizaciones

Authorization
string
header
requerido

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Cuerpo

application/json
destinationCurrency
enum<string>
requerido

The crypto currency deposited funds are converted into. See Supported Rails & Currencies.

Opciones disponibles:
usdc,
usdt,
eurc
Ejemplo:

"usdc"

network
enum<string>
requerido

The blockchain network the destination wallet is on. See Supported Rails & Currencies.

Opciones disponibles:
arbitrum,
avalanche,
base,
ethereum,
polygon,
sol,
tron
Ejemplo:

"ethereum"

walletAddress
string
requerido

The on-chain wallet address where converted crypto is sent. Must be valid for the selected network.

Ejemplo:

"0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97"

customerId
string
requerido

The customer who will own the virtual account.

Ejemplo:

"customer_b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7"

sourceCurrency
enum<string>
requerido

The fiat currency the virtual account accepts for deposits.

Opciones disponibles:
usd,
eur
Ejemplo:

"usd"

integratorFeeBps
string

Integrator fee in basis points (1 bps = 0.01%). Defaults to 0 if not provided.

Ejemplo:

"100"

Respuesta

id
string
requerido

Unique identifier for the virtual account.

Ejemplo:

"virtualAccount_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"

active
boolean
requerido

Whether the virtual account is currently active and accepting deposits.

Ejemplo:

true

depositInstructions
object
requerido

Bank account details that depositors should use to send fiat funds into the virtual account.

destination
object
requerido

The crypto destination where converted funds are sent after deposit.

created
string
requerido

Timestamp when the virtual account was created (ISO 8601).

Ejemplo:

"2025-01-15T10:30:00.000Z"

updated
string
requerido

Timestamp when the virtual account was last updated (ISO 8601).

Ejemplo:

"2025-01-15T12:00:00.000Z"

customer
string

The customer ID who owns the virtual account.

Ejemplo:

"customer_b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7"

fee
object

Fee breakdown for the virtual account, including integrator and platform fees.

Última modificación el 22 de junio de 2026