> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://amer.developers.trustly.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://amer.developers.trustly.com/_mcp/server.

# Get account activity details

GET https://sandbox.trustly.one/api/v1/transactions/{transactionId}/accountActivityDetails

Returns transaction-level account activity grouped by account for a Retrieval authorization transaction. This endpoint is the migration target for the deprecated legacy `accountTransactions` API and adds support for a configurable historical window through `lookbackWindowMonths`, evaluated as calendar months relative to the request date.

**Warning**</br>Please wait to receive the [DataReady](/api-reference/api/event-notifications/data-ready) event before calling this endpoint. Requests made before the DataReady event may return partial data.

Reference: https://amer.developers.trustly.com/api-reference/api/account-data/get-transaction-account-activity-details

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Trustly API
  version: 1.0.0
paths:
  /transactions/{transactionId}/accountActivityDetails:
    get:
      operationId: get-transaction-account-activity-details
      summary: Get account activity details
      description: >-
        Returns transaction-level account activity grouped by account for a
        Retrieval authorization transaction. This endpoint is the migration
        target for the deprecated legacy `accountTransactions` API and adds
        support for a configurable historical window through
        `lookbackWindowMonths`, evaluated as calendar months relative to the
        request date.


        **Warning**</br>Please wait to receive the
        [DataReady](/api-reference/api/event-notifications/data-ready) event
        before calling this endpoint. Requests made before the DataReady event
        may return partial data.
      tags:
        - subpackage_accountData
      parameters:
        - name: transactionId
          in: path
          description: Transaction ID retrieved from a Trustly Authorization transaction.
          required: true
          schema:
            type: string
        - name: cursor
          in: query
          description: >-
            Opaque pagination cursor returned in `nextCursor` from a prior
            response.
          required: false
          schema:
            type: string
        - name: count
          in: query
          description: Maximum number of activity entries to return per page.
          required: false
          schema:
            type: integer
        - name: lookbackWindowMonths
          in: query
          description: >-
            Historical window for the activity query in calendar months. Trustly
            converts the selected month window to days based on the request
            date. If omitted, the endpoint defaults to `3` months.
          required: false
          schema:
            $ref: >-
              #/components/schemas/TransactionsTransactionIdAccountActivityDetailsGetParametersLookbackWindowMonths
            default: 3
        - name: Authorization
          in: header
          description: ''
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountActivityDetailsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Get-transaction-account-activity-detailsRequestBadRequestError
        '401':
          description: Access not authorized
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Get-transaction-account-activity-detailsRequestUnauthorizedError
servers:
  - url: https://sandbox.trustly.one/api/v1
    description: Sandbox
