> 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 full documentation content, see https://amer.developers.trustly.com/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://amer.developers.trustly.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**</br>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://amer.developers.trustly.com/api-reference/api/account-data/list-selected-accounts

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Trustly API
  version: 1.0.0
paths:
  /transactions/{transactionId}/payment/paymentProvider/accounts:
    get:
      operationId: list-selected-accounts
      summary: List all accounts
      description: >-
        Returns a list of all user-selected accounts associated with a given
        authorization transaction.


        **Warning**</br>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.
      tags:
        - subpackage_accountData
      parameters:
        - name: transactionId
          in: path
          description: Transaction ID retrieved from a Trustly Authorization transaction.
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: ''
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Account
                  Data_list-selected-accounts_Response_200
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/List-selected-accountsRequestBadRequestError
servers:
  - url: https://sandbox.trustly.one/api/v1
components:
  schemas:
    SchemasPaymentProviderSubType:
      type: string
      enum:
        - '1000'
        - '2000'
        - '2001'
      description: |
        Financial Institution Account Type:
         * `1000`: Online Banking
         * `2000`: Manual Entry
         * `2001`: Manual Entry with Challenge Deposit
      title: SchemasPaymentProviderSubType
    ComponentsSchemasAddressCountry:
      type: string
      enum:
        - US
      description: 2 character ISO Country code. Currently only the US is supported.
      title: ComponentsSchemasAddressCountry
    components-schemas-Address:
      type: object
      properties:
        address1:
          type: string
          description: Address Line 1.
        city:
          type: string
          description: Address City.
        state:
          type: string
          description: 2 character ISO State code.
        zip:
          type: string
          description: 5 character US Zip Code.
        country:
          $ref: '#/components/schemas/ComponentsSchemasAddressCountry'
          description: 2 character ISO Country code. Currently only the US is supported.
        address2:
          type: string
          description: Address Line 2.
      required:
        - country
      title: components-schemas-Address
    SchemasPaymentProviderCountry:
      type: string
      enum:
        - US
        - CA
        - UK
        - DE
        - AU
      description: >-
        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.
      title: SchemasPaymentProviderCountry
    schemas-PaymentProvider:
      type: object
      properties:
        paymentProviderId:
          type: string
          description: A unique identifier for the Payment Provider.
        type:
          type: number
          format: double
        name:
          type: string
          description: Payment Provider name.
        instantPayoutAvailable:
          type: boolean
          description: Whether payment provider supports instant payout.
        subType:
          $ref: '#/components/schemas/SchemasPaymentProviderSubType'
          description: |
            Financial Institution Account Type:
             * `1000`: Online Banking
             * `2000`: Manual Entry
             * `2001`: Manual Entry with Challenge Deposit
        swift:
          type: string
        address:
          $ref: '#/components/schemas/components-schemas-Address'
        country:
          $ref: '#/components/schemas/SchemasPaymentProviderCountry'
          description: >-
            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.
        instantPayment:
          type: boolean
      required:
        - paymentProviderId
        - type
        - name
        - instantPayoutAvailable
      title: schemas-PaymentProvider
    SchemasAccountCountry:
      type: string
      enum:
        - US
        - CA
        - UK
        - DE
        - AU
      description: >-
        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.
      title: SchemasAccountCountry
    FinancialInstitutionAccountVerificationType:
      type: string
      enum:
        - '1'
        - '2'
        - '3'
      description: "Verification Type:\n * `1`: Manual - The account was verified with manual account verification. For example, Manual Electronic Check and Micro Challenge Deposit.\n * `2`: Online Banking verification\t- The Account was verified using the Trustly Online Banking application.\n * `3`: Database verification\t- The Account was verified using the Trustly database or a Third-Party Service.  \n"
      title: FinancialInstitutionAccountVerificationType
    FinancialInstitutionAccountVerificationScore:
      type: string
      enum:
        - '0'
        - '1'
        - '2'
        - '3'
        - '4'
        - '5'
        - '6'
        - '7'
        - '8'
        - '9'
        - '10'
      description: |
        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)
      title: FinancialInstitutionAccountVerificationScore
    FinancialInstitutionAccountVerificationThirdPartyScore:
      type: string
      enum:
        - '0'
        - '100'
        - '200'
        - '300'
        - '400'
        - '500'
        - '600'
        - '700'
        - '800'
        - '900'
        - '999'
      description: |
        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)
      title: FinancialInstitutionAccountVerificationThirdPartyScore
    FinancialInstitutionAccountVerification:
      type: object
      properties:
        verified:
          type: boolean
          description: true if the account is verified; false otherwise.
        type:
          $ref: '#/components/schemas/FinancialInstitutionAccountVerificationType'
          description: "Verification Type:\n * `1`: Manual - The account was verified with manual account verification. For example, Manual Electronic Check and Micro Challenge Deposit.\n * `2`: Online Banking verification\t- The Account was verified using the Trustly Online Banking application.\n * `3`: Database verification\t- The Account was verified using the Trustly database or a Third-Party Service.  \n"
        hasEnoughFunds:
          type: boolean
          description: If true, there is enough balance in account.
        verificationDate:
          type: integer
          description: |-
            The date and time the verification was completed 
             as a UNIX timestamp.
        score:
          $ref: '#/components/schemas/FinancialInstitutionAccountVerificationScore'
          description: |
            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)
        thirdPartyScore:
          $ref: >-
            #/components/schemas/FinancialInstitutionAccountVerificationThirdPartyScore
          description: |
            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)
        numberOfTries:
          type: number
          format: double
          description: Number of tries allowed.
        numberOfAttemptsLeft:
          type: number
          format: double
          description: Number of remaining attempts.
      required:
        - verified
        - type
        - hasEnoughFunds
        - verificationDate
      title: FinancialInstitutionAccountVerification
    schemas-Account:
      type: object
      properties:
        providerId:
          type: string
          description: Payment provider ID.
        paymentProvider:
          $ref: '#/components/schemas/schemas-PaymentProvider'
        nameOnAccount:
          type: string
          description: Account owner name.
        country:
          $ref: '#/components/schemas/SchemasAccountCountry'
          description: >-
            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.
        name:
          type: string
          description: >-
            A description to identify an specific account (e.g. "Test checking
            account")
        type:
          type: number
          format: double
          description: See Financial Institution Account Type Values.
        profile:
          type: number
          format: double
          description: See Financial Institution Account Profile Values
        accountNumber:
          type: string
          description: >-
            Bank Account Number or VAN if `virtualAccountRoutingPair` is equal
            to `true`.
        iban:
          type: string
          description: >-
            IBAN (International Bank Account Number) is an internationally
            agreed system of identifying bank accounts across national borders
        verified:
          type: boolean
          description: Indicates if the account is verified or not.
        verification:
          $ref: '#/components/schemas/FinancialInstitutionAccountVerification'
        source:
          type: number
          format: double
        routingNumber:
          type: string
          description: Bank Routing Number.
        token:
          type: string
          description: The Account Token.
        accountNumberLastFour:
          type: string
          description: The last 4 digits of the real account number.
        virtualAccountRoutingPair:
          type: boolean
          description: >-
            Indicates if account is using virtual/tokenized account and routing
            numbers (VANs/TANs) or not.
      title: schemas-Account
    Account Data_list-selected-accounts_Response_200:
      type: object
      properties:
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/schemas-Account'
      required:
        - accounts
      title: Account Data_list-selected-accounts_Response_200
    TransactionsTransactionIdPaymentPaymentProviderAccountsGetResponsesContentApplicationJsonSchemaErrorsItems:
      type: object
      properties:
        domain:
          type: string
        code:
          type: number
          format: double
        location:
          type: string
        message:
          type: string
        occurredAt:
          type: number
          format: double
      required:
        - domain
        - code
        - location
        - message
        - occurredAt
      title: >-
        TransactionsTransactionIdPaymentPaymentProviderAccountsGetResponsesContentApplicationJsonSchemaErrorsItems
    List-selected-accountsRequestBadRequestError:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: >-
              #/components/schemas/TransactionsTransactionIdPaymentPaymentProviderAccountsGetResponsesContentApplicationJsonSchemaErrorsItems
      required:
        - errors
      title: List-selected-accountsRequestBadRequestError
  securitySchemes:
    HTTPBasic:
      type: http
      scheme: basic
      description: ''

```

## SDK Code Examples

```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()
```