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

# Transactions

<Note>Mode: `transactions`</Note>

Opal Transactions is the primary way to obtain consent and subscribe to real-time transactions.
This pre-built flow gathers a user's consent, verifies their identity, and prompts them to select the accounts eligible to be subscribed to.

<img src="https://mintcdn.com/methodfinancial/eYCszB8Xv_iFcf77/images/transactions-hero.svg?fit=max&auto=format&n=eYCszB8Xv_iFcf77&q=85&s=9f988aa1250705a94c978ba788deae1c" alt="transactions-hero" width="1920" height="1080" data-path="images/transactions-hero.svg" />

## What this mode does

Transactions will provide a seamless experience for a user to subscribe to real-time transaction updates for supported accounts.
Eligible accounts will be automatically determined by Method, including your team's eligibility criteria.

For details on how to receive transaction updates via [Webhooks](/reference/webhooks/create). Make sure you are subscribed to the relevant webhook events to receive real-time transaction data. Note that you will only receive updates for events that occur after your subscription is active.

Please reach out to your CSM to enable access to this mode!

## Create a token

You can create a transactions token using one of the supported patterns:

* Existing entity: provide `entity_id` + `mode` + `transactions`
* Create new entity: provide `entity` + `mode` + `transactions`

### Existing Entity

```json theme={null}
{
  "entity_id": "ent_...",
  "mode": "transactions",
  "transactions": {}
}
```

### Create New Entity

```json theme={null}
{
  "entity": {
    "type": "individual",
    "individual": {}
  },
  "mode": "transactions",
  "transactions": {}
}
```

### Response

```json theme={null}
{
  "token": "otkn_...",
  "session_id": "osess_...",
  "valid_until": "2025-06-10T22:50:53.024Z"
}
```

## Resuming a session

Want to link more cards? In this mode, simply create another token with the same `entity_id` and Method will intelligently pick up where your user left off. They won't ever be asked to link a card twice!

## Launch Opal

<Tabs>
  <Tab title="React (Web)">
    ```tsx theme={null}
    import { OpalProvider, useOpal } from "@methodfi/opal-react";

    function Screen() {
      const { open } = useOpal({
        env: "dev",
        onEvent: (e) => {},
        onExit: (e) => {},
      });
      const start = async () => {
        const { token } = await getTokenFromBackend();
        open({ token });
      };
      return <button onClick={start}>Link Transactions</button>;
    }
    ```
  </Tab>

  <Tab title="React Native">
    ```tsx theme={null}
    import { OpalProvider, useOpal } from "@methodfi/opal-react-native";

    function Screen() {
      const { open } = useOpal({
        env: "dev",
        onEvent: (e) => {},
        onExit: (e) => {},
      });
      const start = async () => {
        const { token } = await getTokenFromBackend();
        open({ token });
      };
      return <Button title="Link Transactions" onPress={start} />;
    }
    ```
  </Tab>
</Tabs>
