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

# sendBocReturnHash | TON v2

> The sendBocReturnHash method sends a serialized bag-of-cells (BoC) to the TON blockchain and returns the message hash. TON v2 via Chainstack.

The `sendBocReturnHash` method sends a serialized bag-of-cells (BoC) to the TON blockchain and returns the message hash. This method is similar to [sendBoc](/reference/ton-sendboc-v2) but additionally returns the hash of the sent message for tracking purposes.

<Info>
  There's no difference between a full node an archive node in data availability or pricing. All data is always available and all node requests are consumed as 1 request unit.
</Info>

## Request body

* `boc` (string, required) — The serialized bag-of-cells in base64 format. This contains the signed external message to be sent to the blockchain.

## JSON-RPC

<CodeGroup>
  ```shell shell theme={"system"}
  curl -X POST \
    'https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/jsonRPC' \
    -H 'Content-Type: application/json' \
    -d '{
      "jsonrpc": "2.0",
      "id": 1,
      "method": "sendBocReturnHash",
      "params": {
        "boc": "te6ccgEBAgEAqwAB4YgBVbC7Hu+g3htYXzst8L5ucV76NMzeBK3URJKebN2Y1kwADRfFu/r0HxgrOp/Iml8Li5x4gR10J5XYFS8z0fMWJ6JPeUF5xNSLrSDGFIqhJqkW1SEYQF8Dw5p4dI3oaFs4LCmpoxdkfKw0AAAAGAAcAQBoQgAwwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL68="
      }
    }'
  ```
</CodeGroup>

## Response

* `ok` (boolean) — Whether the operation was successful.

* `result` (object) — The result of the operation. Contains:

  * `@type` (string) — The type of the result, typically `raw.extMessageInfo`.
  * `hash` (string) — The hash of the sent message. This can be used to track the transaction status.
  * `@extra` (string) — Extra information about the operation.

## Use case

The `sendBocReturnHash` method is preferred over `sendBoc` when you need to track transaction status:

1. Wallet applications can display the transaction hash to users for tracking.
2. Backend services can store the hash for transaction monitoring and confirmation.
3. Trading bots can track order execution status using the returned hash.
4. Payment systems can correlate transaction hashes with internal records.
5. DApps can provide users with explorer links using the transaction hash.

Here's an example of sending a transaction and receiving the hash:

<CodeGroup>
  ```shell shell theme={"system"}
  curl -X 'POST' \
    'https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/sendBocReturnHash' \
    -H 'accept: application/json' \
    -H 'Content-Type: application/json' \
    -d '{
    "boc": "te6ccgEBAgEAqwAB4YgBVbC7Hu+g3htYXzst8L5ucV76NMzeBK3URJKebN2Y1kwADRfFu/r0HxgrOp/Iml8Li5x4gR10J5XYFS8z0fMWJ6JPeUF5xNSLrSDGFIqhJqkW1SEYQF8Dw5p4dI3oaFs4LCmpoxdkfKw0AAAAGAAcAQBoQgAwwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL68="
  }'
  ```
</CodeGroup>

<Tip>
  Use the returned hash with [getTransactions](/reference/ton-gettransactions-v2) or a block explorer to confirm your transaction was processed successfully.
</Tip>


## OpenAPI

````yaml openapi/ton_node_api/v2/sendBocReturnHash.json POST /sendBocReturnHash
openapi: 3.0.0
info:
  title: sendBocReturnHash example
  version: 1.0.0
  description: >-
    This is an API example for sendBocReturnHash, a method to send a serialized
    bag-of-cells to the TON blockchain and receive the message hash.
servers:
  - url: >-
      https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2
security: []
paths:
  /sendBocReturnHash:
    post:
      tags:
        - TON Operations
      summary: sendBocReturnHash
      operationId: sendBocReturnHash
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                boc:
                  type: string
                  description: The serialized bag-of-cells in base64 format
                  default: >-
                    te6ccgEBAgEAqwAB4YgBVbC7Hu+g3htYXzst8L5ucV76NMzeBK3URJKebN2Y1kwADRfFu/r0HxgrOp/Iml8Li5x4gR10J5XYFS8z0fMWJ6JPeUF5xNSLrSDGFIqhJqkW1SEYQF8Dw5p4dI3oaFs4LCmpoxdkfKw0AAAAGAAcAQBoQgAwwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL68=
              required:
                - boc
      responses:
        '200':
          description: The result of sending the BoC with the message hash
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    description: Whether the operation was successful
                  result:
                    type: object
                    properties:
                      '@type':
                        type: string
                        description: The type of the result
                      hash:
                        type: string
                        description: The hash of the sent message
                      '@extra':
                        type: string
                        description: Extra information

````