> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gowasl.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Card Balance Details — Wasl Cards API Reference

> Check the real-time available stock quantity for a specific card denomination before placing an order to avoid insufficient balance errors.

The Get Card Balance endpoint returns the current stock level for a specific card denomination. You should call this endpoint immediately before submitting a card order to confirm that sufficient units are available. Stock levels can change between your initial call to [Get Card Details](/api-reference/cards/get-card-details) and the moment you attempt to fulfil an order, so treating balance as a live value is important for a smooth checkout experience.

## Endpoint

```
POST /api-service/card/get-balance-details
```

| Environment | Base URL |
| - | - |
| Development | `https://development.payzah.net` |
| Production | `https://Payzah.net/production770` |

## Request Headers

| Header | Value |
| - | - |
| `Content-Type` | `application/json` |
| `Authorization` | `<your token>` |
| `Token` | `token` |

## Request Body

<ParamField body="card_id" type="integer" required>
  The unique identifier of the card denomination whose balance you want to check. Obtain this value from the `card_id` field in the [Get Card Details](/api-reference/cards/get-card-details) response.
</ParamField>

### Example Request

```json Request theme={null}
{
  "card_id": 59
}
```

## Response

### Response Fields

<ResponseField name="status" type="boolean">
  Indicates whether the request succeeded. Returns `true` on success.
</ResponseField>

<ResponseField name="code" type="string">
  A status code for the response. `"11111"` indicates success.
</ResponseField>

<ResponseField name="data" type="array">
  An array containing the balance object for the requested card denomination.

  <Expandable title="data[]">
    <ResponseField name="card_id" type="integer">
      The unique identifier of the card denomination, echoed from your request.
    </ResponseField>

    <ResponseField name="balance" type="integer">
      The number of units of this denomination currently available in stock.
    </ResponseField>
  </Expandable>
</ResponseField>

### Example Response

```json Response theme={null}
{
  "status": true,
  "code": "11111",
  "data": [
    {
      "card_id": 59,
      "balance": 5
    }
  ]
}
```

<Warning>
  Always check the balance before initiating a card purchase request. If you request more cards than are currently in stock, the API returns error code `10006` (Insufficient Balance) and your order will not be processed. A real-time balance check immediately before ordering helps you prevent this error and display accurate availability to your customers.
</Warning>

<Tip>
  If `balance` returns `0`, consider marking the denomination as temporarily out of stock in your UI and polling this endpoint periodically to detect when inventory is replenished.
</Tip>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.