> This page is for North America.

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

# List all accounts

GET https://sandbox.trustly.one/api/v1/transactions/{transactionId}/payment/paymentProvider/accounts

Returns a list of all user-selected accounts associated with a given authorization transaction.

**Warning**Please wait to receive the [DataReady](../reference/post_dataready) event before calling this endpoint. Requests to this endpoint made prior to receiving the DataReady event can result in partial data being returned.

Reference: https://trustly.ferndocs.com/api-reference/api/account-data/list-selected-accounts

## Authentication

- `Authorization` header (basic auth, required) — Basic authentication of the form `Basic <base64(username:password)>`.

## Request

### Path parameters

- `transactionId` (string, required) — Transaction ID retrieved from a Trustly Authorization transaction.

## Response

### 200

OK

- `accounts` (list of schemas-Account, required)

## Errors

### 400 Bad Request Error

Bad Request

- `errors` (list of TransactionsTransactionIdPaymentPaymentProviderAccountsGetResponsesContentApplicationJsonSchemaErrorsItems, required)

## Types

### schemas-Account

- `providerId` (string, optional) — Payment provider ID.
- `paymentProvider` (schemas-PaymentProvider, optional)
- `nameOnAccount` (string, optional) — Account owner name.
- `country` (enum, optional) — 2-character ISO code of the country for the bank account that was selected. Currently only the US, CA, UK, DE, and AU are supported.
  - Allowed values: `US`, `CA`, `UK`, `DE`, `AU`
- `name` (string, optional) — A description to identify an specific account (e.g. "Test checking account")
- `type` (double, optional) — See Financial Institution Account Type Values.
- `profile` (double, optional) — See Financial Institution Account Profile Values
- `accountNumber` (string, optional) — Bank Account Number or VAN if `virtualAccountRoutingPair` is equal to `true`.
- `iban` (string, optional) — IBAN (International Bank Account Number) is an internationally agreed system of identifying bank accounts across national borders
- `verified` (boolean, optional) — Indicates if the account is verified or not.
- `verification` (FinancialInstitutionAccountVerification, optional)
- `source` (double, optional)
- `routingNumber` (string, optional) — Bank Routing Number.
- `token` (string, optional) — The Account Token.
- `accountNumberLastFour` (string, optional) — The last 4 digits of the real account number.
- `virtualAccountRoutingPair` (boolean, optional) — Indicates if account is using virtual/tokenized account and routing numbers (VANs/TANs) or not.

### TransactionsTransactionIdPaymentPaymentProviderAccountsGetResponsesContentApplicationJsonSchemaErrorsItems

- `domain` (string, required)
- `code` (double, required)
- `location` (string, required)
- `message` (string, required)
- `occurredAt` (double, required)

### schemas-PaymentProvider

- `paymentProviderId` (string, required) — A unique identifier for the Payment Provider.
- `type` (double, required)
- `name` (string, required) — Payment Provider name.
- `instantPayoutAvailable` (boolean, required) — Whether payment provider supports instant payout.
- `subType` (enum, optional) — Financial Institution Account Type: * `1000`: Online Banking * `2000`: Manual Entry * `2001`: Manual Entry with Challenge Deposit
  - Allowed values: `1000`, `2000`, `2001`
- `swift` (string, optional)
- `address` (components-schemas-Address, optional)
- `country` (enum, optional) — 2-character ISO code of the country for the bank account that was selected. Currently only the US, CA, UK, DE, and AU are supported.
  - Allowed values: `US`, `CA`, `UK`, `DE`, `AU`
- `instantPayment` (boolean, optional)

### FinancialInstitutionAccountVerification

- `verified` (boolean, required) — true if the account is verified; false otherwise.
- `type` (enum, required) — Verification Type: * `1`: Manual - The account was verified with manual account verification. For example, Manual Electronic Check and Micro Challenge Deposit. * `2`: Online Banking verification - The Account was verified using the Trustly Online Banking application. * `3`: Database verification - The Account was verified using the Trustly database or a Third-Party Service.
  - Allowed values: `1`, `2`, `3`
