# 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: YOUR_MERCHANT_UUID' \
-H 'sign: YOUR_SIGNATURE' \
-H 'Content-Type: application/json' \
-d '{
    "currency": "USDT",
    "network": "tron",
    "order_id": "YOUR_ORDER_ID",
    "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": "59a81558-ac3a-4ad7-aa6c-eb7ba48d5cf8",
		"uuid": "23592094-115f-4847-a286-5c06f31780a4",
		"order_id": "YOUR_ORDER_ID",
		"address": "YOUR_WALLET_ADDRESS",
		"network": "tron",
		"currency": "USDT",
		"url": "https://pay.heleket.com/wallet/f205b4a9-6d57-4f4e-96be-fb4916134e25"
	}
}
```

## 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"
}
```
