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

# getTransaction

> Fetches a single transaction by its hash or internal ID. Works with Vue, Angular, Svelte, and vanilla JavaScript.

## Usage

```typescript theme={null}
const bearerToken = await getBearerToken();
const tx = await browserClient.getTransaction("0x...", bearerToken);
```

### Parameters

* `hashOrId` (string): Transaction hash (`0x...`) or internal database ID
* `bearerToken` (string): Bearer token for authentication

### Return Value

Returns a `Promise<Transaction>` with the full transaction record.

## Example Implementation

```typescript theme={null}
import { ChipiBrowserSDK } from "@chipi-stack/backend";

const browserClient = new ChipiBrowserSDK({
  apiPublicKey: process.env.CHIPI_PUBLIC_KEY,
});

async function showTransaction(txHash: string) {
  const bearerToken = await getBearerToken();
  const tx = await browserClient.getTransaction(txHash, bearerToken);

  console.log(`Status: ${tx.status}`);
  console.log(`Amount: ${tx.amount} ${tx.token}`);
  console.log(`From: ${tx.senderAddress}`);
  console.log(`To: ${tx.destinationAddress}`);
}
```
