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

# Get Credit Balance

> Check your account balance and available credits

## Get Credit Balance

Retrieve your current account balance and available credits for SMS services.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://app.notify.ng/api/v2/Balance?ApiKey=YOUR_API_KEY&ClientId=YOUR_CLIENT_ID" \
    -H "Content-Type: application/json"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://app.notify.ng/api/v2/Balance?ApiKey=YOUR_API_KEY&ClientId=YOUR_CLIENT_ID', {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json'
    }
  });

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  url = "https://app.notify.ng/api/v2/Balance"
  params = {
      "ApiKey": "YOUR_API_KEY",
      "ClientId": "YOUR_CLIENT_ID"
  }

  response = requests.get(url, params=params)
  data = response.json()
  print(data)
  ```

  ```php PHP theme={null}
  <?php
  $url = "https://app.notify.ng/api/v2/Balance?ApiKey=YOUR_API_KEY&ClientId=YOUR_CLIENT_ID";

  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));

  $response = curl_exec($ch);
  curl_close($ch);

  $data = json_decode($response, true);
  print_r($data);
  ?>
  ```
</CodeGroup>

## Parameters

<ParamField query="ApiKey" type="string" required>
  Your API key for authentication
</ParamField>

<ParamField query="ClientId" type="string" required>
  Your client identifier for authentication
</ParamField>

## Headers

<ParamField header="Content-Type" type="string">
  `application/json` or `application/xml`
</ParamField>

<ParamField header="Type" type="string">
  `json` or `xml` (response format preference)
</ParamField>

## Response

<ResponseField name="ErrorCode" type="number">
  Error code (0 for success)
</ResponseField>

<ResponseField name="ErrorDescription" type="string">
  Description of the result
</ResponseField>

<ResponseField name="Data" type="array">
  Array containing balance information
</ResponseField>

<ResponseField name="Data[].PluginType" type="string">
  Service type (e.g., "SMS")
</ResponseField>

<ResponseField name="Data[].Credits" type="string">
  Available credits in your account (e.g., "€0.6991")
</ResponseField>

### Success Response

```json theme={null}
{
  "ErrorCode": 0,
  "ErrorDescription": "Success",
  "Data": [
    {
      "PluginType": "SMS",
      "Credits": "€0.6991"
    }
  ]
}
```

### Error Response

```json theme={null}
{
  "ErrorCode": 001,
  "ErrorDescription": "Account details cannot be blank"
}
```

## Use Cases

* **Pre-send validation**: Check balance before sending SMS messages
* **Account monitoring**: Monitor credit consumption
* **Billing integration**: Display current balance to users
* **Automated alerts**: Set up low balance notifications
