> For the complete documentation index, see [llms.txt](https://paymaster-ua.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://paymaster-ua.gitbook.io/api/sources/en/sources/3_interface_of_payment_status_request.md).

# 3. Interface of payment status request

This XML-interface enables Merchant anytime check the status of payment prior initiated via PayMaster Merchant Interface.

Action - <https://api.paymaster.ua/merchants/get-transaction>

Method - POST

XML-request format:

```markup
<?xml version="1.0" encoding="UTF-8"?>
<Command>
    <LMI_MERCHANT_ID></LMI_MERCHANT_ID>
    <LMI_PAYMENT_NO></LMI_PAYMENT_NO>
    <LMI_SYS_PAYMENT_ID></LMI_SYS_PAYMENT_ID>
    <LMI_HASH></LMI_HASH>
</Command>
```

| **Name**          | **XML-format**        | **Description**                                                                                                                                                                                                                                                                               |
| ----------------- | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Merchant ID       | LMI\_MERCHANT\_ID     | Merchant’s POS ID to which a payment from Client may be accepted.                                                                                                                                                                                                                             |
| Order number      | LMI\_PAYMENT\_NO      | Order number in Merchant’s system – (LMI\_PAYMENT\_NO), or order number in PayMaster system - (LMI\_SYS\_PAYMENT\_ID) must be indicated.                                                                                                                                                      |
|                   | LMI\_SYS\_PAYMENT\_ID |                                                                                                                                                                                                                                                                                               |
| Control signature | LMI\_HASH             | Control signature of request which is created by encoding outgoing text of XML-request with blank field LMI\_HASH and blank secret key SecretKey using algorithm chosen in Merchant’s cabinet. Received signature transferred at tag LMI\_HASH. The recommended encoding algorithm is SHA256. |

XML-response format:

```markup
<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Retval></Retval>
    <Retdesc></Retdesc>
    <Retdata>
        <Transaction>
            <LMI_MERCHANT_ID></LMI_MERCHANT_ID>
            <LMI_PAYMENT_AMOUNT></LMI_PAYMENT_AMOUNT>
            <LMI_PAYMENT_NO></LMI_PAYMENT_NO>
            <LMI_PAYMENT_SYSTEM></LMI_PAYMENT_SYSTEM>
            <LMI_MODE></LMI_MODE>
            <LMI_PAYMENT_DESC></LMI_PAYMENT_DESC>
            <LMI_SYS_PAYMENT_ID></LMI_SYS_PAYMENT_ID>
            <LMI_SYS_PAYMENT_DATE></LMI_SYS_PAYMENT_DATE>
            <LMI_PAID_AMOUNT></LMI_PAID_AMOUNT>
            <LMI_PAYER_IDENTIFIER></LMI_PAYER_IDENTIFIER>
            <LMI_PAYER_PHONE_NUMBER></LMI_PAYER_PHONE_NUMBER>
            <LMI_PAYER_EMAIL></LMI_PAYER_EMAIL>
            <LMI_HOLD_REFUND_AMOUNT></LMI_HOLD_REFUND_AMOUNT>
            <LMI_HASH></LMI_HASH>
            <State></State>
            <Refunds>
                <Refund>
                    <RefundId></RefundId>
                    <RefundAmount></RefundAmount>
                    <Created></Created>
                    <State></State>
                    <Type></Type>
                </Refund>
            </Refunds>
        </Transaction>
    </Retdata>
</Response>
```

| **Name**                                                  | **XML-format**            | **Description**                                                                                                                         |
| --------------------------------------------------------- | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| Operation code of request                                 | Retval                    | 1 (one) – successful transaction                                                                                                        |
| Description of operation code                             | Retdesc                   |                                                                                                                                         |
|                                                           | Retdata / Transaction     | Data about payment stated in request.                                                                                                   |
| Merchant ID                                               | LMI\_MERCHANT\_ID         |                                                                                                                                         |
| Payment amount                                            | LMI\_PAYMENT\_AMOUNT      |                                                                                                                                         |
| Internal number of order in accounting system of Merchant | LMI\_PAYMENT\_NO          |                                                                                                                                         |
| Payment system ID                                         | LMI\_PAYMENT\_SYSTEM      |                                                                                                                                         |
| Test mode indicator                                       | LMI\_MODE                 | Indicates mode of received payment: 0 - working mode; 1 – test mode.                                                                    |
| Payment description                                       | LMI\_PAYMENT\_DESC        |                                                                                                                                         |
| Internal number of payment in PayMaster system            | LMI\_SYS\_PAYMENT\_ID     |                                                                                                                                         |
| Date and time of receiving a payment                      | LMI\_SYS\_PAYMENT\_DATE   |                                                                                                                                         |
| Total amount                                              | LMI\_PAID\_AMOUNT         | Total paid amount including extra fees of Financial institution.                                                                        |
| Client details                                            | LMI\_PAYER\_IDENTIFIER    | Client’s payment data (e.g. banking card concealed number). Format depends on payment system which processed payment                    |
| Client’s phone number                                     | LMI\_PAYER\_PHONE\_NUMBER | Client’s phone number in format 380xxxxxxxxx.                                                                                           |
| Client’s email                                            | LMI\_PAYER\_EMAIL         | Client’s email.                                                                                                                         |
| Refund Hold                                               | LMI\_HOLD\_REFUND\_AMOUNT | Refund which was return to client after confirmarion a transaction at Hold status (in case of confirmation a sum less than initial sum) |
| Control signature                                         | LMI\_HASH                 | Control signature created similar to ‘Form of payment notification’ (see art. 2.3)                                                      |
| Payment status                                            | State                     | 0 – payment is expected                                                                                                                 |
|                                                           | Refunds                   | The list of refunds processed in this transaction                                                                                       |
| Refund request number                                     | RefundId                  |                                                                                                                                         |
| Refund amount                                             | RefundAmount              |                                                                                                                                         |
| Date of request                                           | Created                   |                                                                                                                                         |
| Status of request                                         | State                     | 0 – new request                                                                                                                         |
| Type of request                                           | Type                      | 1 – fast refund – processed with refund interface (see art.5)                                                                           |
