Pular para o conteúdo 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 '
{
  "customerId": "customer_b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7",
  "sourceCurrency": "usd",
  "destinationCurrency": "usdc",
  "network": "ethereum",
  "walletAddress": "0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97"
}
'
{
  "id": "virtualAccount_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
  "customer": "customer_b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7",
  "active": true,
  "depositInstructions": {
    "currency": "usd",
    "bankName": "Lead Bank",
    "bankAddress": "1801 Main St, Kansas City, MO 64108",
    "bankAccountNumber": "9876543210",
    "bankRoutingNumber": 21000089,
    "bankBeneficiaryName": "Bridge Financial Inc.",
    "bankBeneficiaryAddress": "123 Finance St, San Francisco, CA 94105",
    "iban": "DE89370400440532013000",
    "bic": "COBADEFFXXX"
  },
  "destination": {
    "currency": "usdc",
    "walletAddress": "0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97",
    "network": "ethereum"
  },
  "fee": {
    "totalBpsRate": "130",
    "integratorFee": {
      "bpsRate": "100"
    },
    "platformFee": {
      "bpsRate": "30"
    }
  },
  "created": "2025-01-15T10:30:00.000Z",
  "updated": "2025-01-15T12:00:00.000Z"
}
Use este endpoint para criar uma Onramper Account para um cliente (customer). Uma Onramper Account fornece ao seu cliente um número de conta bancária virtual dedicado. Todo fiat depositado nessa conta é automaticamente convertido para a stablecoin especificada e encaminhado para o endereço de carteira de destino — nenhuma chamada de API por transferência é necessária. Sempre crie uma Onramper Account por cliente, mesmo que vários clientes compartilhem o mesmo endereço de carteira de destino, para garantir que os depósitos possam ser atribuídos corretamente.
As Onramper Accounts são um produto separado da Transfer API. Elas usam endpoints diferentes e não suportam a criação de contas bancárias via Transfer API.

Autorizações

Authorization
string
header
obrigatório

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

Corpo

application/json
customerId
string
obrigatório

The customer who will own the virtual account.

Exemplo:

"customer_b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7"

sourceCurrency
enum<string>
obrigatório

The fiat currency the virtual account accepts for deposits.

Opções disponíveis:
usd,
eur
Exemplo:

"usd"

destinationCurrency
enum<string>
obrigatório

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

Opções disponíveis:
usdc,
usdt,
eurc
Exemplo:

"usdc"

network
enum<string>
obrigatório

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

Opções disponíveis:
arbitrum,
avalanche,
base,
ethereum,
polygon,
sol,
tron
Exemplo:

"ethereum"

walletAddress
string
obrigatório

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

Exemplo:

"0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97"

integratorFeeBps
string

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

Exemplo:

"100"

Resposta

id
string
obrigatório

Unique identifier for the virtual account.

Exemplo:

"virtualAccount_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"

active
boolean
obrigatório

Whether the virtual account is currently active and accepting deposits.

Exemplo:

true

depositInstructions
object
obrigatório

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

destination
object
obrigatório

The crypto destination where converted funds are sent after deposit.

created
string
obrigatório

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

Exemplo:

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

updated
string
obrigatório

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

Exemplo:

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

customer
string

The customer ID who owns the virtual account.

Exemplo:

"customer_b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7"

fee
object

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

Última modificação em 18 de junho de 2026