# Request format

**ENDPOINT** `https://api.heleket.com/`

All requests must be sent via POST method in JSON format.  
Request must be signed

## Authentication

The authentication process is carried out by sending 2 HTTP headers:

| Name | Definition |
| --- | --- |
| merchant | The merchant's uuid, which you can find in the merchant's personal account in the settings section. |
| sign | MD5 hash of the body of the POST request encoded in base64 and combined with your API key. |

### Example of signature generation in php:

```
$data = json_encode($data);
$sign = md5(base64_encode($data) . $API_KEY);
```

If the request doesn’t require passing parameters in the body, then form a signature for an empty string:

```
$sign = md5(base64_encode('') . $API_KEY);
```

> Different [**Key APIs**](https://doc.heleket.com/general/getting-api-keys.md) are used to accept payments and payouts

### Request example

```
curl https://api.heleket.com/v1/payment/services \
  -X POST \
  -H 'merchant: 8b03432e-385b-4670-8d06-064591096795' \
  -H 'sign: f80fa426a89eb62bd53997326865d850' \
  -H 'Content-Type: application/json'
```
