# Creating a Static wallet

A commission of 2 TRX is charged when creating a static wallet. This fee covers the cost of wallet creation and is applied only once, during the first transaction.

**POST** `https://api.heleket.com/v1/wallet`

## Request

### Body parameters

| Name | Parameter type | Default value | Definition |
| --- | --- | --- | --- |
| currency (required) | string |  | Currency code |
| network (required) | string |  | Blockchain network code |
| order\_id (required) | string<br>min: 1<br>max: 100<br>alpha\_dash|  | Order ID in your system<br>The parameter should be a string consisting of alphabetic characters, numbers, underscores, and dashes. It should not contain any spaces or special characters.<br>The **order\_id** must be unique within the merchant invoices/static wallets/recurrence payments<br>When we find an existing invoice with **order\_id**, we return its details, a new invoice will not be created.|
| url\_callback | string<br>min: 6<br>max: 255<br>url| null | URL, to which the webhook will be sent after each top-up of the wallet |
| from\_referral\_code | string | null | The merchant who makes the request connects to a referrer by code.<br>For example, you are an application that generates invoices via the Heleket API and your customers are other stores.<br>They enter their api key and merchant id in your application, and you send requests with their credentials and passing your referral code.<br>Thus, your clients become referrals on your Heleket account and you will receive income from their turnover.|

### Request example

```
curl https://api.heleket.com/v1/wallet \
-X POST \
-H 'merchant: 8b03432e-385b-4670-8d06-064591096795' \
-H 'sign: fe99035f86fa436181717b302b95bacff1' \
-H 'Content-Type: application/json' \
-d '{
    "currency": "USDT",
    "network": "tron",
    "order_id": "1",
    "url_callback": "https://your.site/callback"
}'
```

## Response

### Response parameters

| Name | Definition |
| --- | --- |
| wallet\_uuid | uuid of the merchant's wallet |
| uuid | uuid of the wallet in a particular network |
| order\_id | Order ID in your system (to identify the order) |
| address | Wallet address in a particular network |
| network | Wallet network code |
| currency | Wallet network currency |
| url | Link to payment form |

### Response example

```
{
	"state": 0,
	"result": {
		"wallet_uuid": "de15b0f6-883f-4585-b27b-73a648044a92",
		"uuid": "87961ae5-80c5-413a-a4fe-d38199894940",
		"order_id": "1",
		"address": "TTEtddVZyNtLD9wbq4PzomjBhtxenSMXbb",
		"network": "tron",
		"currency": "USDT",
		"url": "https://pay.heleket.com/wallet/3901446a-4b74-4796-b50a-14e14dafe3ed"
	}
}
```

## Possible errors

### Validation errors

code : 422

example responses:

If some parameter is required and not passed:

```
{
	"state": 1,
	"errors": {
		"currency": ["validation.required"]
	}
}
```

If your payments are blocked. In this case you need to contact support.

```
{
    "state": 1,
    "message": "You are forbidden"
}
```

If we don’t find the payment service with the _currency_ and _network_:

```
{
    "state": 1,
    "message": "The service was not found"
}
```

If technical work occurs and the payment is temporarily unavailable, you can receive this error message:

```
{
    "state": 1,
    "message": "The terminal was not found"
}
```

```
{
    "state": 1,
    "message": "Server error"
}
```

```
{
    "state": 1,
    "message": "Wallet not found"
}
```
