Criptomoedas

Requer autenticação

Suporte a 10 chains e múltiplos tokens. Use o campo chain nos endpoints de cashin/cashout para especificar a rede.

Chains Suportadas

ChainCódigoMoedasConfirmações
TrontronUSDT, USDC, TRX20
EthereumethereumETH, USDT, USDC12
BSCbscBNB, USDT, USDC15
PolygonpolygonPOL, USDT, USDC32
SolanasolanaSOL, USDT, USDC32
BitcoinbitcoinBTC3
ArbitrumarbitrumETH, USDT, USDC20
BasebaseETH, USDT, USDC20
OptimismoptimismETH, USDT, USDC20
AvalancheavalancheAVAX, USDT, USDC15

Receber Cripto

MétodoEndpointUso
Endereço temporário/v2/transactions/cashinCobrança vinculada a pedido (external_id + webhook)
Carteira fixa/v2/transactions/walletDepósito livre sem vínculo a pedido

Enviar Cripto

Use /v2/transactions/cashout com key = endereço de destino e network = código da chain.

Erros Comuns

CódigoDescrição
INVALID_CRYPTO_ADDRESSEndereço inválido para a chain informada
MISSING_REQUIRED_FIELDCampo network ausente
INSUFFICIENT_FUNDSSaldo insuficiente
INVALID_CURRENCYMoeda não suportada na chain

Cashin Cripto

cURL
PHP
JavaScript
Python
curl -X POST https://api.bspay.co/v2/transactions/cashin \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 50.00,
    "currency": "USDT",
    "chain": "tron",
    "external_id": "order_456",
    "postback_url": "https://seusite.com/webhooks/crypto"
  }'

Cashout Cripto

cURL
PHP
JavaScript
Python
curl -X POST https://api.bspay.co/v2/transactions/cashout \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 100.00,
    "currency": "USDT",
    "key": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
    "network": "tron"
  }'
Resposta — Cashin Cripto
{
  "success": true,
  "data": {
    "transaction_id": "9af31f99bd014a09a73b5209867c2c3c",
    "status": "pending",
    "amount": "50.00",
    "currency": "USDT",
    "chain": "tron",
    "deposit_address": "TRxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "expires_at": "2026-04-05T07:00:00Z"
  }
}

Esta página foi útil?