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

# Transaction List

> This API is used to get game session details based on player sessionId.

Status

* **0** = Inactive
* **1** = Active

The status indicates whether the session is currently active or not.

## Headers

<ParamField header="x-api-key" type="string" required>
  A unique identifier associated with operator calling API.
</ParamField>

<ParamField header="x-signature" type="string" required>
  A SHA256 HMAC signature generated using the request body and timestamp.
  Format: HMAC\_SHA256(JSON.stringify(data) + '|' + timestamp), signed using the
  provided secret key.
</ParamField>

<ParamField header="x-timestamp" type="string" required>
  An Unix timestamp (milliseconds) when the request was sent. Ensure the same
  value is used in signature generation.
</ParamField>

<ParamField header="content-type" type="string" required>
  Must be set to `application/json`
</ParamField>

## Query Parameters

<ParamField query="page" type="integer">
  Specifies the current page number for pagination purposes.
</ParamField>

<ParamField query="limit" type="integer">
  Specifies how many records to display on each page, controlling the size of
  each data segment.
</ParamField>

<ParamField query="sessionId" type="string" required>
  A unique identifier for the game session you want to retrieve.
</ParamField>

## Response

<ResponseField name="status" type="string" required>
  Code indicates status of the request weather it is succeed or failed. We have listed error codes <a href="/introduction#error-codes">here</a>
</ResponseField>

<ResponseField name="data" type="Data Object">
  <Expandable title="properties">
    <ResponseField name="totalPages" type="integer" required>
      The total number of pages available.
    </ResponseField>

    <ResponseField name="currentPage" type="integer" required>
      The current page number of the results.
    </ResponseField>

    <ResponseField name="totalCount" type="integer" required>
      The total number of records available.
    </ResponseField>

    <ResponseField name="result" type="array" required>
      An array of session objects containing details about each game session.

      <Expandable>
        <ResponseField name="transactionId" type="string" required>
          Unique identifier for the transaction.
        </ResponseField>

        <ResponseField name="sessionId" type="string" required>
          Unique identifier for the game session.
        </ResponseField>

        <ResponseField name="playerId" type="string" required>
          Unique identifier for the player.
        </ResponseField>

        <ResponseField name="playerName" type="string" required>
          Name of the player.
        </ResponseField>

        <ResponseField name="betAmount" type="number" required>
          Bet amount placed by the player.

          <Note>
            To maintain precision and avoid floating-point errors, the bet field is processed as an integer value by multiplying the actual amount by `100000`.

            For example, a bet of `12.34567` will be represented as `1234567` in the API.
          </Note>
        </ResponseField>

        <ResponseField name="payout" type="number" required>
          Amount won by the player.

          <Note>
            To maintain precision and avoid floating-point errors, the payout field is processed as an integer value by multiplying the actual amount by `100000`.

            For example, a payout of `12.34567` will be represented as `1234567` in the API.
          </Note>
        </ResponseField>

        <ResponseField name="isWin" type="boolean" required>
          Indicates if the player won the bet.
        </ResponseField>

        <ResponseField name="sessionStatus" type="number" required>
          Status of the game session.
        </ResponseField>

        <ResponseField name="gameId" type="string" required>
          Unique identifier for the game.
        </ResponseField>

        <ResponseField name="gameName" type="string" required>
          Name of the game.
        </ResponseField>

        <ResponseField name="createdAt" type="string" required>
          UTC timestamp when the transaction was created.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json SUCCESS theme={null}
  {
      "status": "RS_OK",
      "data": {
          "totalPages": 3,
          "currentPage": 1,
          "totalCount": 14,
          "result": [
              {
                  "transactionId": "7f4ef777-7ad7-486a-8186-249e99ba715a",
                  "sessionId": "d404f1da-26a6-44ff-8b0f-559915152be11742537289208",
                  "playerId": "18865671",
                  "playerName": "XYZ player",
                  "betAmount": 5000000,
                  "payout": 6000000,
                  "isWin": true,
                  "sessionStatus": 1,
                  "gameId": "G1742465405970",
                  "gameName": "Cricket Crash",
                  "createdAt": "2025-03-21T11:02:46.615Z"
              }
          ]
      }
  }
  ```

  ```json FAILURE theme={null}
  {
    "status": "RS_ERROR",
    "message": "Oops! Something went wrong. Please refresh the page or try again in a moment"
  }
  ```
</ResponseExample>