components:
  schemas:
    TransactionsTransactionIdAccountActivityDetailsGetParametersLookbackWindowMonths:
      type: string
      enum:
        - '3'
        - '12'
        - '24'
      title: >-
        TransactionsTransactionIdAccountActivityDetailsGetParametersLookbackWindowMonths
    AccountActivityDetailsPaymentProvider:
      type: object
      properties:
        country:
          type: string
          description: Two-letter ISO country code for the financial institution.
        name:
          type: string
          description: Name of the financial institution.
        swift:
          type: string
          description: SWIFT code for the institution when available.
        instantPayoutAvailable:
          type: boolean
          description: Indicates whether the institution supports instant payout.
        type:
          type: string
          description: Provider classification returned by Trustly.
      description: Financial institution metadata associated with the account.
      title: AccountActivityDetailsPaymentProvider
    AccountActivityDetailsBalances:
      type: object
      properties:
        availableBalance:
          type: number
          format: double
          description: Available balance for the account when provided.
        currentBalance:
          type: number
          format: double
          description: Current balance for the account when provided.
      description: Balance snapshot returned alongside account activity.
      title: AccountActivityDetailsBalances
    AccountActivityDetailsEntryChangeType:
      type: string
      enum:
        - credit
        - debit
      description: Indicates whether the entry is a credit or debit.
      title: AccountActivityDetailsEntryChangeType
    AccountActivityDetailsCounterparty:
      type: object
      properties:
        counterpartyName:
          type: string
          description: Name of the counterparty.
        counterpartyType:
          type: string
          description: Provider classification for the counterparty.
        confidenceLevel:
          type: string
          description: Confidence level assigned to the inferred counterparty.
      description: Counterparty information associated with an activity entry.
      title: AccountActivityDetailsCounterparty
    AccountActivityDetailsCategory:
      type: object
      properties:
        subcategoryName:
          type: string
          description: Provider-assigned subcategory label for the transaction.
      description: Category metadata returned for an activity entry.
      title: AccountActivityDetailsCategory
    AccountActivityDetailsPaymentMetadata:
      type: object
      properties:
        paymentMethod:
          type: string
          description: Payment method label assigned by the provider.
      description: Payment metadata returned for an activity entry.
      title: AccountActivityDetailsPaymentMetadata
    AccountActivityDetailsEntry:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the entry.
        changeType:
          $ref: '#/components/schemas/AccountActivityDetailsEntryChangeType'
          description: Indicates whether the entry is a credit or debit.
        postedDate:
          type: string
          format: date
          description: Banking date associated with the entry.
        postedAt:
          type: string
          format: date-time
          description: Timestamp when the entry was posted by the provider.
        country:
          type: string
          description: Two-letter ISO country code associated with the entry.
        currencyCode:
          type: string
          description: ISO 4217 currency code.
        amount:
          type: number
          format: double
          description: Amount of the activity entry.
        runningBalance:
          type: number
          format: double
          description: Balance after the entry was applied.
        name:
          type: string
          description: Human-readable label, merchant name, or description.
        status:
          type: string
          description: Provider-specific transaction status.
        type:
          type: string
          description: Provider-specific transaction type or classification.
        createdAt:
          type: string
          format: date-time
          description: Entry creation timestamp returned by the provider.
        updatedAt:
          type: string
          format: date-time
          description: Entry update timestamp returned by the provider.
        counterparties:
          type: array
          items:
            $ref: '#/components/schemas/AccountActivityDetailsCounterparty'
          description: Counterparties inferred for the transaction.
        category:
          $ref: '#/components/schemas/AccountActivityDetailsCategory'
        paymentMetadata:
          $ref: '#/components/schemas/AccountActivityDetailsPaymentMetadata'
      required:
        - id
        - changeType
        - postedDate
        - country
        - currencyCode
        - amount
        - runningBalance
        - name
        - status
        - type
        - createdAt
        - updatedAt
      description: A single account activity entry.
      title: AccountActivityDetailsEntry
    AccountActivityDetailsAccount:
      type: object
      properties:
        accountName:
          type: string
          description: Friendly account name returned by the financial institution.
        accountHolderNames:
          type: array
          items:
            type: string
          description: Names associated with the account.
        routingNumber:
          type: string
          description: Bank routing number for the account.
        accountNumber:
          type: string
          description: Full account number or virtual account number.
        accountNumberLastFour:
          type: string
          description: Last four digits of the underlying account number.
        virtualAccountRoutingPair:
          type: boolean
          description: Indicates whether the account and routing numbers are virtualized.
        type:
          type: string
          description: Account type value returned by the provider.
        subType:
          type: string
          description: More granular account subtype when available.
        profile:
          type: string
          description: Provider-specific account profile classification.
        paymentProvider:
          $ref: '#/components/schemas/AccountActivityDetailsPaymentProvider'
        balances:
          $ref: '#/components/schemas/AccountActivityDetailsBalances'
        entries:
          type: array
          items:
            $ref: '#/components/schemas/AccountActivityDetailsEntry'
          description: Activity entries associated with this account.
      required:
        - accountName
        - routingNumber
        - accountNumber
        - accountNumberLastFour
        - type
        - entries
      description: Account metadata and the activity entries associated with that account.
      title: AccountActivityDetailsAccount
    AccountActivityDetailsResponse:
      type: object
      properties:
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/AccountActivityDetailsAccount'
          description: Accounts that have activity entries in the selected lookback window.
        hasMore:
          type: boolean
          description: Indicates whether more results are available.
        nextCursor:
          type: string
          description: >-
            Cursor to use on the next request when additional results are
            available.
      required:
        - accounts
        - hasMore
      description: Paginated account activity grouped by account.
      title: AccountActivityDetailsResponse
    TransactionsTransactionIdAccountActivityDetailsGetResponsesContentApplicationJsonSchemaErrorsItems:
      type: object
      properties:
        domain:
          type: string
        code:
          type: number
          format: double
        message:
          type: string
        occurredAt:
          type: number
          format: double
      required:
        - domain
        - code
        - message
        - occurredAt
      title: >-
        TransactionsTransactionIdAccountActivityDetailsGetResponsesContentApplicationJsonSchemaErrorsItems
    Get-transaction-account-activity-detailsRequestBadRequestError:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: >-
              #/components/schemas/TransactionsTransactionIdAccountActivityDetailsGetResponsesContentApplicationJsonSchemaErrorsItems
      required:
        - errors
      title: Get-transaction-account-activity-detailsRequestBadRequestError
    Get-transaction-account-activity-detailsRequestUnauthorizedError:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: >-
              #/components/schemas/TransactionsTransactionIdAccountActivityDetailsGetResponsesContentApplicationJsonSchemaErrorsItems
      required:
        - errors
      title: Get-transaction-account-activity-detailsRequestUnauthorizedError
  securitySchemes:
    HTTPBasic:
      type: http
      scheme: basic
      description: ''

