> For the complete documentation index, see [llms.txt](https://rimplenet.gitbook.io/rimplenet/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rimplenet.gitbook.io/rimplenet/api-reference/user-wallet-balance.md).

# User Wallet Balance

This endpoint fetches the user's wallet balance

{% hint style="info" %}
**Must be authorized to call these APIs**
{% endhint %}

## Gets user wallet balance

<mark style="color:blue;">`GET`</mark> `https://example.com/wp-json/rimplenet/v1/user-wallet-balance`

#### Request Body

| Name                                         | Type   | Description                                               |
| -------------------------------------------- | ------ | --------------------------------------------------------- |
| wallet\_id<mark style="color:red;">\*</mark> | String | This is the wallet id you are retrieving the balance for. |
| user\_id<mark style="color:red;">\*</mark>   | int    | This is the user id you are retrieving the balance for    |

{% tabs %}
{% tab title="200: OK Wallet balance retrieved" %}

```php
{
  
    "status_code": 200,
    "status": true,
    "message": "Wallet Balance retrieved",
    "data": {
        "ngn": 1000
    }
}
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
To view request params, click on the arrow (>) at the right-hand side of the endpoint URL to expand or collapse
{% endhint %}

{% tabs %}
{% tab title="200 OK" %}

```php
{
  
    "status_code": 200,
    "status": true,
    "message": "Wallet Balance retrieved",
    "data": {
        "ngn": 1000
    }
}
}
```

{% endtab %}
{% endtabs %}

## Returning wallet balance

<mark style="color:blue;">`GET`</mark> `https://example.com/wp-json/rimplenet/v1/user-wallet-balance?wallet_id=usd&user_id=1`

#### Request Body

| Name                                         | Type   | Description                                               |
| -------------------------------------------- | ------ | --------------------------------------------------------- |
| wallet\_id<mark style="color:red;">\*</mark> | String | This is the wallet id you are retrieving the balance for. |
| user\_id                                     | int    | This is the user id you are retrieving the balance for.   |

{% tabs %}
{% tab title="200: OK Wallet balance retrieved" %}

```php
{
    "status_code": 200,
    "status": true,
    "message": "Wallet Balance retrieved",
    "data": {
        "ngn": 10000,
        "usd": 0
    }
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="200 OK" %}

```php
{
    "status_code": 200,
    "status": true,
    "message": "Wallet Balance retrieved",
    "data": {
        "ngn": 10000,
        "usd": 0
    }
}
```

{% endtab %}
{% endtabs %}

## Returning formatted wallet balance

<mark style="color:blue;">`GET`</mark> `https://example.com/wp-json/rimplenet/v1/user-wallet-balance?wallet_id=ngn,usd&formatted=yes`

#### Request Body

| Name                                         | Type   | Description                                                         |
| -------------------------------------------- | ------ | ------------------------------------------------------------------- |
| wallet\_id<mark style="color:red;">\*</mark> | String | This is the wallet id you are retrieving the balance for.(required) |
| user\_id                                     | int    | This is the user id you are retrieving the balance for.             |

{% tabs %}
{% tab title="200: OK Wallet balance retrieved" %}

```php
{
    "status_code": 200,
    "status": true,
    "message": "Wallet Balance retrieved",
    "data": {
        "ngn": 10000,
        "formatted": {
            "ngn": "N10,000.00",
            "usd": "$0"
        },
        "usd": 0
    }
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="200 OK" %}

```php
{
    "status_code": 200,
    "status": true,
    "message": "Wallet Balance retrieved",
    "data": {
        "ngn": 10000,
        "formatted": {
            "ngn": "N10,000.00",
            "usd": "$0"
        },
        "usd": 0
    }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://rimplenet.gitbook.io/rimplenet/api-reference/user-wallet-balance.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
