# Create wallets

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

## Create Wallet

<mark style="color:green;">`POST`</mark> `https://example.com/wp-json/rimplenet/v1wallets`

#### Request Body

| Name                                              | Type   | Description                                          |
| ------------------------------------------------- | ------ | ---------------------------------------------------- |
| wallet\_name<mark style="color:red;">\*</mark>    | String | Name of wallet                                       |
| wallet\_symbol<mark style="color:red;">\*</mark>  | String | For instance $, #                                    |
| wallet\_id<mark style="color:red;">\*</mark>      | String | For instance USD, NGN, BTC                           |
| wallet\_type<mark style="color:red;">\*</mark>    |        | Wallets are either Crypto or fiat                    |
| wallet\_decimal<mark style="color:red;">\*</mark> | int    | Enter the amount of decimals this wallet would take. |

{% tabs %}
{% tab title="200: OK Wallet was successfully created" %}

```php
{
    "status_code": 200,
    "status": true,
    "message": "Wallet was successully created",
    "data": {
        "wallet_id": 443,
        "rimplenet_wallet_name": "pounds",
        "rimplenet_wallet_id": "gbp",
        "rimplenet_wallet_symbol": "£",
        "rimplenet_wallet_note": "",
        "rimplenet_wallet_type": "fiat",
        "rimplenet_wallet_decimal": 2,
        "rimplenet_max_withdrawal_amount": 999999999,
        "rimplenet_min_withdrawal_amount": 0,
        "rimplenet_wallet_symbol_position": "left"
    }
}
```

{% endtab %}

{% tab title="400: Bad Request Invalid input" %}

```php
{
    "status_code": 400,
    "status": false,
    "message": "invalid input",
    "error": {
        "wallet_name": "Field Cannot be empty",
        "wallet_id": "Field Cannot be empty",
        "wallet_symbol": "Field Cannot be empty"
    }
}
```

{% endtab %}

{% tab title="409: Conflict Wallet does not exist" %}

```php
{
    "status_code": 409,
    "status": false,
    "message": "Wallet Already Exists",
    "error": [
        "Wallet Already Exists"
    ]
}
```

{% 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 was successully created",
    "data": {
        "wallet_id": 443,
        "rimplenet_wallet_name": "pounds",
        "rimplenet_wallet_id": "gbp",
        "rimplenet_wallet_symbol": "£",
        "rimplenet_wallet_note": "",
        "rimplenet_wallet_type": "fiat",
        "rimplenet_wallet_decimal": 2,
        "rimplenet_max_withdrawal_amount": 999999999,
        "rimplenet_min_withdrawal_amount": 0,
        "rimplenet_wallet_symbol_position": "left"
    }
}
```

{% endtab %}

{% tab title="409 BAD CONFLICT" %}

```php
{
    "status_code": 409,
    "status": false,
    "message": "Wallet Already Exists",
    "error": [
        "Wallet Already Exists"
    ]
}
```

{% endtab %}

{% tab title="400 BAD REQUEST" %}

```php
{
    "status_code": 400,
    "status": false,
    "message": "invalid input",
    "error": {
        "wallet_name": "Field Cannot be empty",
        "wallet_id": "Field Cannot be empty",
        "wallet_symbol": "Field Cannot be empty"
    }
}
```

{% endtab %}
{% endtabs %}
