> For the complete documentation index, see [llms.txt](https://shopapi.mikroservis.one/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://shopapi.mikroservis.one/en/creating-a-request.md).

# Creating a Request

## Creating a Request

<mark style="color:orange;">`POST`</mark> `/`

Creating a request to obtain payment details

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | Token \<token>     |

**Body**

<table><thead><tr><th>Name</th><th>Type</th><th>Description</th><th data-type="checkbox">Обязательный</th></tr></thead><tbody><tr><td><code>fromCode</code></td><td>string</td><td>Output currency</td><td>true</td></tr><tr><td><code>toCode</code></td><td>string</td><td>Receiving currency</td><td>true</td></tr><tr><td><code>toSumma</code></td><td>float</td><td>Receiving amount</td><td>true</td></tr><tr><td><code>fromRequisites</code></td><td>object</td><td>Output payment details</td><td>false</td></tr><tr><td><code>toRequisites</code></td><td>object</td><td>Receiving payment details</td><td>true</td></tr><tr><td><code>serviceName</code></td><td>string</td><td>Payment name</td><td>true</td></tr><tr><td><code>shop</code></td><td>int</td><td>Shop ID</td><td>true</td></tr><tr><td><code>links</code></td><td>object</td><td>Callbacks for statuses</td><td>false</td></tr></tbody></table>

Example of the “requisites” field

```json
// for banks
"requisites": {
    "fio": "Иван Иванов",
    "card": "1234567890123456"
}
// or for cryptocurrency
"requisites": {
    "wallet": "1234567890987654321234567890"
}
```

Example of the “callbacks” field

<pre class="language-json"><code class="lang-json">"links": {
        "<a data-footnote-ref href="#user-content-fn-1">success</a>": "http://localhost/success",
        "<a data-footnote-ref href="#user-content-fn-2">fail</a>": "http://localhost/fail",
        "<a data-footnote-ref href="#user-content-fn-3">status</a>": "http://localhost/status"
}
</code></pre>

{% tabs %}
{% tab title="200" %}

```json
{
    // Request UUID
    "claim": "b1321391-d9c4-4690-860c-85dfb8fa386b",
    // Payment form link
    "form": "https://shop.sova.gg/shop/form/DEgRwCl07OjW",
    // Payment link
    "link": "https://shop.sova.gg/claim/b1321391-d9c4-4690-860c-85dfb8fa386b"
}
```

{% endtab %}

{% tab title="400" %}

```json
// example
{
    "shop": [
        "Shop doesn't exists"
    ],
    "requisites": {
        "card": "Введите номер карты Альфа банка без пробелов"
    }
}
// Errors without a field
{
    "nonFieldErrors": [
        "В данное время нам не требуется больше чем 32977.59199424 btc на Bitcoin!"
    ]
}
```

{% endtab %}

{% tab title="403" %}

```json
{
    "error": "Invalid signature"
}
```

{% endtab %}
{% endtabs %}

[^1]: Если обработано успешно

[^2]: Если обмен совершен с ошибкой

[^3]: При изменении статуса


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://shopapi.mikroservis.one/en/creating-a-request.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
