> For the complete documentation index, see [llms.txt](https://developer.paywall.one/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.paywall.one/payment-orchestration-integration-document/wallet-services/6.-gift-balance/1.-create-wallet.md).

# 1. Create (Wallet)

## Create Gift Balance with Wallet 'Id'

<mark style="color:yellow;">`POST`</mark>`{{WalletUrl}}/api/v1/balance/gift`&#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>](/payment-orchestration-integration-document/environment.md)
{% endhint %}

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

<table><thead><tr><th width="162">Parameter</th><th width="101.16796875">Type</th><th width="150.63671875">Compolsory</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 defines the client application.</td></tr></tbody></table>

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

```json
{
    "WalletId": "92858707-7718-435c-9ba3-3d702a3bea9b",
    "Amount": 100.00,
    "ExternalReference": "{{$guid}}",
    "ExpirationDate": "2025-11-11",
    "Description": "External Gift Balance"
}
```

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

## Service Request

| Parameter      | Type      | Description                                                                                                                                                                                                                                                                                                                                                       |
| -------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| WalletId       | Guid      | The identity information of the wallet where the gift balance will be assigned.                                                                                                                                                                                                                                                                                   |
| Amount         | decimal   | The gift balance to be assigned.                                                                                                                                                                                                                                                                                                                                  |
| ExpirationDate | DateTime? | <p>If you want the gift balance to be valid until a specific date, you can specify a date.<br><br><mark style="color:purple;">If a date is provided</mark>, the amount will automatically become inactive if not spent by that date.<br><br><mark style="color:orange;">If no date is provided</mark>, the amount will remain in the wallet until it is used.</p> |
| Description    | string    | <p>The description of the given gift balance.</p><p></p><p>Example: "Birthday"</p>                                                                                                                                                                                                                                                                                |

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

```json
{
    "IsSuccess": true,
    "IsFailure": false,
    "Value": {
        "Id": "29bddd16-16d1-4b16-bca9-906f9ef80725",
        "WalletId": "7883fb19-2359-4a9b-b917-f08a259898ed",
        "Amount": 100.00,
        "RemainingAmount": 100.00,
        "ExpirationDate": "2025-11-10T21:00:00Z",
        "IsUnlimited": false,
        "Description": "External Gift Balance",
        "LastTransactionId": null,
        "CreatedAt": "2025-08-20T14:32:16.468416Z",
        "UpdatedAt": null
    }
}
```

{% 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>Returns <strong>true</strong> if the operation is successful, <strong>false</strong> otherwise.</td></tr><tr><td>IsSuccess</td><td>bool</td><td>Returns <strong>true</strong> if the operation is successful, <strong>false</strong> otherwise.</td></tr><tr><td>Errors</td><td>Array</td><td>It is an array structure containing the details of the encountered errors.</td></tr><tr><td>Value</td><td>Array</td><td>Contains a list of items with 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>The unique identifier that represents this entity in the system</td></tr><tr><td>WalletId</td><td>Guid</td><td>The unique ID of the wallet to which the record is associated</td></tr><tr><td>Amount</td><td>string</td><td>Stores the defined total amount as text</td></tr><tr><td>RemainingAmount</td><td>decimal</td><td>Represents the unused portion of the current balance</td></tr><tr><td>ExpirationDate</td><td>decimal</td><td>Represents the expiration date of the amount in timestamp format</td></tr><tr><td>IsUnlimited</td><td>string</td><td>Indicates whether the balance has unlimited validity (true/false)</td></tr><tr><td>Description</td><td>string</td><td>Description of the amount or transaction, providing information to the user</td></tr><tr><td>LastTransactionId</td><td>Guid</td><td>The ID of the last transaction that used this balance</td></tr><tr><td>CreatedAt</td><td>Guid</td><td>The creation date of the record (likely in DateTime format)</td></tr><tr><td>UpdatedAt</td><td>int</td><td>The UNIX timestamp indicating when the record was last updated</td></tr></tbody></table>
