# Commands
URL: /docs/lan/commands

Every LAN transaction_type with its header fields, data and reply.

All examples omit `api_key` and `secret_key` for brevity; send them in every
header. A successful reply is the bare result object. An error reply always has
`error_code` — check for that field first. See [Errors](/docs/lan/errors).

## Overview

| `transaction_type`                                        | Header                         | Data                                                      | Reply                                  |
| --------------------------------------------------------- | ------------------------------ | --------------------------------------------------------- | -------------------------------------- |
| [`POST_EFTPOS`](#post_eftpos)                             | —                              | amount, payment type/method, `transaction_id`, `tax_rate` | Transaction                            |
| [`ORDER_CREATE`](#order_create)                           | —                              | order with products                                       | Order detail                           |
| [`POST_PAYMENT_START`](#post_payment_start)               | `order_code`                   | payment type/method, amount                               | Transaction                            |
| [`ORDER_MULTI_PAYMENT`](#order_multi_payment)             | —                              | order with products and transactions                      | Order detail                           |
| [`ORDER_PAYMENT`](#order_payment)                         | `order_code`                   | —                                                         | Order                                  |
| [`POST_PAYMENT_CANCEL`](#post_payment_cancel)             | `order_code`                   | `transaction_id`, `note?`                                 | Transaction                            |
| [`POST_EFTPOS_CANCEL`](#post_eftpos_cancel)               | `transaction_id`               | `total_amount`                                            | Transaction                            |
| [`POST_TECHNICAL_CANCEL`](#post_technical_cancel)         | `order_code`, `transaction_id` | —                                                         | `{order_code, transaction_id, status}` |
| [`TRANSACTION_RESULT`](#transaction_result)               | `order_code`, `transaction_id` | —                                                         | Transaction                            |
| [`ORDER_RESULT`](#order_result)                           | `order_code`                   | —                                                         | Order                                  |
| [`AVAILABLE_PAYMENT_METHODS`](#available_payment_methods) | —                              | —                                                         | `{payment_types}`                      |
| [`EOD`](#eod)                                             | —                              | `is_all`, `types`                                         | `{results}`                            |
| [`PARAMETERS`](#parameters)                               | —                              | `is_all`, `types`                                         | `{results}`                            |

There are no print or device-information commands.

## POST_EFTPOS

Charges an amount without products. The device creates the order itself; its
`order_code` equals the `transaction_id` you send.

```json title="Request"
{
  "header": { "transaction_type": "POST_EFTPOS" },
  "data": {
    "total_amount": 410,
    "payment_type": "POS",
    "payment_method": "CC",
    "transaction_id": "27517a85-cfc3-4eee-b83b-63dc6bcb9fd6",
    "tax_rate": 10,
    "installment": 0
  }
}
```

`tax_rate` is an integer. The reply is a [Transaction](/docs/lan/reference#transaction).

## ORDER_CREATE

Creates an order with products on the device without collecting it. If the
`order_code` already exists, the order is updated.

```json title="Request"
{
  "header": { "transaction_type": "ORDER_CREATE" },
  "data": {
    "order_code": "SIP-1042",
    "order_date": "2026-11-09 12:30",
    "currency": "TRY",
    "delivery_type": "CASH_ORDER",
    "discount_amount": 0,
    "products": [
      {
        "id": 101,
        "sku": "BRG-CLS",
        "title": "Hamburger",
        "unit": "ADET",
        "price": 185,
        "quantity": 2,
        "tax_rate": 10,
        "vat_include": true,
        "product_type": "PHYSICALLY",
        "discount_value": 0
      }
    ]
  }
}
```

`order_date` uses `yyyy-MM-dd HH:mm`. Product `id` and `tax_rate` are integers.
See [Order fields](/docs/lan/reference#order-create) for optional fields
(`customer`, `note`, `serial_no`, `order_number`, …).

## POST_PAYMENT_START

Starts a payment for an existing order — created with `ORDER_CREATE` or through
the Public API. The device generates the transaction id.

```json title="Request"
{
  "header": { "transaction_type": "POST_PAYMENT_START", "order_code": "SIP-1042" },
  "data": { "payment_type": "POS", "payment_method": "CC", "total_amount": 410 }
}
```

```json title="Reply"
{
  "payment_type": "POS",
  "payment_method": "CC",
  "is_partial": false,
  "partial_type": null,
  "id": "f0ece50e-9c49-432a-8d9a-9347be210c8c",
  "order_code": "SIP-1042",
  "total_amount": 410,
  "total_paid": 410,
  "amount_due": 0,
  "status": "SUCCESS",
  "action_status": true,
  "payment": { "rrn": "531309004217", "card_number_masked": "535576******4721", "slip": [] }
}
```

Optional data fields: `installment`, `is_partial`, `partial_type` (`AMOUNT` or
`PRODUCT`), `products` (`[{ "id", "qty" }]` for product-based partial
payments) and `billing_information`.

<Callout type="warn">
  Store the transaction `id`. You need it for `POST_PAYMENT_CANCEL`,
  `POST_TECHNICAL_CANCEL` and `TRANSACTION_RESULT`.
</Callout>

## ORDER_MULTI_PAYMENT

Creates the order and settles it with one or more transactions in a single
call. `data` is the same as [`ORDER_CREATE`](#order_create) plus
`transactions`:

```json
"transactions": [
  { "payment_type": "CASH", "total_amount": 100, "payment_method": "CASH" },
  { "payment_type": "POS", "total_amount": 310, "payment_method": "CC" }
]
```

Optional: `change_payment_status`, `can_try_again`, `installment`.

## ORDER_PAYMENT

Opens the payment selection on the device for an existing order; the cashier
chooses the method. The reply is an [Order](/docs/lan/reference#order).

```json
{ "header": { "transaction_type": "ORDER_PAYMENT", "order_code": "SIP-1042" } }
```

## POST_PAYMENT_CANCEL

Cancels a completed payment.

```json
{
  "header": { "transaction_type": "POST_PAYMENT_CANCEL", "order_code": "SIP-1042" },
  "data": { "transaction_id": "f0ece50e-9c49-432a-8d9a-9347be210c8c", "note": "Customer returned the item" }
}
```

## POST_EFTPOS_CANCEL

Cancels a `POST_EFTPOS` payment.

```json
{
  "header": { "transaction_type": "POST_EFTPOS_CANCEL", "transaction_id": "27517a85-cfc3-4eee-b83b-63dc6bcb9fd6" },
  "data": { "total_amount": 410 }
}
```

## POST_TECHNICAL_CANCEL

Reverses a card transaction whose outcome your system could not record — for
example when the result arrived but your software crashed before saving it.

```json
{ "header": { "transaction_type": "POST_TECHNICAL_CANCEL", "order_code": "SIP-1042", "transaction_id": "f0ece50e-…" } }
```

The reply is `{ "order_code", "transaction_id", "status": "SUCCESS" }`; a failure
comes back as an error.

## TRANSACTION_RESULT

Returns one transaction of an order. The `source` field is filled in. Unknown
`transaction_id` → `PP_A2A_016`.

```json
{ "header": { "transaction_type": "TRANSACTION_RESULT", "order_code": "SIP-1042", "transaction_id": "f0ece50e-…" } }
```

## ORDER_RESULT

Returns the order totals and every transaction on it. Use it after a dropped
connection when you do not have the transaction id.

```json title="Request"
{ "header": { "transaction_type": "ORDER_RESULT", "order_code": "SIP-1042" } }
```

```json title="Reply"
{
  "grand_total": 410,
  "status": "SUCCESS",
  "order_code": "SIP-1042",
  "total_amount": 410,
  "total_paid": 410,
  "amount_due": 0,
  "results": [{ "completed": true, "error_message": null, "data": { "id": "f0ece50e-…", "status": "SUCCESS" } }]
}
```

`completed` is `true` only for `SUCCESS` transactions. The order is paid when
`amount_due` is `0`.

## AVAILABLE_PAYMENT_METHODS

Lists the payment types and methods enabled on the device.

```json title="Reply"
{ "payment_types": [{ "code": "POS", "methods": ["CC", "NFC", "QR"], "title": "Kredi kartı" }] }
```

## EOD

Runs end-of-day. `is_all: true` closes every type; otherwise list them in
`types` ([EodType](/docs/lan/reference#enums)). An empty list with
`is_all: false` → `PP_A2A_004`.

```json
{ "header": { "transaction_type": "EOD" }, "data": { "is_all": false, "types": ["POS", "CASH"] } }
```

Reply: `{ "results": [{ "eod_type", "success", "error_message" }] }`.

## PARAMETERS

Downloads parameters for `bank`, `multinet`, `metropol`, `paye`, `iwallet` or
`sodexo`. Same rules as `EOD`; an empty list → `PP_A2A_005`.

Reply: `{ "results": [{ "completed", "type", "error_message" }] }`.