# Transaction Inquiry Service

## Transaction Query Service Request Mode&#x6C;**;**

<table><thead><tr><th width="93.33333333333331">Method</th><th width="553">API URL</th><th>Parameter</th></tr></thead><tbody><tr><td>POST</td><td>https://posservice.esnekpos.com/api/services/RecurringPaymentQuery</td><td>JSON File</td></tr></tbody></table>

### The parameters to be sent to the service are as follows;

#### Transaction Query Service Request Message Parameters

<table><thead><tr><th width="221">Parameters</th><th width="104">Type</th><th width="86">Compulsory</th><th>Description</th></tr></thead><tbody><tr><td>MERCHANT</td><td>string</td><td>Yes</td><td>It is a unique credential created specifically for the member business.</td></tr><tr><td>MERCHANT_KEY</td><td>string</td><td>Yes</td><td>It is the key information created specifically for the member business.</td></tr><tr><td>ORDER_REF_NUMBER</td><td>string</td><td>Yes</td><td>It is the reference number information given by the merchant when sending the payment transaction request.</td></tr></tbody></table>

### Here is a sample JSON file to send to the service;

```json
{
      "MERCHANT": "TEST1234" , 
      "MERCHANT_KEY": "4oK26hK8MOXrIV1bzTRVPA==" ,
      "ORDER_REF_NUMBER" : "0.54251300 1595848596|93"
}
                                        
```

### The parameters of the reply message sent from the service after the transaction are as follows;

#### Transaction Inquiry Service Response Message Parameters

<table><thead><tr><th width="218">Parameters</th><th width="106">Type</th><th width="94">Compulsory</th><th>Description</th></tr></thead><tbody><tr><td>RETURN_CODE</td><td>string</td><td>Yes</td><td>The status of the transaction query operation result is the code information.</td></tr><tr><td>RETURN_MESSAGE</td><td>string</td><td>Yes</td><td>The status message is the result of the transaction query process.</td></tr><tr><td>STATUS</td><td>string</td><td>Yes</td><td>The result of the transaction query operation is the status information.</td></tr><tr><td>ID</td><td>string</td><td>Yes</td><td>Recurring payment id information</td></tr><tr><td>DATE</td><td>string</td><td>Yes</td><td>It is the transaction date information for the payment transaction.</td></tr><tr><td>RECURRING_COUNT</td><td>string</td><td>Yes</td><td>Repeat Number</td></tr><tr><td>TRY_COUNT_LIMIT</td><td>int</td><td>Yes</td><td>Number of repeat attempts</td></tr><tr><td>AMOUNT</td><td>string</td><td>Yes</td><td>Recurring payment amount information</td></tr><tr><td>CURRENCY</td><td>string</td><td>Yes</td><td>Recurring payment transaction currency.('TRY','USD','EUR')</td></tr><tr><td>SUCCES_COUNT</td><td>string</td><td>Yes</td><td>Successful repetition number of recurring payment information</td></tr><tr><td>DEALER_REF_NO</td><td>string</td><td>Yes</td><td>It is the reference number information given by the merchant when sending the payment transaction request.</td></tr><tr><td>CUSTOMER_GSM</td><td>string</td><td>Yes</td><td>Customer phone number information</td></tr><tr><td>CUSTOMER_EMAIL</td><td>string</td><td>Yes</td><td>Customer email information</td></tr><tr><td>COSTUMER_NAME</td><td>string</td><td>Yes</td><td>Customer name information</td></tr><tr><td>COSTUMER_ADRESS</td><td>string</td><td>Yes</td><td>Customer address information</td></tr></tbody></table>

<br>

**RECURRING\_PAYMENT\_TRANSACTIONS**

<table><thead><tr><th width="187">Parameters</th><th width="105">Type</th><th width="99">Compulsory</th><th>Description</th></tr></thead><tbody><tr><td>RECURRING_NO</td><td>int</td><td>Yes</td><td>N. repeat</td></tr><tr><td>PAYMENT_DATE</td><td>string</td><td>Yes</td><td>Replay date</td></tr><tr><td>REF_NO</td><td>int</td><td>Yes</td><td>The reference number information of the repeat. The payment process can be used in inquiry and re-cancellation service.</td></tr><tr><td>STATUS</td><td>string</td><td>Yes</td><td>Status information.</td></tr><tr><td>TRIES_COUNT</td><td>string</td><td>Yes</td><td>The number of retry attempts.</td></tr><tr><td>SUCCES_DATE</td><td>string</td><td>Yes</td><td>The date the repeat was successful.</td></tr><tr><td>PAYMENT_ID</td><td>array</td><td>Yes</td><td>If successful again, payment id information.</td></tr><tr><td>IS_ACTIVE</td><td>array</td><td>Yes</td><td>If successful again, payment id information.</td></tr></tbody></table>

<br>

**RECURRING\_PAYMENT\_TRIES**

<table><thead><tr><th width="166">Parameters</th><th width="92">Type</th><th width="93">Compulsory</th><th>Description</th></tr></thead><tbody><tr><td>PAYMENT_ID</td><td>string</td><td>Yes</td><td>Payment id information</td></tr><tr><td>STATUS</td><td>string</td><td>Yes</td><td>Retry status.</td></tr><tr><td>DESCRIPTION</td><td>string</td><td>Yes</td><td>Description of the retry.</td></tr><tr><td>TRY_DATE</td><td>string</td><td>Yes</td><td>The date the retry was made.</td></tr></tbody></table>

### Transaction Inquiry Service Response Message Parameters

```json
{
    "RETURN_CODE": "0",
    "RETURN_MESSAGE": "SUCCESS",
    "STATUS": "SUCCESS",
    "ID": 343666,
    "DATE": "24.06.2022",
    "RECURRING_COUNT": "10",
    "TRY_COUNT_LIMIT": "5",
    "AMOUNT": "1250,00",
    "CURRENCY": "TRY",
    "SUCCESS_COUNT": "3",
    "DEALER_REF_NO": "ORDER_REF_NUMBER",
    "COSTUMER_GSM": "5553332211",
    "COSTUMER_EMAIL": "test@test.com",
    "COSTUMER_NAME": "TEST USER",
    "COSTUMER_ADRESS": "TEST ADRESS",
    "RECURRING_PAYMENT_TRANSACTIONS": [
            { 
            "RECURRING_NO": 1,
            "PAYMENT_DATE": "24.06.2022",
            "REF_NO": "REF_NO_1",
            "STATUS": "Success",
            "TRIES_COUNT": "1",
            "SUCCESS_DATE": "24.06.2022",
            "PAYMENT_ID": "343312",
            "IS_ACTIVE": "true",
            "RECURRING_PAYMENT_TRIES ": [
                    {
                    "PAYMENT_ID": "343312",
                    "STATUS": "Success",
                    "DESCRIPTION": "Success"
                    "TRY_DATE": "24.06.2022"
                    }
                ]
            },
            { 
            "RECURRING_NO": 2,
            "PAYMENT_DATE": "24.07.2022",
            "REF_NO": "REF_NO_2",
            "STATUS": "Waiting",
            "TRIES_COUNT": "0",
            "SUCCESS_DATE": null,
            "PAYMENT_ID": null,
            "IS_ACTIVE": "true",
            "RECURRING_PAYMENT_TRIES ": []
            }
     ]
}                                 
```

In the transaction query service response message, the value of the STATUS parameter is SUCCESS and the value of the RETURN\_CODE parameter is 0, indicating that the transaction query service has been performed successfully.


---

# Agent Instructions: 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://developer-eng.esnekpos.com/esnekpos-developer-environment/recurring-payment-service/transaction-inquiry-service.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.
