# `getTransaction`

Returns all the information of a Safe transaction.

## Usage


<Tabs items={['example.ts', 'setup.ts']}>
  <Tabs.Tab>
    ```typescript
    import { apiKit } from './setup.ts'

    const safeTxHash = '0x...'

    const tx = await apiKit.getTransaction(safeTxHash)
    ```
  </Tabs.Tab>
  <Tabs.Tab>
    ```typescript
    import SafeApiKit from '@safe-global/api-kit'

    // How to get an Api key => http://docs.safe.global/core-api/how-to-use-api-keys
    export const apiKit = new SafeApiKit({
      chainId: 1n, // Mainnet
      apiKey: 'YOUR_API_KEY'
    })
    ```
  </Tabs.Tab>
</Tabs>


## Returns

`Promise<SafeMultisigTransactionResponse>`

The information of a Safe transaction.

## Parameters

### `safeTxHash`

- **Type:** `string`

The hash of the Safe transaction.

```typescript focus=2
const tx = await apiKit.getTransaction(
  '0x...'
)
```
