# Real-time product information update

This flow is useful for POS who would to send an API call on each cart update event, this will allow the customer to see the order information in realtime on the EMV Pinpad device and on SensePass tag.

#### Step 1 - Send product information on every cart change <a href="#step-1-creating-a-transaction-in-setup-state" id="step-1-creating-a-transaction-in-setup-state"></a>

POST

<http://localhost:8003/api/transactions/products/update>

```json
{
    "products": [
        {
            "amount": 123,
            "discount": 0,
            "name": "First",
            "quantity": 4,
            "posIdentifier": "100001",
            "vat": 0
        },
        {
            "amount": 111,
            "discount": 0,
            "name": "Second",
            "quantity": 2,
            "posIdentifier": "invalid",
            "vat": 2
        }
    ],
    "timeout": "1000",
    "currency": "USD",
    "isCent": true,
    "amount": 1900,
    "readyForPayment": false,
} 
```

#### Step 2 - Call Init as usual once the POS is ready to accept payment (Sync/Async) <a href="#step-2-updating-transaction-data" id="step-2-updating-transaction-data"></a>

POST

<http://localhost:8003/api/transactions/init/sync> OR [http://localhost:8003/api/transactions/init](http://localhost:8003/api/transactions/init/sync)

```json
{
    "products": [
        {
            "amount": 123,
            "discount": 0,
            "name": "First",
            "quantity": 4,
            "posIdentifier": "100001",
            "vat": 0
        },
        {
            "amount": 111,
            "discount": 0,
            "name": "Second",
            "quantity": 2,
            "posIdentifier": "invalid",
            "vat": 2
        }
    ],
    "timeout": "1000",
    "currency": "USD",
    "isCent": true,
    "amount": 1900,
    "clientPhoneNumber": "789454223",
    "clientEmail": "customerEmail@gmail.com"
} 
```

<br>


---

# 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://docs.sensepass.com/sensepay/transaction-api/terminal-agent/usage/real-time-product-information-update.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.
