# 4. Query

<mark style="color:blue;">`GET`</mark> `{{Base Address}}/api/payment/inquiry/`<mark style="color:red;">`{paymentRequestId}`</mark>

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

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

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

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

<table><thead><tr><th width="198">Parameter</th><th width="106.33333333333331">Type</th><th width="164">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>

**Response returned 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>Returns the information in the details of the service.</td></tr><tr><td>ErrorCode</td><td>int</td><td>Error code. Returns the value '0' if the transaction is successful.</td></tr><tr><td>Succeeded</td><td>bool</td><td>Returns a true or false value. Returns 'true' if the transaction is <mark style="color:green;">successful</mark>.</td></tr><tr><td>Failed</td><td>bool</td><td>It returns either a true or false value. If the operation <mark style="color:red;">fails</mark>, it returns 'true'</td></tr><tr><td>Message</td><td>string</td><td>This is the specified message for the error if the operation fails, providing language support based on the locale parameter.</td></tr><tr><td>ClientMessage</td><td>string</td><td>It returns constant values for Paywall error codes. You can perform mapping.</td></tr></tbody></table>

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

```json5
{
    "Result": {
        "PaymentRequestId": "1eb856a8-1d41-49ab-8994-ecee2880d62c",
        "PaymentRequestActivityId": "78e71139-2227-48ee-9bf9-1e4389a399db",
        "TerminalId": "38e895c3-1a9a-4b73-8816-8557d1d031d6",
        "MerchantUniqueCode": "432e795d-1a69-4461-97c8-ebaab658ff47",
        "DisplayCode": "İndirimli Hizmet",
        "CallbackAddress": "https://webhook.site/445d7d94-962b-4350-a936-1a066c6367b3",
        "Amount": 1.44,
        "PaymentChannelId": 1,
        "PaymentChannel": "Async",
        "CurrencyId": 1,
        "Currency": "TRY",
        "IP": "::1",
        "PaymentTypeId": 1,
        "PaymentType": "Sale",
        "PaymentStatusId": 2,
        "PaymentStatus": "SentToDevice",
        "CreatedDate": "2024-09-02T13:52:34.504179",
        "ModifiedDate": null
    },
    "Failed": false,
    "Message": null,
    "ClientMessage": null,
    "Succeeded": true
}
```

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