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

# 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**</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/get-user

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Trustly API
  version: 1.0.0
paths:
  /transactions/{transactionId}/payment/paymentProvider/user:
    get:
      operationId: get-user
      summary: Get account users
      description: >-
        This endpoint retrieves users' information from an Authorized Bank
        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: expand
          in: query
          description: >-
            A field in the API response to be expanded in order for more details
            to be provided (e.g. customer.segmentedName).
          required: false
          schema:
            type: array
            items:
              $ref: >-
                #/components/schemas/TransactionsTransactionIdPaymentPaymentProviderUserGetParametersExpandSchemaItems
        - name: Authorization
          in: header
          description: ''
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FIUser'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Get-userRequestBadRequestError'
servers:
  - url: https://sandbox.trustly.one/api/v1
components:
  schemas:
    TransactionsTransactionIdPaymentPaymentProviderUserGetParametersExpandSchemaItems:
      type: string
      enum:
        - customer.segmentedName
        - names
        - contact
        - account.paymentProvider.routinginfo
        - account.paymentProvider.address
      title: >-
        TransactionsTransactionIdPaymentPaymentProviderUserGetParametersExpandSchemaItems
    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
    SegmentedName:
      type: object
      properties:
        title:
          type: string
          description: The title of a given full name.
        firstName:
          type: string
          description: The first name of a given full name.
        middleName:
          type: array
          items:
            type: string
          description: The list of middle names of a given full name.
        lastName:
          type: string
          description: The last name of a given full name.
        suffix:
          type: string
          description: The suffix of a given full name.
      description: The segmented version of a given name.
      title: SegmentedName
    FIUser:
      type: object
      properties:
        fingerprint:
          type: string
          description: Internal use only.
        paymentProvider:
          $ref: '#/components/schemas/schemas-PaymentProvider'
        name:
          type: array
          items:
            description: Any type
          description: Array of User Name's associated with the Bank Account.
        address:
          type: array
          items:
            $ref: '#/components/schemas/components-schemas-Address'
          description: >-
            Array of Addresses associated with the Bank Account. See Address
            Object.
        phone:
          type: array
          items:
            description: Any type
          description: Array of Phone Numbers associated with the Bank Account.
        email:
          type: array
          items:
            description: Any type
          description: Array of Email Addresses associated with the Bank Account.
        createdAt:
          type: integer
          description: Timestamp representing the time the User Object was created.
        updatedAt:
          type: integer
          description: Timestamp representing the time the User Object was last updated.
        segmentedName:
          $ref: '#/components/schemas/SegmentedName'
      description: Financial Institution User
      title: FIUser
    TransactionsTransactionIdPaymentPaymentProviderUserGetResponsesContentApplicationJsonSchemaErrorsItems:
      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: >-
        TransactionsTransactionIdPaymentPaymentProviderUserGetResponsesContentApplicationJsonSchemaErrorsItems
    Get-userRequestBadRequestError:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: >-
              #/components/schemas/TransactionsTransactionIdPaymentPaymentProviderUserGetResponsesContentApplicationJsonSchemaErrorsItems
      required:
        - errors
      title: Get-userRequestBadRequestError
  securitySchemes:
    HTTPBasic:
      type: http
      scheme: basic
      description: ''

```

## SDK Code Examples

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

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