> For the complete documentation index, see [llms.txt](https://developer.paywall.one/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.paywall.one/payment-orchestration-integration-document/physical-pos/5.-pair/async/1.-pair-request.md).

# 1. Pair/Request

<mark style="color:green;">`POST`</mark> `{{Base Address}}/api/pair/async/request`

It will be sufficient to send a request to the address provided above. You can use the 'Base Address' as you wish for both the test environment and the live environment.

{% hint style="info" %}
Important: In order to use **the Async Matching Request** service, you need to send the '**apikeyprivate**' and '**apiclientprivate**' parameters in the 'Header' field.

\
[<mark style="color:green;">**PhysicalAPI Address**</mark>](/payment-orchestration-integration-document/environment.md)
{% endhint %}

**The header information that needs to be sent to the service is as follows:**

<table><thead><tr><th width="243">Parameter</th><th width="124.33333333333331">Type</th><th width="152">Compulsory</th><th>Description</th></tr></thead><tbody><tr><td>apikeyprivate</td><td>string</td><td>Yes</td><td>The Private Key obtained from the merchant panel.</td></tr><tr><td>apiclientprivate</td><td>string</td><td>Yes</td><td>The Private Client obtained from the merchant panel.</td></tr></tbody></table>

**The body information that needs to be sent to the service is as follows:**

{% hint style="warning" %}
**Note:** Only one of the TerminalId or TerminalTagCode parameters can be used for the transaction. If you attempt to send both at the same time, the service will return a warning.
{% endhint %}

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

```json
{
    // "TerminalId": "38e895c3-1a9a-4b73-8816-8557d1d031d6"
    "TerminalTagCode": "dükkan_1"
}
```

{% endtab %}
{% endtabs %}

<table><thead><tr><th width="204.0234375">Parameter</th><th width="111.72005208333331">Type</th><th width="152">Compulsory</th><th width="116">Length</th><th>Description</th></tr></thead><tbody><tr><td><pre><code>TerminalId
</code></pre></td><td>Guid</td><td>Yes/No</td><td>-</td><td>Your terminal's ID</td></tr><tr><td><pre><code>TerminalTagCode
</code></pre></td><td>string</td><td>Yes/No</td><td>25</td><td>Tag code</td></tr></tbody></table>

**Response from the service:**

<table><thead><tr><th width="182">Parameter</th><th width="107.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td>Result</td><td>object</td><td>It returns the details of the service.</td></tr><tr><td>ErrorCode</td><td>int</td><td>Error code. If the operation is successful, it returns the value '0'.</td></tr><tr><td>Succeeded</td><td>bool</td><td>It returns a true or false value. If the operation is successful, it returns the value 'true'.</td></tr><tr><td>Failed</td><td>bool</td><td>It returns a true or false value. If the operation is unsuccessful, it returns the value 'true'.</td></tr><tr><td>Message</td><td>string</td><td>If the operation is faulty, this is the message related to the error, and it provides language support according to the locale parameter.</td></tr><tr><td>ClientMessage</td><td>string</td><td>It returns the fixed values of Paywall error codes. You can perform mapping.</td></tr></tbody></table>

{% tabs %}
{% tab title="JSON" %}
{% code overflow="wrap" lineNumbers="true" %}

```json5
{
    "Result": {
        "PairAsyncRequestId": "4c1bcf08-d842-4e4a-9570-449c1f364f5c",
        "PairCode": "902997"
    },
    "Failed": false,
    "Message": null,
    "ClientMessage": null,
    "Succeeded": true
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

<table><thead><tr><th width="263">Parameter</th><th width="139.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td><pre><code>PairAsyncRequestId
</code></pre></td><td>Guid</td><td>It is the matching request ID. It is used in other required services. You should store it on your side.</td></tr><tr><td><pre><code>PairCode
</code></pre></td><td>string</td><td>The matching code should also be stored on your side and communicated to the device user for input on the device.</td></tr></tbody></table>


---

# 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, and the optional `goal` query parameter:

```
GET https://developer.paywall.one/payment-orchestration-integration-document/physical-pos/5.-pair/async/1.-pair-request.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
