# 3. Query (Id)

## Gift Balance Inquiry by 'Id'

<mark style="color:green;">`GET`</mark>`{{WalletUrl}}/api/v1/balance/gift/:id`&#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 shared key information that provides general access to the API services.</td></tr><tr><td>apiclientpublic</td><td>string</td><td>Yes</td><td>It is the public client key information that identifies the client application.</td></tr></tbody></table>

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

| Parameter | Description                                                                                                                            |
| --------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| Id        | It is the identity information of the defined gift balance. This information is returned from the Paywall API at the time of creation. |

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

```json
{
    "Value": {
        "Id": "2344fb8a-876c-4c9a-862b-e6d07d7de819",
        "WalletId": "30bac1c0-ad6b-4c50-a52e-1b34f9b487a7",
        "Amount": 1000.00,
        "RemainingAmount": 1000.00,
        "ExpirationDate": "2026-04-29T02:00:34.426Z",
        "IsUnlimited": false,
        "Description": "KUPON100",
        "IsUsed": false,
        "IsFullyUsed": false,
        "IsPartiallyUsed": false,
        "LastTransactionId": null,
        "CreatedAt": "2025-04-30T11:28:52.399444Z",
        "UpdatedAt": null
    },
    "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 false if the transaction failed, and true 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 an array structure containing the error details that occurred.</td></tr><tr><td>Value</td><td>Object</td><td>It contains a list of items that hold the result data.</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>Id</td><td>Guid</td><td>It is the identity number of the gift balance.</td></tr><tr><td>WalletId</td><td>Guid</td><td>It is the identity information of the wallet where the balance is assigned.</td></tr><tr><td>Amount</td><td>decimal</td><td>It is the amount of the gift balance.</td></tr><tr><td>RemainingAmount</td><td>decimal</td><td>It is the remaining balance amount.</td></tr><tr><td>ExpirationDate</td><td>DateTime</td><td>It is the expiration date of the gift balance.</td></tr><tr><td>IsUnlimited</td><td>bool</td><td><p>It indicates whether the gift balance has an expiration date.</p><p>If there is an expiration date, it returns <code>false</code>; if there is no expiration date, it returns <code>true</code>.</p></td></tr><tr><td>Description</td><td>string</td><td>It is the description provided at the time of defining the gift balance.</td></tr><tr><td>IsUsed</td><td>bool</td><td>Has the gift balance been used?</td></tr><tr><td>IsFullyUsed</td><td>bool</td><td>Has the gift balance been fully used?</td></tr><tr><td>IsPartiallyUsed</td><td>bool</td><td>Has the gift balance been partially used?</td></tr><tr><td>LastTransactionId</td><td>Guid</td><td>It is the unique identifier of the last transaction.</td></tr><tr><td>CreatedAt</td><td>DateTime</td><td>It is the creation date of the gift balance.</td></tr><tr><td>UpdatedAt</td><td>DateTime</td><td>It is the update date of the gift balance.</td></tr></tbody></table>
