> ## Documentation Index
> Fetch the complete documentation index at: https://storekit.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Pay at Table

> How storekit reads a table's open Comtrex check, lets the guest pay it from their phone, and posts the payment back to the till.

With Comtrex, pay at table works directly against the till's open checks. When a guest scans the QR code on their table, storekit asks the Comtrex server for the check that's open on that table, shows it to the guest, takes the payment, and then posts the payment onto the check so it closes on the till.

## Prerequisites

* [Comtrex connected](/docs/guides/integrations/pos/comtrex/connect) with **Payment Type ID** (and **Tip ID** if you accept tips) mapped
* Every table has its Comtrex table number in **POS ID** — see [Dine-in: Tables](/docs/guides/integrations/pos/comtrex/dine-in)
* Pay at table enabled for the store — see [Pay at Table Overview](/docs/guides/pay-at-table/overview)

## How a Bill Is Fetched

```mermaid theme={null}
sequenceDiagram
    participant G as Guest
    participant S as storekit
    participant C as Comtrex server
    G->>S: Scan table QR
    S->>C: ListOrders (checks for this table)
    C-->>S: Open check + GuestCheckNumber
    S->>C: Order details (items, payments)
    C-->>S: Items, totals, payments so far
    S-->>G: Bill to pay
```

1. storekit calls the Comtrex server's `ListOrders` for the table's POS ID and picks the open check on that table.
2. It then loads the check's detail — items, quantities, prices, discounts, service charge and any payments already taken on the till.
3. The bill is stored in storekit against the check's `GuestCheckNumber`, and shown to the guest.
4. Each time the guest refreshes, storekit re-reads the check so items added by staff since the last look appear.

If there's no open check on that table, the guest sees a "no open bills" message and can't pay — they need to ask staff to open a check (or place an order first if the store also has order at table).

<Note>
  Only checks that the till reports as open are picked up. Once a check is closed on the till — paid in full, voided or transferred — it disappears from storekit's list on the next refresh and its bill is marked closed.
</Note>

## Taking the Payment

The guest pays the full amount or a part of it — by items, split evenly between people, or a chosen amount; these are the standard storekit split options and don't depend on the till — optionally adding a tip. Several guests can pay the same check from their own phones.

When a payment succeeds storekit sends `UpdateExistingOrder` to the check with:

* A payment of the paid amount (plus tip) using your **Payment Type ID** media
* If there's a tip, a tip line for the tip amount using your **Tip ID** media

The till then shows the payment against the check. storekit also reads back every payment on the check, so payments staff take on the till in the meantime reduce what the guest is asked to pay. When the sum of payments reaches the check total, the till closes the check; storekit spots that on its next status check and marks the bill closed.

<Warning>
  **Tip ID** is required to send tips. If it isn't mapped, the tip is still charged to the guest and shown in storekit, but only the bill amount reaches the till — the tip won't appear on the check.
</Warning>

### If the Payment Can't Be Posted

Posting the payment to the till is retried automatically — up to 20 attempts, 5 seconds apart — to ride out short network blips. If the till still hasn't accepted it after the last attempt, storekit **voids the guest's card payment** (refunding them), marks the payment **Failed**, and emails the store about the failed sync. The check stays open on the till with no payment recorded, so staff can take payment again.

For payments that reached the guest's card but not the till in other ways, storekit support can resend the payment to the check — contact support with the bill reference.

## Adding Orders to an Open Check

If a store has both order at table and pay at table, a guest who has opened their table's bill in storekit and then orders more has the new items added to that Comtrex check with `UpdateExistingOrder`, instead of a second check being opened. The guest sees a single bill containing everything ordered on the table, from storekit or by staff, and settles it once.

Orders placed without an open bill in storekit always open a new check. There is no dashboard setting for Comtrex that routes every in-store order onto the table's existing check — if you need that behaviour, contact support.

<Note>
  If the till rejects the added items, the order is marked failed like any other Comtrex order. **Resend order to POS** on the order page sends the items to the same check again.
</Note>

## Checking Payments in the Dashboard

Go to **Tables** in the left-hand menu and choose the store. **Open bills** lists tables with a live bill; **closed bills** lists bills that have been paid or closed on the till. Click **View payments** on a bill to see each payment, its tip and status. Payments that never reached the till show as failed. For more see [Check Pay at Table payment status](/docs/guides/pay-at-table/checking-payments).

## What Comtrex Pay at Table Doesn't Do

* **Payments taken on the till don't refund through storekit.** storekit only refunds payments it took itself.
* **No card terminals.** Payments are card payments on the guest's phone; storekit doesn't drive Comtrex's own payment terminals.
* **Item splits aren't mirrored on the till.** When a guest pays for specific items, the till receives a payment for that amount against the check — it doesn't mark those items as paid.

## Next Steps

<CardGroup cols={2}>
  <Card title="Troubleshooting" icon="wrench" href="/docs/guides/integrations/pos/comtrex/troubleshooting">
    Bills not appearing, payments not reaching the till
  </Card>

  <Card title="Pay at Table Overview" icon="credit-card" href="/docs/guides/pay-at-table/overview">
    Setting up pay at table in storekit
  </Card>
</CardGroup>


## Related topics

- [Stream Dine-in: Tables](/docs/guides/integrations/pos/stream/dine-in.md)
- [TISSL](/docs/guides/integrations/pos/tissl.md)
- [Pay at Table Overview](/docs/guides/pay-at-table/overview.md)
- [Toast Pay at Table](/docs/guides/integrations/pos/toast/pay-at-table.md)
- [Lightspeed Pay at Table](/docs/guides/integrations/pos/lightspeed/pay-at-table.md)
