> For the complete documentation index, see [llms.txt](https://devs.truebit.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devs.truebit.io/architecture/execution-transcripts/invoice-transcript.md).

# Invoice Transcript

### **Overview**

This transcript serves as the official record of the computation’s cost and resource usage across the platform. Whether you are running Truebit Functions or API Tasks, it provides a verifiable breakdown of the fees and execution steps, ensuring that billing is as transparent as the computation itself.

### **Description**

<details>

<summary>Function Invoice Transcript</summary>

{% code fullWidth="true" expandable="true" %}

```json
{
    "executionId": "e7e444fa-96c5-45c9-9c65-dd9f8edfdafd",
    "taskId": "api_142456019dd5b351e82b6f679bf7b36af9e9a0fd523f30844a2c479d908b913e",
    "taskCreated_timeStamp": 1762441264136,
    "invoiceId": "4750340717624412641106",
    "byteGasPrice": 0.0002,
    "accounting_signature": {
        "v": 27,
        "r": "2cb73383f446dbaa2de9bfeec669bf159a72b7662ec15df9b391dcdf1267436b",
        "s": "3e245d19087c9c5c448fdf9a26d0a219c98eae8d9fb0fa360a63a94c252443e0"
    },
    "lineItem": [
        {
            "operation": "charge",
            "account": "0x************************************C8F7",
            "totalTransferredBytes": {
                "request": 0,
                "response": 0
            }
        }
    ]
}

```

{% endcode %}

</details>

<details>

<summary>API Invoice Transcript</summary>

{% code expandable="true" %}

```json
{
    "executionId": "e7e444fa-96c5-45c9-9c65-dd9f8edfdafd",
    "taskId": "api_142456019dd5b351e82b6f679bf7b36af9e9a0fd523f30844a2c479d908b913e",
    "taskCreated_timeStamp": 1762441264136,
    "invoiceId": "4750340717624412641106",
    "byteGasPrice": 0.0002,
    "accounting_signature": {
        "v": 27,
        "r": "2cb73383f446dbaa2de9bfeec669bf159a72b7662ec15df9b391dcdf1267436b",
        "s": "3e245d19087c9c5c448fdf9a26d0a219c98eae8d9fb0fa360a63a94c252443e0"
    },
    "lineItem": [
        {
            "operation": "charge",
            "account": "0x************************************C8F7",
            "totalTransferredBytes": {
                "request": 0,
                "response": 0
            }
        }
    ]
}
```

{% endcode %}

</details>

### Execution Lifecycle Messages

<details>

<summary>root message</summary>

The `root message` serves as the initial entry in the Function Invoice transcript. It includes critical details like the **execution ID**, **taskId**, and a list of **liteItems**, which capture all recorded operations on the invoice, such as "charge," "pay," and "penalty."

<table><thead><tr><th width="208.2890625">Property</th><th width="331.3333333333333">Description</th><th>Values</th></tr></thead><tbody><tr><td>executionId</td><td>Current execution ID</td><td>Text</td></tr><tr><td>taskId</td><td>Executed Function task</td><td>Text</td></tr><tr><td>taskCreated_timeStamp</td><td>Timestamp for task creation message</td><td>unixTimestamp</td></tr><tr><td>invoiceId</td><td>InvoiceId</td><td>Number</td></tr><tr><td>stepGasPrice / byteGasPrice</td><td><ul><li><strong>stepGasPrice</strong>: Amount of GAS paid for each execution step</li><li><strong>byteGasPrice</strong>: Amount of GAS paid for each transferred byte.</li></ul></td><td>Number</td></tr><tr><td>accounting_signature</td><td>Truebit Verify Hub</td><td>v: Text<br>r: Text<br>s: Text</td></tr><tr><td>lineItem</td><td>List of all operations generated during the task execution.</td><td>Array</td></tr></tbody></table>

</details>

***

<details>

<summary>lineItem Function Task</summary>

For each participant in the Task execution, there is a `lineItem` representing an action applied to an "address".

* **Charge**: The Task requester is billed for the execution request.
* **Pay**: The Truebit Verify node is rewarded for executing and submitting the Task result.
* **Penalty**: The Truebit Verify node is penalized for submitting an incorrect response.

<table><thead><tr><th width="195.58984375">Property</th><th width="264.2005208333333">Description</th><th>Values</th></tr></thead><tbody><tr><td>operation</td><td>Operation Type</td><td>["charge","pay","penalty"]</td></tr><tr><td>account</td><td><ul><li>If messageType is "charge", you will see the Task Requester Address</li><li>If messageType is "pay" or "penalty", you will see the Truebit Verify Address*</li></ul></td><td>Text</td></tr><tr><td>total_steps_computed</td><td>Total amount of steps executed by the Truebit Verify Node.</td><td>Text</td></tr><tr><td>peak_memory_used</td><td>Peak memory used by the Truebit Verify Node.</td><td>Text</td></tr></tbody></table>

</details>

<details>

<summary>lineItem API Task</summary>

The `lineitem` details the charge operation for the Task Requester.

<table><thead><tr><th width="195.58984375">Property</th><th width="264.2005208333333">Description</th><th>Values</th></tr></thead><tbody><tr><td>operation</td><td>Operation Type</td><td>charge</td></tr><tr><td>account</td><td>Task Requester Address</td><td>Text</td></tr><tr><td>totalTransferredBytes</td><td>Amount of bytes transferred during the API execution</td><td><ul><li><strong>request</strong></li><li><strong>response</strong></li></ul></td></tr></tbody></table>

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://devs.truebit.io/architecture/execution-transcripts/invoice-transcript.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
