> For the complete documentation index, see [llms.txt](https://connect.socios.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://connect.socios.com/interact-with-chiliz-chain/working-with-transactions.md).

# Working with Transactions

{% hint style="warning" %}
Make sure to implement the [prerequisite code](/interact-with-chiliz-chain/prerequisites.md), or else the examples in this page will not work!
{% endhint %}

## Retrieve a user transaction details

You can retrieve details about a specific transaction.\
NOTE: This example only provides *estimated* gas fees details for the transaction.

{% hint style="success" %}
This is a code-based alternative to the `GET /user/wallet/{transactionId}` endpoint, which was deprecated from the Socios.com API in Q1 2025.
{% endhint %}

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

```javascript
async function getTransaction(txHash) {
  const transaction = await client.getTransaction({
    hash: txHash, // Replace with the actual transaction hash
  });
  return transaction;
}

// Example usage
getTransaction('0xTransactionHash').then(console.log);
```

{% endcode %}

## Retrieve a user transaction receipt

You can retrieve a specific transaction receipt.\
NOTE: This example provides definitive gas fees details for the transaction.

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

```javascript
async function getTransactionReceipt(txHash) {
  const transactionReceipt = await client.getTransactionReceipt({
    hash: txHash, // Replace with the actual transaction hash
  });
  return transactionReceipt;
}

// Example usage
getTransactionReceipt('0xTransactionHash').then(console.log);
```

{% endcode %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://connect.socios.com/interact-with-chiliz-chain/working-with-transactions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
