# 2. Query Payment

## Query Payment

<mark style="color:blue;">`GET`</mark> `{{Base Adres}}/api/paywall/apm/query`

{% hint style="info" %}
**Important**: To use the APM Payment Query service, you need to include '**apikeypublic**' and '**apiclientpublic**' parameters in the 'Header' field.

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

**The parameters that need to be sent to the service are as follows:**

<table><thead><tr><th width="221">Parameter (Headers)</th><th width="93">Type</th><th width="139">Compulsory</th><th width="403">Description</th></tr></thead><tbody><tr><td>apikeypublic</td><td>string</td><td>Yes</td><td>The Public Key obtained from the merchant panel.</td></tr><tr><td>apiclientpublic</td><td>string</td><td>Yes</td><td>The Public Client obtained from the merchant panel.</td></tr><tr><td>merchantuniquecode</td><td>string</td><td>Yes</td><td>The unique tracking number assigned to the payment initiation.</td></tr></tbody></table>

**The parameters returned from the service are as follows:**

<table><thead><tr><th width="257.3333333333333">Parameter</th><th width="125">Type</th><th>Description</th></tr></thead><tbody><tr><td>ApmConnectionId</td><td>int</td><td>The APM connection identifier where the payment was processed.</td></tr><tr><td>ApmProviderKey</td><td>string</td><td>The APM provider key where the payment was processed.</td></tr><tr><td>ApmTransactionId</td><td>int</td><td>The identity information of the payment in PayWall.</td></tr><tr><td>CurrencyId</td><td>int</td><td><p>The identity information of the currency for the payment.</p><p><br>Bkz: <a href="../system-data/currency">Currency</a></p></td></tr><tr><td>MerchantUniqueCode</td><td>string</td><td>The unique tracking number for the payment.</td></tr><tr><td>UniqueCode</td><td>string</td><td>The unique number assigned to the payment by Paywall.</td></tr><tr><td>MerchantSuccessBackUrl</td><td>string</td><td>The address to be notified in case of successful payment completion.</td></tr><tr><td>MerchantFailBackUrl</td><td>string</td><td>The address to be notified in case of unsuccessful payment completion.</td></tr><tr><td>Amount</td><td>decimal</td><td>The payment amount.</td></tr><tr><td>Description</td><td>string</td><td>The description of the payment.</td></tr><tr><td>ChannelType</td><td>int</td><td>The payment channel type.<br><br>Bkz: <a href="broken-reference">APM Channel Type</a></td></tr><tr><td>StatusId</td><td>int</td><td><p>The payment status identifier.</p><p><br>Bkz: <a href="broken-reference">APM Status Id</a></p></td></tr><tr><td>Status</td><td>string</td><td>The payment status.</td></tr><tr><td>TypeId</td><td>int</td><td>The payment type identifier.<br><br>Bkz: <a href="broken-reference">APM Type Id</a></td></tr><tr><td>Type</td><td>string</td><td>The payment type.</td></tr><tr><td>Ip</td><td>string</td><td>The IP address from which the payment was initiated.</td></tr><tr><td>DateTime</td><td>DateTime</td><td>The date/time when the payment was initiated.</td></tr></tbody></table>

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

```json
{
    "ErrorCode": 0,
    "Result": true,
    "Message": "",
    "Body": {
        "ApmConnectionId": 1,
        "ApmProviderKey": "Papara",
        "ApmTransactionId": 31,
        "CurrencyId": 1,
        "MerchantUniqueCode": "TESTMERCaHANTUNssIQUECODE",
        "UniqueCode": "eed41239-84a2-4ae6-8927-f9aa4ccee94f",
        "MerchantSuccessBackUrl": "https://webhook.site/38a6fa6f-3414-40db-b2a7-a6c38894b6a3",
        "MerchantFailBackUrl": "https://webhook.site/38a6fa6f-3414-40db-b2a7-a6c38894b6a3",
        "Amount": 1.00,
        "Description": "test",
        "ChannelType": 1,
        "StatusId": 1,
        "Status": "Oluşturuldu",
        "TypeId": 1,
        "Type": "Satış",
        "Ip": "::1",
        "DateTime": "2023-09-04T14:47:03.485303"
    }
}
```

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