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

# Fetch Account Transactions

> Retrieve account transactions via the Atoa Bank Feed API, request parameters, response schema and code samples in cURL, Python, JavaScript, PHP, Go and Java.

Once bank account access is authorized, use the following API to fetch transaction data.

> [!NOTE]
>
> This endpoint uses [**cursor-based pagination**](#cursor-based-pagination), returning one bank page per call. Follow `links.next` exactly as returned until it is no longer present to page through all transactions. Responses use the `{ data, meta, links }` envelope shown in the sample response below.

### Authorization

Bearer `<token>`

**Request Body Schema**

**accountId** `string` *required*

ID of the user's bank account. This can be obtained from the redirect URL
after account linking or by using the [Fetch All Accounts API
Reference](https://docs.paywithatoa.com/api-reference/account-initiation-services/fetch-all-accounts.md)
endpoint.

Refer:- [Accounts](https://docs.paywithatoa.com/accounts.md)

**from** `string`

Inclusive lower bound on the booking date. Accepts either a plain
date (e.g. `2025-08-17`) or a full ISO 8601 date-time (e.g.
`2026-01-01T00:00:00Z`). **Only applies to the first call.** Once
pagination has started, the date range is held inside the cursor,
so `from` should not be sent again alongside a cursor.

**before** `string`

Exclusive upper bound on the booking date. Accepts either a plain
date (e.g. `2025-08-17`) or a full ISO 8601 date-time.
**Only applies to the first call.** Should not be sent again
alongside a cursor. `before` requires `from` to also be set.

**cursor** `string`

Cursor token taken from a previous response's `links.next` or `links.prev`.
Pass it back **unchanged** — do not read, decode, or modify it. A stale,
tampered, or reused cursor returns `410 Gone`, signalling that the caller
should restart pagination without a cursor.

**Response**

**data** `array`

Array of transactions. Each transaction has the following fields:

**id** `string`

A **unique identifier** for the transaction. Use this to deduplicate or
track individual transactions.

**date** `string`

The **most recent date associated with the transaction.** This may be the
booking date or value date depending on the bank.

**type** `string`

Indicates whether the transaction is a **CREDIT** (money received) or
**DEBIT** (money sent).

**amount** `number`

The **monetary value** of the transaction. This can be positive or
negative based on the type.

**currency** `string`

The **currency code** (e.g., GBP, EUR) in which the transaction was made.

**description** `string`

Any **additional information or context** provided by the bank. This could
include metadata, internal codes, or bank-provided notes.

**merchantName** `string`

The **name of the merchant** involved in the transaction, if provided by
the bank.

**transactionCategory** `string`

A **high-level category** indicating the nature of the transaction (e.g.,
Payments, Transfers, ATM, etc.). Helps in transaction classification.

**status** `string`

The **current state** of the transaction. Can be **BOOKED** (processed and
settled) or **PENDING** (initiated but not yet fully processed).

**payer** `object`

The payer object provides information about the sender of the funds.

**name** `string`

The name of the payer.

**accountDetails** `object`

Account details of the payer. **Note: This field might not be
available for some banks.**

**sortCode** `string`

Sort code of the payer's account.

**accountNumber** `string`

Account number of the payer.

**payee** `object`

The payee object provides information about the recipient of the funds.

**name** `string`

The name of the payee.

**accountDetails** `object`

Account details of the payee. **Note: This field might not be
available for some banks.**

**sortCode** `string`

Sort code of the payee's account.

**accountNumber** `string`

Account number of the payee.

**balance** `object`

The account balance **immediately after** the transaction. **Note: This
field might not be available for some banks.** Includes:

**amount** `number`

The available balance at that point in time.

**currency** `string`

The currency in which the balance is held.

**meta** `object`

Metadata for this page.

**count** `number`

Number of transactions in `data`.

**links** `object`

Pagination links. Follow the URLs exactly as returned.

**self** `string`

URL of the current request.

**next** `string`

URL of the next page. Absent when there is no next page.

**prev** `string`

URL of the previous page. Only present if the bank provides it.

### Cursor-based pagination

Atoa's `Get Account Transactions` endpoint uses cursor-based pagination. It accepts `from` and `before` as optional query parameters when sending the initial request, and accepts `cursor` as an optional query parameter in subsequent requests.

#### How it works

Atoa doesn't set a `limit` for the maximum number of transactions returned per page, but an individual bank can set a limit.

The `meta` object in the response includes `count` that represents the number of transactions in that page, but doesn't return a field for the total number of transactions.

The `data` object in the response contains an array of transactions.

The `links` object in the response returns cursor tokens that can be fed into the subsequent request:

* `prev` - a cursor or link to the previous page
* `self` - a cursor or link to the current page
* `next` - a cursor or link to the next page

#### Examples

**First page**

`GET /accounts/{accountId}/transactions` returns `self` and `next`.

```json theme={null}
"links": {
  "self": "https://api.atoa.me/api/bank/accounts/{accountId}/transactions?cursor=<current-page-cursor>",
  "next": "https://api.atoa.me/api/bank/accounts/{accountId}/transactions?cursor=<next-page-cursor>"
}
```

**Middle page**

`GET /accounts/{accountId}/transactions?cursor=<current-page-cursor>` returns `prev`, `self` and `next`.

```json theme={null}
"links": {
  "prev": "https://api.atoa.me/api/bank/accounts/{accountId}/transactions?cursor=<prev-page-cursor>",
  "self": "https://api.atoa.me/api/bank/accounts/{accountId}/transactions?cursor=<current-page-cursor>",
  "next": "https://api.atoa.me/api/bank/accounts/{accountId}/transactions?cursor=<next-page-cursor>"
}
```

**Final page**

`GET /accounts/{accountId}/transactions?cursor=<current-page-cursor>` returns `prev` and `self`.

```json theme={null}
"links": {
  "prev": "https://api.atoa.me/api/bank/accounts/{accountId}/transactions?cursor=<prev-page-cursor>",
  "self": "https://api.atoa.me/api/bank/accounts/{accountId}/transactions?cursor=<current-page-cursor>"
}
```

Pass the cursor back unchanged. An expired or tampered cursor returns `410 Gone`, at which point restart pagination without a cursor. Because the date range is held inside the cursor, later calls should not re-send `from` or `before` alongside it.

```json 200 theme={null}
{
  "data": [
    {
      "id": "txn_001",
      "date": "2024-01-14T11:45:00Z",
      "type": "DEBIT",
      "amount": 89.99,
      "currency": "GBP",
      "description": "Amazon Marketplace",
      "reference": "INV-4321-A",
      "transactionCategory": "E-commerce",
      "status": "BOOKED",
      "payee": {
        "name": "Amazon UK Ltd",
        "accountDetails": {
          "sortCode": "123456",
          "accountNumber": "87654321"
        }
      },
      "balance": { "amount": 2.37, "currency": "GBP" }
    },
    {
      "id": "txn_002",
      "date": "2024-01-12T09:30:00Z",
      "type": "CREDIT",
      "amount": 1500.0,
      "currency": "GBP",
      "description": "Salary Payment",
      "reference": "SALARY-JAN",
      "transactionCategory": "Income",
      "status": "BOOKED",
      "payer": {
        "name": "ABC Company Ltd",
        "accountDetails": {
          "sortCode": "654321",
          "accountNumber": "12345678"
        }
      },
      "balance": { "amount": 1592.36, "currency": "GBP" }
    }
  ],
  "meta": { "count": 2 },
  "links": {
    "prev": "https://api.atoa.me/api/bank/accounts/{accountId}/transactions?cursor=<prev-page-cursor>",
    "self": "https://api.atoa.me/api/bank/accounts/{accountId}/transactions?cursor=<current-page-cursor>",
    "next": "https://api.atoa.me/api/bank/accounts/{accountId}/transactions?cursor=<next-page-cursor>"
  }
}
```

```json 401 theme={null}
{
  "name": "UNAUTHORIZED",
  "message": "Unauthorized",
  "status": 401,
  "errors": []
}
```

```json 404 theme={null}
{
  "name": "NOT FOUND",
  "message": "Consent not found",
  "status": 404,
  "errors": []
}
```

```json 410 theme={null}
{
  "name": "GONE",
  "message": "The pagination cursor is expired or invalid. Restart pagination without a cursor.",
  "status": 410,
  "errors": []
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.