Skip to main content
GET
/
api
/
wallet
/
balance

Endpoint

GET /api/wallet/balance

Description

This endpoint returns the current balance in your Vellosim wallet. Your wallet balance is used to purchase eSIM packages.

Authentication

This endpoint requires authentication using your API key in the X-API-Key header. Production:
X-API-Key: vls_live_YOUR_API_KEY
Testing/Sandbox:
X-API-Key: vls_test_YOUR_API_KEY

Request

Headers

HeaderValueRequired
AuthorizationYOUR_API_KEYYes
Content-Typeapplication/jsonYes

Parameters

This endpoint does not require any parameters.

Response

Success Response (200 OK)

{
  "success": true,
  "data": {
    "balance": 1250.50,
    "currency": "USD",
    "lastUpdated": "2024-11-10T10:30:00Z"
  }
}

Response Fields

FieldTypeDescription
balancenumberCurrent wallet balance
currencystringCurrency code (USD, EUR, etc.)
lastUpdatedstringISO 8601 timestamp of last balance update

Error Responses

401 Unauthorized

{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing API key"
  },
  "statusCode": 401
}

500 Internal Server Error

{
  "success": false,
  "error": {
    "code": "INTERNAL_ERROR",
    "message": "An internal error occurred"
  },
  "statusCode": 500
}

Examples

curl --request GET \
  --url https://api.vellosim.com/api/wallet/balance \
  --header 'X-API-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json'

Notes

Check your wallet balance before attempting to purchase eSIM packages to ensure you have sufficient funds.
You can top up your wallet balance from your Vellosim dashboard.