> For a complete index of Agora Finance documentation, fetch https://docs.agora.finance/llms.txt

# Overview

A **transaction** is a settled movement of value through Agora: a mint, a redeem, a bridge, a rewards payout, or a returned transfer. Each records a `source`, a `recipient`, and the per-currency totals that moved. The detail endpoint adds the **legs** behind it: the individual settlement steps, like an on-chain transfer, a wire, or a book transfer.

Both endpoints are read-only and return only settled transactions.

* **`GET /v0/transactions`** lists your transactions, newest first, with cursor pagination.
* **`GET /v0/transactions/{txnId}`** returns one transaction plus its `legs`.

## Types

A transaction's `type` tells you what it did:

* **`mint`**: fiat or stablecoin in, AUSD out.
* **`redeem`**: AUSD in, fiat or stablecoin out.
* **`bridge`**: AUSD moved between chains.
* **`reward`**: a rewards payout.
* **`return`**: a returned or reversed transfer.

We will add new `type` values over time, so handle ones you don't recognize gracefully. `isInstantSettlement` is `true` when the transaction took Agora's instant-settlement path.

## Status

Today `status` is always `settled`: these endpoints expose settled transactions only. We will add values like `pending` for ongoing transfers, so handle values you don't recognize gracefully. `initiatedAt` is the first leg's time; `settledAt` is when settlement completed, `null` until then.

## Counterparties

The transaction and each of its legs carry a `source` and a `recipient`, each tagged by `kind`:

* **`bank`**: carries `bankName`, `accountNumber`, and the `name` you registered the account under.
* **`wallet`**: carries the checksummed `address`, the `chain`, and the `name` you registered the wallet under.

The Agora side of a transfer is named `"Agora"`. Each counterparty carries an `accountId` matching an account from [`GET /v0/accounts`](/api/endpoints), or `null` when the account isn't associated with your organization. Bank counterparties currently return `null`.

On the transaction itself (not its legs), `source` and `recipient` also carry `amounts`, the per-currency totals that moved on that side.

## Legs

The detail endpoint adds a `legs` array, one entry per settlement step. Each leg has a decimal-string `amount` and `currency`, its own `source` and `recipient`, and:

* **`direction`**: `FROM_AGORA` (Agora to customer) or `TO_AGORA` (customer to Agora).
* **`detail`**: rail-specific ids, keyed by `type`: `token` (on-chain `transactionHash`), `wire` (Fedwire `imad`), `bookTransfer` (`confirmationNumber`), or `instantPayment` (`confirmationNumber`). A `fee` leg is a manual accounting entry, so its `detail` carries only the `type`.

> **Info**
>
> A leg's `detail.type` names the settlement *rail* (`token`, `wire`, …). The transaction-level `type` classifies the whole transaction (`mint`, `redeem`, …). Same field name, different values.

## Filtering

`GET /v0/transactions` narrows the list by movement `type`, by `sourceChain` / `recipientChain`, by `isInstantSettlement`, and by an `initiatedAt` range. The grammar is shared across the list endpoints. See [Filtering list endpoints](/api#filtering-list-endpoints).

The chain filters match the `source` and `recipient` the response reports, not every leg the transaction touched: a mint funded by wire has no source chain, so it matches on `recipientChain` only. `isInstantSettlement=false` covers standard settlement plus the types that have no settlement path of their own, such as `reward` and `return`.

## Pagination

Both list responses return `{ data, nextCursor }`:

* **`data`**: the page, newest first.
* **`nextCursor`**: an opaque cursor. Pass it back as the `cursor` query param for the next page; `null` when there are none.

Size the page with `limit`. Amounts are decimal strings, not numbers (see the [API overview](/api)). Every endpoint needs authentication (see the [Authentication guide](/api/authentication)); for errors, see the [Error Reference](/api/errors).