# Wallet

Includes the endpoints for wallet operations

### Fund Wallet

Use this endpoint to fund a client wallet.

<mark style="color:green;">`POST`</mark> `https://ecn.afexnigeria.com/AFEXOVS/api/v1/wallet/deposit/create`

#### Request Body

| Name                                                | Type   | Description                             |
| --------------------------------------------------- | ------ | --------------------------------------- |
| cid<mark style="color:red;">\*</mark>               | String | Client CID whose wallet is to be funded |
| request\_id<mark style="color:red;">\*</mark>       | String | Unique ID for the request               |
| amount<mark style="color:red;">\*</mark>            | String | Amount to fund wallet with              |
| transaction\_type<mark style="color:red;">\*</mark> | String | This should be set to "Credit".         |
| note                                                | String | A short note to attach to transaction   |

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

```javascript
{
    "responseCode": '100',
    'data': [
        {
            "cid": "3000000001",
            "request_id": "FND-090484930239",
            "amount": "1000.50",
            "transaction_type": "Credit",
            "note": "Funding"
        }
    ],
    "passed_data": [
        "FND-090484930239"
    ]
}
```

{% endtab %}
{% endtabs %}

### Wallet Withdrawal

Use this endpoint to withdraw

<mark style="color:green;">`POST`</mark> `https://ecn.afexnigeria.com/AFEXOVS/api/v1/wallet/withdrawal-request/create/third-party`

Request body is the same as Fund Wallet above except that 'transaction\_type' is "Debit".

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

```javascript
{
    "responseCode": '100',
    'data': [
        {
            "cid": "3000000001",
            "request_id": "FND-090484930239",
            "amount": "1000.50",
            "transaction_type": "Debit",
            "note": "Withdrawal"
        }
    ],
    "passed_data": [
        "FND-090484930239"
    ]
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: 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://api-docs.afexnigeria.com/ecn-documentation/reference/api-reference/wallet.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.
