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

# Usage receipt

> The document the service signs for the laps reported so far.

Schema: `urn:hex65:schema:usage-receipt:v1`. Every field below comes from the schema; the schema decides.

The document the metering service signs for a grant's reports so far (WP-140, WP-142), payload type application/vnd.hex65.usage-receipt+json, purpose grant. `laps_root` is the RFC 6962 root over the lap ids the service counted for the grant, sorted, each id's UTF-8 bytes a leaf; `n_counted` their number. `run_close` (WP-142 D5) is present only on the receipt of a final report that asked `close_run`: the numbers of every segment of the run the service granted, and across all of them the count and root of every lap id it counted. The service refuses any later segment of a closed run, so a verifier offline can tell that no segment and no counted lap is missing.

## Fields

| Field | Type | Required | Meaning |
| - | - | - | - |
| `grant_id` | string | yes | |
| `client_run_id` | string | yes | |
| `meter` | one of `"allowance"`, `"fidelity"` | yes | |
| `period` | object | yes | |
| `period.start` | string | yes | |
| `period.end` | string | yes | |
| `laps_root` | string | yes | |
| `n_counted` | integer | yes | |
| `n_void` | integer | yes | |
| `final` | boolean | yes | |
| `run_close` | object | no | |
| `run_close.segments` | list of integer | yes | |
| `run_close.n_counted` | integer | yes | |
| `run_close.laps_root` | string | yes | |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.