> For the complete documentation index, see [llms.txt](https://sparkdocs.gitbook.io/spark-whitepaper/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sparkdocs.gitbook.io/spark-whitepaper/main/request-format.md).

# Request format

Request format - Spark

<figure><img src="https://2601716733-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHIHODNIklvXOhlVTTDuZ%2Fuploads%2FyKyaLMvreDpbtzvff32i%2FGiveaway%20(3).png?alt=media&amp;token=911f80cd-e697-4d0d-a1d9-8b88da5d8a28" alt=""><figcaption></figcaption></figure>

<mark style="color:green;">`EndPoint: https://api.sparkgateway.co`</mark> <mark style="color:red;">{On Developing}</mark>

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

***

### Authentication

<table><thead><tr><th width="178">NAME</th><th> DESCRIPTION</th></tr></thead><tbody><tr><td>merchant</td><td>The uuid of the merchant, which is located in the settings area of the merchant's personal account.</td></tr><tr><td>sign</td><td>Your API key and the base64-encoded body of the POST request are hashed using MD5 algorithm.</td></tr></tbody></table>

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

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

> *<mark style="color:green;">Different Key APIs are used to accept payments and payouts. Details are described in the relevant section.</mark>*

**Request example**

```java
curl https://api.sparkgateway.co
  -X POST \
  -H 'merchant: 8d06-064591096795 \
  -H 'sign: d5399732686f8062b89eb' \
  -H 'Content-Type: application/json' \
  -d '{}'
```
