> 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.

# Get account users

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

This endpoint retrieves users' information from an Authorized Bank 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/get-user

## 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.

### Query parameters

- `expand` (list of enum, optional) — A field in the API response to be expanded in order for more details to be provided (e.g. customer.segmentedName).
  - Allowed values: `customer.segmentedName`, `names`, `contact`, `account.paymentProvider.routinginfo`, `account.paymentProvider.address`

## Response

### 200

OK

- `fingerprint` (string, optional) — Internal use only.
- `paymentProvider` (schemas-PaymentProvider, optional)
- `name` (list of any, optional) — Array of User Name's associated with the Bank Account.
- `address` (list of components-schemas-Address, optional) — Array of Addresses associated with the Bank Account. See Address Object.
- `phone` (list of any, optional) — Array of Phone Numbers associated with the Bank Account.
- `email` (list of any, optional) — Array of Email Addresses associated with the Bank Account.
- `createdAt` (integer, optional) — Timestamp representing the time the User Object was created.
- `updatedAt` (integer, optional) — Timestamp representing the time the User Object was last updated.
- `segmentedName` (SegmentedName, optional) — The segmented version of a given name.

## Errors

### 400 Bad Request Error

Bad Request

- `errors` (list of TransactionsTransactionIdPaymentPaymentProviderUserGetResponsesContentApplicationJsonSchemaErrorsItems, required)

## Types

### 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)

### 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.

### SegmentedName

The segmented version of a given name.

- `title` (string, optional) — The title of a given full name.
- `firstName` (string, optional) — The first name of a given full name.
- `middleName` (list of string, optional) — The list of middle names of a given full name.
- `lastName` (string, optional) — The last name of a given full name.
- `suffix` (string, optional) — The suffix of a given full name.

### TransactionsTransactionIdPaymentPaymentProviderUserGetResponsesContentApplicationJsonSchemaErrorsItems

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

## Examples

### Example User - Without Segmented Name

**Response**

```json
{
  "user": {
    "fingerprint": "iSnTsj6TTOmPjqN5kE44aMkGqvk=",
    "paymentProvider": {
      "paymentProviderId": "200005501",
      "type": 1,
      "name": "Demo Bank"
    },
    "name": [
      "John Smith",
      "Mary Smith"
    ],
    "address": [
      {
        "address1": "2000 Broadway Street",
        "address2": "",
        "city": "Redwood City",
        "state": "CA",
        "zip": "94063",
        "country": "US"
      },
      {
        "address1": "105 Alternate1 Street",
        "address2": "#401",
        "city": "Redmond",
        "state": "WA",
        "zip": "98052",
        "country": "US"
      },
      {
        "address1": "105 Alternate2 Street",
        "address2": "#402",
        "city": "Beverly Hills",
        "state": "CA",
        "zip": "90210",
        "country": "US"
      }
    ],
    "phone": [
      "2145553434"
    ],
    "email": [
      "jsmith@email.com"
    ],
    "createdAt": 1554390649215,
    "updatedAt": 1554390654214
  }
}
```

**SDK Code**

```python Example User - Without Segmented Name
import requests

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

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

print(response.json())
```

```javascript Example User - Without Segmented Name
const url = 'https://sandbox.trustly.one/api/v1/transactions/transactionId/payment/paymentProvider/user';
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 User - Without Segmented Name
package main

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

func main() {

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

	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 User - Without Segmented Name
require 'uri'
require 'net/http'

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

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 User - Without Segmented Name
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/user")
  .basicAuth("<username>", "<password>")
  .asString();
```

```php Example User - Without Segmented Name
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

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

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

```csharp Example User - Without Segmented Name
using RestSharp;
using RestSharp.Authenticators;

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

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

```swift Example User - Without Segmented Name
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/user")! 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()
```

### Example User - With Segmented Name

**Response**

```json
{
  "user": {
    "fingerprint": "iSnTsj6TTOmPjqN5kE44aMkGqvk=",
    "paymentProvider": {
      "paymentProviderId": "200005501",
      "type": 1,
      "name": "Demo Bank"
    },
    "name": [
      "John D Smith",
      "Mr. Anthony S Julius Smith II"
    ],
    "segmentedName": [
      {
        "fullName": "John D Smith",
        "firstName": "John",
        "middleName": [
          "D"
        ],
        "lastName": "Smith"
      },
      {
        "fullName": "Mr. Anthony S Julius Smith II",
        "title": "Mr.",
        "firstName": "Anthony",
        "middleName": [
          "S",
          "Julius"
        ],
        "lastName": "Smith",
        "suffix": "II"
      }
    ],
    "address": [
      {
        "address1": "2000 Broadway Street",
        "address2": "",
        "city": "Redwood City",
        "state": "CA",
        "zip": "94063",
        "country": "US"
      },
      {
        "address1": "105 Alternate1 Street",
        "address2": "#401",
        "city": "Redmond",
        "state": "WA",
        "zip": "98052",
        "country": "US"
      },
      {
        "address1": "105 Alternate2 Street",
        "address2": "#402",
        "city": "Beverly Hills",
        "state": "CA",
        "zip": "90210",
        "country": "US"
      }
    ],
    "phone": [
      "2145553434"
    ],
    "email": [
      "jsmith@email.com"
    ],
    "createdAt": 1554390649215,
    "updatedAt": 1554390654214
  }
}
```

**SDK Code**

```python Example User - With Segmented Name
import requests

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

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

print(response.json())
```

```javascript Example User - With Segmented Name
const url = 'https://sandbox.trustly.one/api/v1/transactions/transactionId/payment/paymentProvider/user';
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 User - With Segmented Name
package main

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

func main() {

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

	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 User - With Segmented Name
require 'uri'
require 'net/http'

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

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 User - With Segmented Name
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/user")
  .basicAuth("<username>", "<password>")
  .asString();
```

```php Example User - With Segmented Name
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

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

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

```csharp Example User - With Segmented Name
using RestSharp;
using RestSharp.Authenticators;

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

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

```swift Example User - With Segmented Name
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/user")! 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()
```