# 22. Transaction Check (Alias)

## Transaction Check with Wallet 'Alias'

<mark style="color:blue;">`GET`</mark>`{{WalletUrl}}/api/v1/wallet/check-payment-availability/by/alias?Alias=1234567890&Amount=980`&#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>It is the public key sent to the service to identify the user.</td></tr><tr><td>apiclientpublic</td><td>string</td><td>Yes</td><td>It is the general client key used to identify the service client.</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">Description</th></tr></thead><tbody><tr><td>Alias</td><td>The wallet number for which the sales eligibility check will be performed.</td></tr><tr><td>Amount</td><td>The amount planned for the sale.</td></tr></tbody></table>

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

```json
{
    "Value": {
        "IsAvailable": true,
        "ReasonIfUnavailable": null,
        "MaxAvailableAmount": 6993.00,
        "WalletBalance": 6993.00,
        "GiftBalance": 0,
        "BlockedBalance": 0,
        "AvailableBalance": 6993.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>Description</th></tr></thead><tbody><tr><td>IsFailure</td><td>bool</td><td>It returns true if the transaction failed, and false if it was successful.</td></tr><tr><td>IsSuccess</td><td>bool</td><td>It returns true if the transaction was successful, and false if it failed.</td></tr><tr><td>Errors</td><td>Array</td><td>It is the list of error messages encountered during the service call.</td></tr><tr><td>Value</td><td>Array&#x3C;Items></td><td>It is the main data set returned as a result of the transaction (it will be populated in a successful response).</td></tr></tbody></table>

## Service Response (Value)

<table><thead><tr><th width="234.05859375">Parameter</th><th width="162.38671875">Type</th><th width="348.94140625">Description</th></tr></thead><tbody><tr><td>IsAvailable</td><td>Boolean</td><td>It is a boolean value that indicates whether the transaction is active or not.</td></tr><tr><td>ReasonIfUnavailable</td><td>String</td><td>It is the text information explaining the reason if the transaction is inactive.</td></tr><tr><td>MaxAvailableAmount</td><td>String</td><td>It returns the maximum amount that can be used in the transaction as a string.</td></tr><tr><td>WalletBalance</td><td>Decimal</td><td>The total balance in the wallet, used directly in financial calculations.</td></tr><tr><td>GiftBalance</td><td>Decimal</td><td>It is the available gift (bonus) balance information.</td></tr><tr><td>BlockedBalance</td><td>String</td><td>It is the blocked amount, stored in string format for the transaction.</td></tr><tr><td>AvailableBalance</td><td>String</td><td>The instant available balance should be converted into a numerical value before the transaction.</td></tr></tbody></table>
