Starknet: USDC On/OffRamp live.   Details →
Sphere Paysphere
Virtual account

Create a Virtual Account

A **virtual account** Virtual Account provides a streamlined, automatic solution to convert fiat currency into stablecoins directly into your customers' bank accounts.

POST
/v2/virtual-account
AuthorizationBearer <token>

JWT Bearer token authentication

In: header

destinationCurrencystring

The currency of the stable coin received from sending funds to the virtual account.

Value in"USDC" | "USDT"
networkstring

The currency of the source bank-account or wallet. Please refer to the Virtual Account Guide for more information.

walletAddressstring

The wallet address to send the funds to.

integratorBpsFee?string

The basis point percentage fee for the integrator.

Default"0"
Pattern"^[0-9]+$"
customerIdstring

The id of the customer associated with the virtual account.

Pattern"^customer_[a-z0-9]+$"
sourceCurrencystring

The currency of the source bank account to send the fund to the virtual account.

Value in"USD" | "EUR"

Response Body

curl -X POST "https://api.sandbox.spherepay.co/v2/virtual-account" \
  -H "Content-Type: application/json" \
  -d '{
    "customerId": "customer_1ab2c3d4",
    "sourceCurrency": "USD",
    "destinationCurrency": "USDC",
    "network": "ethereum",
    "walletAddress": "0x1234...abcd",
    "integratorBpsfee": "10"
  }'
const body = JSON.stringify({
  "customerId": "customer_1ab2c3d4",
  "sourceCurrency": "USD",
  "destinationCurrency": "USDC",
  "network": "ethereum",
  "walletAddress": "0x1234...abcd",
  "integratorBpsfee": "10"
})

fetch("https://api.sandbox.spherepay.co/v2/virtual-account", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://api.sandbox.spherepay.co/v2/virtual-account"
  body := strings.NewReader(`{
    "customerId": "customer_1ab2c3d4",
    "sourceCurrency": "USD",
    "destinationCurrency": "USDC",
    "network": "ethereum",
    "walletAddress": "0x1234...abcd",
    "integratorBpsfee": "10"
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://api.sandbox.spherepay.co/v2/virtual-account"
body = {
  "customerId": "customer_1ab2c3d4",
  "sourceCurrency": "USD",
  "destinationCurrency": "USDC",
  "network": "ethereum",
  "walletAddress": "0x1234...abcd",
  "integratorBpsfee": "10"
}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
{
  "id": "virtualAccount_987xyz654",
  "active": true,
  "fees": {
    "totalBpsRate": "20",
    "integratorFee": {
      "bpsRate": "10"
    },
    "platformFee": {
      "bpsRate": "10"
    }
  },
  "depositInstructions": {
    "currency": "USD",
    "bankName": "Bank of Example",
    "bankAccountNumber": "000123456789",
    "bankRoutingNumber": "1234567890",
    "bankBeneficiaryName": "John Doe",
    "bankBeneficiaryAddress": "123 Main St, Anytown, USA"
  },
  "destination": {
    "currency": "USDC",
    "walletAddress": "0x1234...abcd",
    "network": "ethereum"
  },
  "created": "2025-04-20T21:49:46.697Z",
  "updated": "2025-04-20T21:50:18.854Z"
}
{
  "ts": "2025-04-20T00:09:16.870Z",
  "error": {
    "information": [
      "Required"
    ]
  }
}