> For the complete documentation index, see [llms.txt](https://docs.relysia.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.relysia.com/enterprise-wallet/wallet.md).

# Wallet

#### Balance

The Balance Endpoint allows users to check the balance of their enterprise wallet. The following user roles have access to this feature:

* Admin
* Manager
* Viewer
* Operator.

{% tabs %}
{% tab title="Standard " %}

```
curl --location --request GET 'https://api.enterprise.relysia.com/api/v1/balance' \
--header 'authToken: authToken' \
--header 'serviceid: serviceid' \
--header 'Content-Type: application/json' \
```

{% endtab %}

{% tab title="With Subwallet" %}

```
curl --location --request GET 'https://api.enterprise.relysia.com/api/v1/balance' \
--header 'authToken: authToken' \
--header 'serviceid: serviceid' \
--header 'Content-Type: application/json' \
--header 'walletID: yourWalletID'
```

{% endtab %}
{% endtabs %}

On success, the API returns a JSON object with the totalBalance and token coins list.

#### Mnemonic

The mnemonic phrase is a critical component in securing your enterprise wallet's keys. Each mnemonic acts as the seed of a Hierarchical Deterministic (HD) Private Key, which contains hundreds of individual Private Keys. Only users with the Admin role are able to access this feature.

{% tabs %}
{% tab title="Standard " %}

```
curl --location --request GET 'https://api.enterprise.relysia.com/api/v1/mnemonic' \
--header 'authToken: authToken' \
--header 'serviceid: serviceid' \
--header 'Content-Type: application/json' \
```

{% endtab %}

{% tab title="With Subwallet" %}

```
curl --location --request GET 'https://api.enterprise.relysia.com/api/v1/mnemonic' \
--header 'authToken: authToken' \
--header 'serviceid: serviceid' \
--header 'Content-Type: application/json' \
--header 'walletID: yourWalletID'
```

{% endtab %}
{% endtabs %}

On success, the API returns a JSON object with the Bip39 formatted mnemonic key.

#### Address

An essential feature of every wallet is the wallet address, which can be either a ***classical bitcoin address*** or the more modern ***paymail alias*** address. To ensure privacy for the user, each API call will return a different classical address. &#x20;

{% tabs %}
{% tab title="Standard " %}

```
curl --location --request GET 'https://api.enterprise.relysia.com/api/v1/address' \
--header 'authToken: authToken' \
--header 'serviceid: serviceid' \
--header 'Content-Type: application/json' \
```

{% endtab %}

{% tab title="With Subwallet" %}

```
curl --location --request GET 'https://api.enterprise.relysia.com/api/v1/address' \
--header 'authToken: authToken' \
--header 'serviceid: serviceid' \
--header 'Content-Type: application/json' \
--header 'walletID: yourWalletID'
```

{% endtab %}
{% endtabs %}

#### All Wallet Addresses

In case your application requires fetching all available addresses, use the addresses API. This might be useful if you want to manage your own address usage flow.&#x20;

{% tabs %}
{% tab title="Standard " %}

```
curl --location --request GET 'https://api.enterprise.relysia.com/api/v1/addresses' \
--header 'authToken: authToken' \
--header 'serviceid: serviceid' \
--header 'Content-Type: application/json' \
```

{% endtab %}

{% tab title="With Subwallet" %}

```
curl --location --request GET 'https://api.enterprise.relysia.com/api/v1/addresses' \
--header 'authToken: authToken' \
--header 'serviceid: serviceid' \
--header 'Content-Type: application/json' \
--header 'walletID: yourWalletID'
```

{% endtab %}
{% endtabs %}

Upon successful execution, the API will return an array of up to 20 available addresses.

#### Retrieve All Wallets

If you create multiple wallets, you can fetch the IDs of each wallet via /wallets.

```
curl --location --request GET 'https://api.enterprise.relysia.com/api/v1/wallets' \
--header 'authToken: authToken' \
--header 'serviceid: serviceid' \
--header 'Content-Type: application/json' \
```

{% hint style="info" %}
you can add the walletID header to each request to execute commands on the specific wallets. You can Retrieve walletId's from /wallets.
{% endhint %}

#### Wallet History

The History Endpoint allows users to retrieve the transaction history of their enterprise wallet. It is a GET request and requires the following parameters in the headers:

* authToken
* serviceID

Additionally, it requires the nextPageToken in the headers, which is used to keep track of the current page of transactions.

{% tabs %}
{% tab title="Standard " %}

```
curl --location --request GET 'https://api.enterprise.relysia.com/api/v1/history' \
--header 'authToken: authToken' \
--header 'serviceid: serviceid' \
--header 'nextPageToken: nextPageToken' \
--header 'Content-Type: application/json' \
```

{% endtab %}

{% tab title="With Subwallet" %}

```
curl --location --request GET 'https://api.enterprise.relysia.com/api/v1/history' \
--header 'authToken: authToken' \
--header 'serviceid: serviceid' \
--header 'nextPageToken: nextPageToken' \
--header 'Content-Type: application/json' \
--header 'walletID: yourWalletID'
```

{% endtab %}
{% endtabs %}

On success, the following information will be included in the response:

* status: The status of the user creation process.
* histories: A list of transactions.
* meta: Includes the nextPageToken for retrieving subsequent data.

#### Update Paymail

This API allows users to update their Paymail address using a `PUT` request method. Users can easily customize their Enterprise wallet Paymail address and ensure that it reflects their branding and identity.

{% tabs %}
{% tab title="Standard " %}

```
curl --location --request PUT 'https://api.enterprise.relysia.com/api/v1/paymail' \
--header 'authToken: authToken' \
--header 'serviceid: serviceid' \
--header 'Content-Type: application/json' \
-d '{"newPaymailId":"paymail@domain.com"}'
```

{% endtab %}

{% tab title="With Subwallet" %}

```
curl --location --request PUT 'https://api.enterprise.relysia.com/api/v1/paymail' \
--header 'authToken: authToken' \
--header 'serviceid: serviceid' \
--header 'Content-Type: application/json' \
--header 'walletID: yourWalletID' \
-d '{"newPaymailId":"paymail@domain.com"}'
```

{% endtab %}
{% endtabs %}
