---
title: "POST /EXPERIMENTAL_receipt_to_tx"
method: POST
path: "/EXPERIMENTAL_receipt_to_tx"
---

# POST /EXPERIMENTAL_receipt_to_tx

`POST /EXPERIMENTAL_receipt_to_tx`

Resolves a receipt ID back to the originating transaction hash and sender account

## Request body

- JsonRpcRequestForEXPERIMENTALReceiptToTx
  - `id` string — JSON-RPC request id. Auto-populated; can be any string.
  - `jsonrpc` '2.0' — JSON-RPC protocol version. Always `2.0`.
  - `method` 'EXPERIMENTAL_receipt_to_tx', required
  - `params` RpcReceiptToTxRequest, required
    - `block_height` integer, nullable — Block height near where receipt was created. Enables hint fallback scan on column miss. Anchor refreshes to each scan-resolved parent's exact execution height; later ancestors bounded via causality (emit before execute), so subsequent column-miss scans go `Ancestor`. Bump `receipt_to_tx_max_hop_distance` if cold archival gaps exceed default 20. Cold-storage cost: per-row latency orders of magnitude over hot. To bound request cost: - Supply `block_height` within parent's `±window` (default 5). - Supply `shard_id`. Omit → all-shards enumeration until walker crosses `FromReceipt` hop, multiplying cold-read cost. - Don't widen `window` beyond indexer's accuracy; budget shared across full ancestry walk. Receipt-id-only queries against periods with `save_receipt_to_tx` disabled stay unsupported: column never written, no self-locating.
    - `receipt_id` string, required
    - `shard_id` union — Shard hint. Narrows scan to this shard at hint height. Omit to enumerate all tracked shards (higher cost). After walker crosses a receipt-origin hop, shard derived from parent's predecessor account and hint no longer applies. Best-effort across resharding: layout shifts can miss producer, walk returns `UnknownReceipt`.
      - integer — The shard identifier. It may be an arbitrary number - it does not need to be a number in the range 0..NUM_SHARDS. The shard ids do not need to be sequential or contiguous. The shard id is wrapped in a new type to prevent the old pattern of using indices in range 0..NUM_SHARDS and casting to ShardId. Once the transition if fully complete it potentially may be simplified to a regular type alias.
      - unknown
    - `window` integer, nullable — Pre-first-scan width: `±window` heights around hint. Caps at `receipt_to_tx_max_hint_window` (default 20). Ignored after first scan-resolved hop — walker switches to `Ancestor` mode at `receipt_to_tx_max_hop_distance` width.

## Response `200`

- union
  - object
    - `result` RpcReceiptToTxResponse, required
      - `sender_account_id` string, required — NEAR Account Identifier. This is a unique, syntactically valid, human-readable account identifier on the NEAR network. [See the crate-level docs for information about validation.](index.html#account-id-rules) Also see [Error kind precedence](AccountId#error-kind-precedence). ## Examples ``` use near_account_id::AccountId; let alice: AccountId = "alice.near".parse().unwrap(); assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f) ```
      - `transaction_hash` string, required
    - `id` string, required
    - `jsonrpc` string, required
  - object
    - `error` union, required
      - object
        - `cause` union, required
          - object
            - `info` object, required
              - …
            - `name` 'METHOD_NOT_FOUND', required
          - object
            - `info` object, required
              - …
            - `name` 'PARSE_ERROR', required
        - `name` 'REQUEST_VALIDATION_ERROR', required
      - object
        - `cause` union, required
          - object
            - `info` object, required
              - …
            - `name` 'UNKNOWN_RECEIPT', required
          - object
            - `info` object, required
              - …
            - `name` 'DEPTH_EXCEEDED', required
          - object
            - `info` object, required
              - …
            - `name` 'UNSUPPORTED', required
          - object
            - `info` object, required
              - …
            - `name` 'INTERNAL_ERROR', required
          - object
            - `name` 'OUTCOMES_NOT_STORED', required
          - object
            - `info` object, required
              - …
            - `name` 'WINDOW_TOO_LARGE', required
          - object
            - `info` object, required
              - …
            - `name` 'MALFORMED_HINT', required
          - object
            - `info` object, required
              - …
            - `name` 'BUDGET_EXCEEDED', required
        - `name` 'HANDLER_ERROR', required
      - object
        - `cause` InternalError, required
          - `info` object, required
            - `error_message` string, required
          - `name` 'INTERNAL_ERROR', required
        - `name` 'INTERNAL_ERROR', required
    - `id` string, required
    - `jsonrpc` string, required

---

[API](https://skmtc.net/near/apis/near-protocol-json-rpc-api.md) · [All operations](https://skmtc.net/near/apis/near-protocol-json-rpc-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/near/near-protocol-json-rpc-api/revisions/cb6bdde6167d/schema)
