Get Wallet Balance API Documentation
The Get Wallet Balance API retrieves the balance of a specific wallet. It requires the walletId
as a path parameter and an API key for authentication.
Endpoint
GET: https://{{baseURL}}/v1/wallet/{walletId}/balance
Note: Replace {walletId}
with the actual wallet ID.
Request Headers
Header | Type | Description | Required | Example Value |
---|---|---|---|---|
x-api-key | String | API key for authentication | ✅ Yes | API_KEY_HERE |
Content-Type | String | Request content type (JSON) | ✅ Yes | application/json |
Path Parameters
Parameter | Type | Description | Required | Example Value |
---|---|---|---|---|
walletId | String | Unique identifier for wallet | ✅ Yes | 12345-xyz |
Example Request (cURL)
curl --location --request GET 'https://api.mecash/v1/wallet/{walletId}/balance' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json'
Responses*
Success Response (200 OK)
{
"walletId": "12345-xyz",
"balance": 100.50,
"currency": "USD"
}
Field | Type | Description |
---|---|---|
walletId | String | The unique wallet identifier |
balance | Number | Available balance in the wallet |
currency | String | Currency of the balance |
Error Responses
Unauthorized (401)
{
"error": "Unauthorized",
"message": "Invalid API key"
}
Not Found (404)
{
"error": "Not Found",
"message": "Wallet not found"
}
Server Error (500)
{
"error": "Internal Server Error",
"message": "Something went wrong on our end. Please try again later."
}