Rafobase Logo

Get wallet balance

Retrieve the current wallet balance for a member identified by email.

GET
/wallet/balance

Retrieve the current wallet balance for a member identified by email.

Authorization

ApiKeyAuth
X-API-Key<token>

API key authentication. Pass your API key via the X-API-Key header. Alternatively, you can use Authorization: Bearer {key}.

In: header

Query Parameters

email*string

Member email address

Formatemail

Response Body

application/json

application/json

application/json

curl -X GET "https://api-base.rafo.work/api/v1/wallet/balance?email=customer%40example.com"
{
  "data": {
    "memberId": "550e8400-e29b-41d4-a716-446655440000",
    "balance": {
      "totalEarned": 5000,
      "totalRedeemed": 2000,
      "available": 3000,
      "pending": 1000,
      "cancelled": 0
    }
  }
}
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing API key"
  }
}
{
  "error": {
    "code": "MEMBER_NOT_FOUND",
    "message": "Member not found"
  }
}