```

## Examples



**Response**

```json
{
  "accounts": [
    {
      "accountName": "Primary Checking",
      "routingNumber": "124003116",
      "accountNumber": "1234567890",
      "accountNumberLastFour": "7890",
      "type": "checking",
      "entries": [
        {
          "id": "txn_0192a8c1",
          "changeType": "debit",
          "postedDate": "2026-05-14",
          "country": "US",
          "currencyCode": "USD",
          "amount": -86.14,
          "runningBalance": 1450.42,
          "name": "ACME GROCERY",
          "status": "posted",
          "type": "card_payment",
          "createdAt": "2026-05-14T14:52:11Z",
          "updatedAt": "2026-05-14T14:52:11Z",
          "postedAt": "2026-05-14T14:52:10Z",
          "counterparties": [
            {
              "counterpartyName": "ACME GROCERY",
              "counterpartyType": "merchant",
              "confidenceLevel": "high"
            }
          ],
          "category": {
            "subcategoryName": "Groceries"
          },
          "paymentMetadata": {
            "paymentMethod": "debit_card"
          }
        },
        {
          "id": "txn_0192a8f9",
          "changeType": "credit",
          "postedDate": "2026-05-15",
          "country": "US",
          "currencyCode": "USD",
          "amount": 2500,
          "runningBalance": 3950.42,
          "name": "ACME PAYROLL",
          "status": "posted",
          "type": "deposit",
          "createdAt": "2026-05-15T09:00:01Z",
          "updatedAt": "2026-05-15T09:00:01Z",
          "postedAt": "2026-05-15T09:00:00Z"
        },
        {
          "id": "txn_0192aa11",
          "changeType": "debit",
          "postedDate": "2026-05-16",
          "country": "US",
          "currencyCode": "USD",
          "amount": -1200,
          "runningBalance": 2750.42,
          "name": "RENT PAYMENT",
          "status": "pending",
          "type": "ach_debit",
          "createdAt": "2026-05-16T16:21:34Z",
          "updatedAt": "2026-05-16T16:25:10Z",
          "postedAt": "2026-05-16T16:21:33Z",
          "counterparties": [
            {
              "counterpartyName": "PARKVIEW PROPERTIES",
              "counterpartyType": "biller",
              "confidenceLevel": "medium"
            }
          ],
          "category": {
            "subcategoryName": "Rent"
          },
          "paymentMetadata": {
            "paymentMethod": "ach"
          }
        }
      ],
      "accountHolderNames": [
        "Clara Smith",
        "Alex Smith"
      ],
      "virtualAccountRoutingPair": false,
      "subType": "2",
      "profile": "consumer",
      "paymentProvider": {
        "country": "US",
        "name": "Demo Bank",
        "swift": "PBNKUS11XXX",
        "instantPayoutAvailable": false
      },
      "balances": {
        "availableBalance": 1325.42,
        "currentBalance": 1450.42
      }
    },
    {
      "accountName": "Rainy Day Savings",
      "routingNumber": "124003116",
      "accountNumber": "555566667777",
      "accountNumberLastFour": "7777",
      "type": "savings",
      "entries": [
        {
          "id": "txn_0192ab42",
          "changeType": "credit",
          "postedDate": "2026-05-10",
          "country": "US",
          "currencyCode": "USD",
          "amount": 150,
          "runningBalance": 8200.19,
          "name": "INTEREST PAYMENT",
          "status": "posted",
          "type": "interest",
          "createdAt": "2026-05-10T08:12:01Z",
          "updatedAt": "2026-05-10T08:12:01Z",
          "postedAt": "2026-05-10T08:12:00Z",
          "category": {
            "subcategoryName": "Interest Income"
          }
        }
      ],
      "accountHolderNames": [
        "Clara Smith"
      ],
      "virtualAccountRoutingPair": false,
      "subType": "1",
      "profile": "consumer",
      "paymentProvider": {
        "country": "US",
        "name": "Demo Bank",
        "swift": "PBNKUS11XXX",
        "instantPayoutAvailable": false
      },
      "balances": {
        "availableBalance": 8200.19,
        "currentBalance": 8200.19
      }
    }
  ],
  "hasMore": true,
  "nextCursor": "QUNUSVZJVFk6MTcxODM2NTIwMDAwMDoxOTJhOGY5"
}
```

**SDK Code**

```python Example
import requests

url = "https://sandbox.trustly.one/api/v1/transactions/transactionId/accountActivityDetails"

response = requests.get(url, auth=("<username>", "<password>"))

print(response.json())
```

```javascript Example
const url = 'https://sandbox.trustly.one/api/v1/transactions/transactionId/accountActivityDetails';
const credentials = btoa("<username>:<password>");

const options = {method: 'GET', headers: {Authorization: `Basic ${credentials}`}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://sandbox.trustly.one/api/v1/transactions/transactionId/accountActivityDetails"

	req, _ := http.NewRequest("GET", url, nil)

	req.SetBasicAuth("<username>", "<password>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Example
require 'uri'
require 'net/http'

url = URI("https://sandbox.trustly.one/api/v1/transactions/transactionId/accountActivityDetails")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request.basic_auth("<username>", "<password>")

response = http.request(request)
puts response.read_body
```

```java Example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://sandbox.trustly.one/api/v1/transactions/transactionId/accountActivityDetails")
  .basicAuth("<username>", "<password>")
  .asString();
```

```php Example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://sandbox.trustly.one/api/v1/transactions/transactionId/accountActivityDetails', [
  'headers' => [
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp Example
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://sandbox.trustly.one/api/v1/transactions/transactionId/accountActivityDetails");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.GET);

IRestResponse response = client.Execute(request);
```

```swift Example
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = ["Authorization": "Basic \(credentials)"]

let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox.trustly.one/api/v1/transactions/transactionId/accountActivityDetails")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```