Effortless customer verification now available   View changelog
SpherePaySpherePay
Wallet

Create a Wallet

Create a new wallet and associate it with a customer.

POST
/v2/wallet
AuthorizationBearer <token>

In: header

customerIdstring

The unique identifier of the customer who owns this wallet.

Length1 <= length
addressstring

The wallet address on the specified network. Must be a valid address format for the network.

Length1 <= length
networkstring

The blockchain network for this wallet. Must be a supported crypto network.

Value in"arbitrum" | "avalanche" | "base" | "ethereum" | "optimism" | "polygon" | "sol" | "tron"

Response Body

curl -X POST "https://api.spherepay.co/v2/wallet" \
  -H "Content-Type: application/json" \
  -d '{
    "customerId": "customer_66c4168d418a410eae282b83883bdc39",
    "address": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
    "network": "sol"
  }'
{
  "id": "wallet_ce745ef7f3df4b9a8bff1301ce24b045",
  "address": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
  "network": "sol",
  "customerId": "customer_66c4168d418a410eae282b83883bdc39",
  "created": "2025-01-01T00:00:00.000Z",
  "updated": "2025-01-01T00:00:00.000Z"
}

{
  "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"
    }
  ]
}