- `hasEnoughFunds` (boolean, required) — If true, there is enough balance in account.
- `verificationDate` (integer, required) — The date and time the verification was completed as a UNIX timestamp.
- `score` (enum, optional) — Verification Score: * `0`: Invalid input. The account or routing number are invalid. (Verified Mapping = false) * `1`: There is a strong indication that the account is invalid. (Verified Mapping = false) * `2`: There are active non-bankable returns on this account that are less than 3 years old. (Verified Mapping = false) * `3`: There are administrative returns on this account. (Verified Mapping = false) * `4`: The format appears to be suspicious. (Verified Mapping = false) * `5`: There is no data on this account or format. (Verified Mapping = false) * `6`: We have not seen this account, but the format appears to be valid. (Verified Mapping = true) * `7`: We have seen this account but have not received a final disposition on the transaction. (Verified Mapping = true) * `8`: We have seen this account, but not in the last 6 months, and have seen no returns associated with the account. (Verified Mapping = true) * `9`: We have seen this account in the last 6 months and have seen no returns associated with the account. (Verified Mapping = true) * `10`: This account has been directly validated with/by the financial institution or 3rd party. We have the highest confidence that this account is valid. (Verified Mapping = true)
  - Allowed values: `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`
- `thirdPartyScore` (enum, optional) — Verification Third-Party Score: * `0`: Failed RT validation. (Verified Mapping = 0) * `100`: The supplier has a strong indication that this account is invalid. (Verified Mapping = 1) * `200`: The supplier has active non-bankable debt(s) on this account that are less than 3 years old. (Verified Mapping = 2) * `300`: The supplier has administrative returns on this account. (Verified Mapping = 3) * `400`: The supplier does not have Neg data on this account, but the format appears to be suspicious. (Verified Mapping = 4) * `500`: The supplier does not have data on this account or format. (Verified Mapping = 5) * `600`: The supplier has not seen this account, but the format appears valid. (Verified Mapping = 6) * `700`: The supplier has seen this account, but did not receive a final disposition on the transaction. (Verified Mapping = 7) * `800`: The supplier has seen this account, but not in the last 6 months. (Verified Mapping = 8) * `900`: The supplier has seen this account in the last 6 months. (Verified Mapping = 9) * `999`: The supplier has the highest confidence that this account is valid. (Verified Mapping = 10)
  - Allowed values: `0`, `100`, `200`, `300`, `400`, `500`, `600`, `700`, `800`, `900`, `999`
- `numberOfTries` (double, optional) — Number of tries allowed.
- `numberOfAttemptsLeft` (double, optional) — Number of remaining attempts.

### components-schemas-Address

- `country` (enum, required) — 2 character ISO Country code. Currently only the US is supported.
  - Allowed values: `US`
- `address1` (string, optional) — Address Line 1.
- `city` (string, optional) — Address City.
- `state` (string, optional) — 2 character ISO State code.
- `zip` (string, optional) — 5 character US Zip Code.
- `address2` (string, optional) — Address Line 2.

## Examples

**Response**

```json
{
  "accounts": [
    {
      "providerId": "200005501",
      "paymentProvider": {
        "paymentProviderId": "200005501",
        "type": 1,
        "name": "Demo Bank",
        "instantPayoutAvailable": false,
        "swift": "PBNKUS11XXX",
        "country": "US"
      },
      "nameOnAccount": "John Smith",
      "name": "Demo Checking Account",
      "type": 1,
      "profile": 1,
      "accountNumber": "123456576",
      "verified": true,
      "verification": {
        "verified": true,
        "type": 2,
        "hasEnoughFunds": false,
        "verificationDate": 1
      },
      "routingNumber": "124003116"
    },
    {
      "providerId": "200005501",
      "paymentProvider": {
        "paymentProviderId": "200005501",
        "type": 1,
        "name": "Demo Bank",
        "instantPayoutAvailable": false,
        "swift": "PBNKUS11XXX",
        "country": "US"
      },
      "nameOnAccount": "John Smith",
      "name": "Demo Saving Account",
      "type": 2,
      "profile": 2,
      "accountNumber": "20004000",
      "verified": true,
      "verification": {
        "verified": true,
        "type": 2,
        "hasEnoughFunds": false,
        "verificationDate": 1
      },
      "routingNumber": "124003116"
    }
  ]
}
```

**SDK Code**

```python Example
import requests

url = "https://sandbox.trustly.one/api/v1/transactions/transactionId/payment/paymentProvider/accounts"

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

print(response.json())
```

```javascript Example
const url = 'https://sandbox.trustly.one/api/v1/transactions/transactionId/payment/paymentProvider/accounts';
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/payment/paymentProvider/accounts"

	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/payment/paymentProvider/accounts")

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/payment/paymentProvider/accounts")
  .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/payment/paymentProvider/accounts', [
  '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/payment/paymentProvider/accounts");
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/payment/paymentProvider/accounts")! 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()
```