# 16. Check Balance (Alias)

## Check Balance with Wallet 'Alias'

<mark style="color:green;">`GET`</mark>`{{WalletUrl}}/api/v1/wallet/balances/by/alias?alias=1234567890`&#x20;

{% hint style="info" %}
**Note:** To use this service, it is mandatory to include the **apikeypublic** and **apiclientpublic** parameters in the Header field.

\
[<mark style="color:green;">**WalletAPI Address**</mark>](https://developer.paywall.one/payment-orchestration-integration-document/environment)
{% endhint %}

**The parameters that need to be sent to the service (Headers) are as follows:**

<table><thead><tr><th width="162">Parameter</th><th width="79">Type</th><th width="107">Required</th><th width="403">Description</th></tr></thead><tbody><tr><td>apikeypublic</td><td>string</td><td>Yes</td><td>The general key used for API calls.</td></tr><tr><td>apiclientpublic</td><td>string</td><td>Yes</td><td>The general key that defines the API client information.</td></tr></tbody></table>

**The parameters that need to be sent to the service (QueryString) are as follows:**

<table><thead><tr><th width="162">Parameter</th><th width="403">Desciption</th></tr></thead><tbody><tr><td>alias</td><td>The wallet number whose balance is to be queried.</td></tr></tbody></table>

{% tabs %}
{% tab title="Service Reguest - JSON" %}
{% code lineNumbers="true" %}

```json
{
    "Value": {
        "Id": "0e5439b8-efa5-43d3-91e9-3cc351cc6ecc",
        "Name": "Cecelia",
        "Alias": "5576000164",
        "WalletBalance": 21.00,
        "GiftBalances": [],
        "TotalGiftBalance": 0,
        "BlockedBalance": 0,
        "TotalBalance": 21.00,
        "AvailableBalance": 21.00
    },
    "Errors": [],
    "IsSuccess": true,
    "IsFailure": false
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Service Response

<table><thead><tr><th width="192">Parameter</th><th width="147.89192708333331">Type</th><th>Desciption</th></tr></thead><tbody><tr><td>IsFailure</td><td>bool</td><td>Indicates whether there was an error in the transaction (true/false).</td></tr><tr><td>IsSuccess</td><td>bool</td><td>Indicates whether the transaction was successful (true/false).</td></tr><tr><td>Errors</td><td>Array</td><td>Contains the error details encountered during the transaction.</td></tr><tr><td>Value</td><td>Array&#x3C;Items></td><td>Contains the main data list returned as a result of the transaction.</td></tr></tbody></table>

## Service Response (Value)

<table><thead><tr><th width="234.05859375">Parameter</th><th width="162.38671875">Type</th><th width="366.55078125">Desciption</th></tr></thead><tbody><tr><td>Id</td><td>Guid</td><td>It is the unique identifier of the wallet.</td></tr><tr><td>Name</td><td>String</td><td>It is the name information of the wallet owner.</td></tr><tr><td>Alias</td><td>String</td><td>It is the alias information defined for the wallet.</td></tr><tr><td>WalletBalance</td><td>Decimal</td><td><p>It returns the total balance in the wallet.</p><p><br><br><mark style="color:red;"><strong>*</strong> Does not include GiftBalance.</mark></p></td></tr><tr><td>GiftBalances</td><td>List</td><td>It returns the list of gift balances assigned to the wallet.</td></tr><tr><td>TotalGiftBalance</td><td>Decimal</td><td>It returns the total gift balance in the wallet.</td></tr><tr><td>BlockedBalance</td><td>Decimal</td><td>It returns the unavailable (blocked) balance.</td></tr><tr><td>TotalBalance</td><td>Decimal</td><td>Total balance in the wallet<br><br><mark style="color:green;">Formula:</mark> <mark style="color:blue;">WalletBalance</mark> + <mark style="color:purple;">TotalGiftBalance</mark></td></tr><tr><td>AvailableBalance</td><td>Decimal</td><td>The available balance in the wallet. This balance includes gift balances. Additionally, if there is a blocked balance, the available balance is reduced by the blocked balance amount.<br><br><mark style="color:green;">Formula:</mark> (<mark style="color:blue;">WalletBalance</mark> + <mark style="color:purple;">TotalGiftBalance</mark>) - <mark style="color:red;">BlockedBalance</mark></td></tr></tbody></table>
