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

# Get user verification details

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

Retrieve the verification results and details of a Trustly ID-enabled authorization transaction. The details returned by this endpoint are segmented into two lists: verifications and attributes. 

The verification objects contain the `name` and `result` of the verification as well as reason codes and reason descriptions corresponding to the results. If a verification includes a sanction screening and a match was returned, the results of the screening will also be included. If no `screeningResults` property is returned in the verification object, no match was returned.
>**Note:** Verifications are configured per application, check with your Trustly services team member for definitions of your configured verifications.

The attribute objects contain metadata which describe how the property was verified and a list of `verification` objects which apply to the attribute.

Reference: https://amer-beta.developers.trustly.com/api-reference/api/identity/get-trustly-id-user-details

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Trustly API
  version: 1.0.0
paths:
  /transactions/{transactionId}/user/detail:
    get:
      operationId: get-trustly-id-user-details
      summary: Get user verification details
      description: >-
        Retrieve the verification results and details of a Trustly ID-enabled
        authorization transaction. The details returned by this endpoint are
        segmented into two lists: verifications and attributes. 


        The verification objects contain the `name` and `result` of the
        verification as well as reason codes and reason descriptions
        corresponding to the results. If a verification includes a sanction
        screening and a match was returned, the results of the screening will
        also be included. If no `screeningResults` property is returned in the
        verification object, no match was returned.

        >**Note:** Verifications are configured per application, check with your
        Trustly services team member for definitions of your configured
        verifications.


        The attribute objects contain metadata which describe how the property
        was verified and a list of `verification` objects which apply to the
        attribute.
      tags:
        - subpackage_identity
      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.

            Supported values:
             * `verification`: returns human-readable reason rules and descriptions.
          required: false
          schema:
            type: array
            items:
              $ref: >-
                #/components/schemas/TransactionsTransactionIdUserDetailGetParametersExpandSchemaItems
        - name: Authorization
          in: header
          description: ''
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserVerificationDetail'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Get-trustly-id-user-detailsRequestBadRequestError
servers:
  - url: https://sandbox.trustly.one/api/v1
    description: Sandbox
components:
  schemas:
    TransactionsTransactionIdUserDetailGetParametersExpandSchemaItems:
      type: string
      enum:
        - verification
      title: TransactionsTransactionIdUserDetailGetParametersExpandSchemaItems
    UserVerificationResultCode:
      type: string
      enum:
        - '1'
        - '2'
        - '3'
      description: |-
        A code indicating the final outcome of the verification. May be:
        * `1`: the verification was rejected.
        * `2`: the verification was inconclusive.
        * `3`: the verification was approved.
      title: UserVerificationResultCode
    UserVerificationErrorCode:
      type: string
      enum:
        - '-1'
        - '1'
        - '2'
        - '3'
        - '4'
        - '5'
        - '6'
      description: >-
        An error code indicating why the user verification has failed. May be:

        * `-1`: no error. the verification was successful.

        * `1`: there was an internal, unspecified error (should not happen).

        * `2`: the user is below the minimum age.

        * `3`: some of the attributes did not meet the minimum verification
        criteria.

        * `4`: some mandatory attributes are not available.

        * `5`: the user was identified as a person who is deceased.

        * `6`: entries were matched during the screening process
      title: UserVerificationErrorCode
    UserVerificationReason:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/UserVerificationErrorCode'
        reason:
          type: string
          description: Descriptive text, in English, on why the user verification failed.
      description: An object describing why an user verification has succeeded or failed.
      title: UserVerificationReason
    ScreeningResultScreeningType:
      type: string
      enum:
        - '1'
        - '2'
        - '3'
      description: |-
        Type of screening being performed. May be:
        * `1`: Watchlist Screening.
        * `2`: Adverse Media Screening.
        * `3`: PEP Screening.
      title: ScreeningResultScreeningType
    WatchlistScreeningResultGender:
      type: string
      enum:
        - male
        - female
      description: Gender of the user.
      title: WatchlistScreeningResultGender
    WatchlistScreeningResult:
      type: object
      properties:
        screeningType:
          $ref: '#/components/schemas/ScreeningResultScreeningType'
        score:
          type: number
          format: double
          description: Match score indicating the strength of a match.
        name:
          type: string
          description: Name of the user.
        aliases:
          type: array
          items:
            type: string
          description: List of known aliases.
        dateOfBirth:
          type: string
          format: date
          description: Date of birth.
        nationality:
          type: string
          description: Nationality.
        source:
          type: string
          description: Source of the information.
        sourceRegion:
          type: string
          description: Region of the source.
        remarks:
          type: string
          description: Additional remarks.
        caution:
          type: string
          description: Caution notes.
        url:
          type: string
          format: uri
          description: Source's URL.
        address:
          type: string
          description: Full street address of the user with city and country.
        gender:
          $ref: '#/components/schemas/WatchlistScreeningResultGender'
          description: Gender of the user.
        designationDate:
          type: string
          format: date
          description: Designation date.
        trustedEntity:
          type: string
          description: The name of the entity that provided the watchlist match.
      description: Screening information for Watchlist Screening.
      title: WatchlistScreeningResult
    AdversityMediaScreeningResult:
      type: object
      properties:
        screeningType:
          $ref: '#/components/schemas/ScreeningResultScreeningType'
        score:
          type: number
          format: double
          description: Match score indicating the strength of a match.
        name:
          type: string
          description: Name of the user.
        text:
          type: string
          description: Text description.
        url:
          type: string
          description: Source's URL.
        title:
          type: string
          description: The adverse media title.
        date:
          type: string
          format: date
          description: The adverse media date.
        trustedEntity:
          type: string
          description: The name of the entity that provided the adverse media match.
      description: Screening information for Adversity Media Screening.
      title: AdversityMediaScreeningResult
    PEPScreeningResult:
      type: object
      properties:
        screeningType:
          $ref: '#/components/schemas/ScreeningResultScreeningType'
        score:
          type: number
          format: double
          description: Match score indicating the strength of a match.
        name:
          type: string
          description: Name of the user.
        dateOfBirth:
          type: string
          format: date
          description: Date of birth.
        contry:
          type: string
          description: Country.
        professionalHistory:
          type: array
          items:
            type: string
        trustedEntity:
          type: string
          description: The name of the entity that provided the PEP match.
      description: Screening information for PEP Screening.
      title: PEPScreeningResult
    ScreeningResultItems:
      oneOf:
        - $ref: '#/components/schemas/WatchlistScreeningResult'
        - $ref: '#/components/schemas/AdversityMediaScreeningResult'
        - $ref: '#/components/schemas/PEPScreeningResult'
      title: ScreeningResultItems
    ScreeningResult:
      type: array
      items:
        $ref: '#/components/schemas/ScreeningResultItems'
      title: ScreeningResult
    UserVerificationResult:
      type: object
      properties:
        result:
          $ref: '#/components/schemas/UserVerificationResultCode'
        reasons:
          type: array
          items:
            $ref: '#/components/schemas/UserVerificationReason'
        screeningResult:
          type: array
          items:
            $ref: '#/components/schemas/ScreeningResult'
      description: Details on the user verification.
      title: UserVerificationResult
    AttributeVerificationDetailName:
      type: string
      enum:
        - taxId
        - name
        - address
        - phone
        - dateOfBirth
        - email
        - driverLicense
        - deceased
      description: Which attribute does this entry refer to.
      title: AttributeVerificationDetailName
    AttributeVerificationDetailSource:
      type: object
      properties:
        name:
          type: string
          description: The name of the entity where the attribute value was fetched from.
        type:
          type: integer
          description: >-
            Indicates the type of the entity that provided this piece of data.
            It can be:

            * `1` the data came from a financial institution.

            * `2` the data came from the user.

            * `4` the data came from an external provider.

            * `5` the data came from the merchant.
      title: AttributeVerificationDetailSource
    AttributeVerificationMethod:
      type: integer
      description: |-
        Indicates which type of verification was performed. It can be:
        * `1` means electronic identity verification.
        * `2` meaning it is manual document verification.
        * `3` meaning it is OCR verification.
        * `4` meaning it is Trusted Entity.
      title: AttributeVerificationMethod
    AttributeVerificationResult:
      type: integer
      description: >-
        Indicates the result of the individual attribute verification. It can
        be:

        * `1` meaning the attribute did not match the expected value.

        * `2` meaning the result was inconclusive.

        * `3` meaning attribute did match the expected attribute.
      title: AttributeVerificationResult
    AttributeVerification:
      type: object
      properties:
        trustedEntity:
          type: string
          description: The name of the entity that verified the attribute.
        verificationType:
          type: integer
          description: >-
            Indicates the type of the entity that verified this piece of data.
            It can be:

            * `1` verified by a financial institution.

            * `2` verified by user input.

            * `3` verified by the Trustly internal database.

            * `4` verified by an external provider.
        verificationMethod:
          $ref: '#/components/schemas/AttributeVerificationMethod'
        result:
          $ref: '#/components/schemas/AttributeVerificationResult'
        verifiedAt:
          type: integer
          format: int64
          description: >-
            Unix Timestamp in milliseconds (since the epoch) when the
            verification took place.
      title: AttributeVerification
    AttributeVerificationDetail:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/AttributeVerificationDetailName'
          description: Which attribute does this entry refer to.
        source:
          $ref: '#/components/schemas/AttributeVerificationDetailSource'
        createdAt:
          type: integer
          format: int64
          description: >-
            Unix Timestamp in milliseconds (since the epoch) when the attribute
            was fetched from an external source and associated with the user.
        link:
          type: string
          description: Link to user attribute using JSON pointer syntax.
        verification:
          type: array
          items:
            $ref: '#/components/schemas/AttributeVerification'
      description: Attribute details as part of a Trustly ID user verification details
      title: AttributeVerificationDetail
    UserVerificationDetailDetail:
      type: object
      properties:
        verification:
          type: array
          items:
            $ref: '#/components/schemas/UserVerificationResult'
        attribute:
          type: array
          items:
            $ref: '#/components/schemas/AttributeVerificationDetail'
      title: UserVerificationDetailDetail
    UserVerificationDetail:
      type: object
      properties:
        detail:
          $ref: '#/components/schemas/UserVerificationDetailDetail'
      title: UserVerificationDetail
    TransactionsTransactionIdUserDetailGetResponsesContentApplicationJsonSchemaErrorsItems:
      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: >-
        TransactionsTransactionIdUserDetailGetResponsesContentApplicationJsonSchemaErrorsItems
    Get-trustly-id-user-detailsRequestBadRequestError:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: >-
              #/components/schemas/TransactionsTransactionIdUserDetailGetResponsesContentApplicationJsonSchemaErrorsItems
      required:
        - errors
      title: Get-trustly-id-user-detailsRequestBadRequestError
  securitySchemes:
    HTTPBasic:
      type: http
      scheme: basic
      description: ''

```

## Examples

### All fields verified - PEP Screening matched



**Response**

```json
{
  "detail": {
    "verification": [
      {
        "result": 3,
        "verificationName": "Basic Verification v1"
      },
      {
        "result": 3,
        "verificationName": "Full Verification NJ v2"
      },
      {
        "result": 3,
        "verificationName": "Watchlist Screening"
      },
      {
        "result": 3,
        "verificationName": "Adverse Media Screening"
      },
      {
        "result": 1,
        "screeningResult": [
          [
            {
              "screeningType": 3,
              "score": 1,
              "name": "Bernard Sanders",
              "dateOfBirth": "1941-09-08",
              "trustedEntity": "External Service #1",
              "country": "United States",
              "professionalHistory": [
                "Early Activism",
                "Founding the Liberty Union Party",
                "Mayor of Burlington",
                "Congressional Service",
                "U.S. Senate Career",
                "Presidential Campaigns",
                "Authorship",
                "Committee Assignments",
                "Advocacy for Progressive Policies",
                "Democratic Socialism"
              ]
            }
          ]
        ],
        "verificationName": "PEP Screening"
      }
    ],
    "attribute": [
      {
        "name": "name",
        "source": {
          "name": "Bank of Trustly",
          "type": 1
        },
        "createdAt": 1705516187371,
        "link": "user/name",
        "verification": [
          {
            "trustedEntity": "External Service #1",
            "verificationType": 4,
            "verificationMethod": 1,
            "result": 3,
            "verifiedAt": 1705516186882
          }
        ]
      },
      {
        "name": "email",
        "source": {
          "name": "Bank of Trustly",
          "type": 1
        },
        "createdAt": 1705516187348,
        "link": "user/email/0",
        "verification": [
          {
            "trustedEntity": "External Service #1",
            "verificationType": 5,
            "verificationMethod": 1,
            "result": 3,
            "verifiedAt": 1705516176223
          }
        ]
      },
      {
        "name": "phone",
        "source": {
          "name": "Bank of Trustly",
          "type": 1
        },
        "createdAt": 1705516187358,
        "link": "user/phone/0",
        "verification": [
          {
            "trustedEntity": "External Service #1",
            "verificationType": 4,
            "verificationMethod": 1,
            "result": 3,
            "verifiedAt": 1705516186882
          }
        ]
      },
      {
        "name": "address",
        "source": {
          "name": "Bank of Trustly",
          "type": 1
        },
        "createdAt": 1705516187364,
        "link": "user/address/0",
        "verification": [
          {
            "trustedEntity": "External Service #1",
            "verificationType": 4,
            "verificationMethod": 1,
            "result": 3,
            "verifiedAt": 1705516186882
          }
        ]
      },
      {
        "name": "dateOfBirth",
        "source": {
          "name": "External Service #1",
          "type": 4
        },
        "createdAt": 1705516187390,
        "link": "user/dateOfBirth",
        "verification": [
          {
            "trustedEntity": "External Service #1",
            "verificationType": 4,
            "verificationMethod": 1,
            "result": 3,
            "verifiedAt": 1705516186882
          }
        ]
      },
      {
        "name": "taxId",
        "source": {
          "name": "External Service #1",
          "type": 4
        },
        "createdAt": 1705516187394,
        "link": "user/taxId",
        "verification": [
          {
            "trustedEntity": "External Service #1",
            "verificationType": 4,
            "verificationMethod": 1,
            "result": 3,
            "verifiedAt": 1705516186882
          }
        ]
      },
      {
        "name": "driverLicense",
        "source": {
          "name": "Globex",
          "type": 5
        },
        "createdAt": 1705516187356
      }
    ]
  }
}
```

**SDK Code**

```python All fields verified - PEP Screening matched
import requests

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

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

print(response.json())
```

```javascript All fields verified - PEP Screening matched
const url = 'https://sandbox.trustly.one/api/v1/transactions/transactionId/user/detail';
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 All fields verified - PEP Screening matched
package main

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

func main() {

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

	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 All fields verified - PEP Screening matched
require 'uri'
require 'net/http'

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

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 All fields verified - PEP Screening matched
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/user/detail")
  .basicAuth("<username>", "<password>")
  .asString();
```

```php All fields verified - PEP Screening matched
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

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

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

```csharp All fields verified - PEP Screening matched
using RestSharp;
using RestSharp.Authenticators;

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

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

```swift All fields verified - PEP Screening matched
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/user/detail")! 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()
```

### Some manual input - Screening succeeded



**Response**

```json
{
  "detail": {
    "verification": [
      {
        "result": 3,
        "verificationName": "Basic Verification v1"
      },
      {
        "result": 1,
        "verificationName": "Full Verification NJ v2",
        "reason": [
          {
            "code": 4
          }
        ]
      },
      {
        "result": 3,
        "verificationName": "Watchlist Screening"
      },
      {
        "result": 3,
        "verificationName": "Adverse Media Screening"
      },
      {
        "result": 3,
        "verificationName": "PEP Screening"
      }
    ],
    "attribute": [
      {
        "name": "name",
        "source": {
          "name": "Bank of Trustly",
          "type": 1
        },
        "createdAt": 1705514274919,
        "link": "user/name",
        "verification": [
          {
            "trustedEntity": "LexisNexis Accurint",
            "verificationType": 4,
            "verificationMethod": 5,
            "result": 3,
            "verifiedAt": 1705514274383
          }
        ]
      },
      {
        "name": "email",
        "source": {
          "name": "Bank of Trustly",
          "type": 1
        },
        "createdAt": 1705514274926,
        "link": "user/email/0",
        "verification": [
          {
            "trustedEntity": "LexisNexis Accurint",
            "verificationType": 4,
            "verificationMethod": 5,
            "result": 3,
            "verifiedAt": 1705514274383
          }
        ]
      },
      {
        "name": "phone",
        "source": {
          "name": "Bank of Trustly",
          "type": 1
        },
        "createdAt": 1705514274931,
        "link": "user/phone/0",
        "verification": [
          {
            "trustedEntity": "LexisNexis Accurint",
            "verificationType": 4,
            "verificationMethod": 5,
            "result": 3,
            "verifiedAt": 1705514274383
          }
        ]
      },
      {
        "name": "address",
        "source": {
          "name": "Bank of Trustly",
          "type": 1
        },
        "createdAt": 1705514274938,
        "link": "user/address/0",
        "verification": [
          {
            "trustedEntity": "LexisNexis Accurint",
            "verificationType": 4,
            "verificationMethod": 5,
            "result": 3,
            "verifiedAt": 1705514274383
          }
        ]
      },
      {
        "name": "dateOfBirth",
        "source": {
          "type": 2
        },
        "createdAt": 1705514274946,
        "link": "user/dateOfBirth",
        "verification": [
          {
            "trustedEntity": "LexisNexis Accurint",
            "verificationType": 4,
            "verificationMethod": 5,
            "result": 3,
            "verifiedAt": 1705514274384
          }
        ]
      },
      {
        "name": "taxId",
        "source": {
          "type": 2
        },
        "createdAt": 1705514274953,
        "link": "user/taxId",
        "verification": [
          {
            "trustedEntity": "LexisNexis Accurint",
            "verificationType": 4,
            "verificationMethod": 5,
            "result": 3,
            "verifiedAt": 1705514274384
          }
        ]
      }
    ]
  }
}
```

**SDK Code**

```python Some manual input - Screening succeeded
import requests

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

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

print(response.json())
```

```javascript Some manual input - Screening succeeded
const url = 'https://sandbox.trustly.one/api/v1/transactions/transactionId/user/detail';
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 Some manual input - Screening succeeded
package main

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

func main() {

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

	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 Some manual input - Screening succeeded
require 'uri'
require 'net/http'

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

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 Some manual input - Screening succeeded
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/user/detail")
  .basicAuth("<username>", "<password>")
  .asString();
```

```php Some manual input - Screening succeeded
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

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

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

```csharp Some manual input - Screening succeeded
using RestSharp;
using RestSharp.Authenticators;

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

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

```swift Some manual input - Screening succeeded
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/user/detail")! 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()
```

### Verified user with expanded reasons - All screening matches



**Response**

```json
{
  "detail": {
    "verification": [
      {
        "result": 3,
        "verificationName": "Basic Verification v1",
        "reason": [
          {
            "description": "The following attributes were verified with a match: [TAX_ID, NAME]"
          }
        ]
      },
      {
        "result": 1,
        "verificationName": "Full Verification NJ v2",
        "reason": [
          {
            "description": "The following attributes could not be verified with a match: [EMAIL, ADDRESS, PHONE]",
            "code": 4
          }
        ]
      },
      {
        "result": 1,
        "screeningResult": [
          [
            {
              "screeningType": 1,
              "score": 0.96,
              "name": "Carlos Ramirez",
              "aliases": [
                "El Lobo",
                "Carlos the Viper",
                "La Sombra"
              ],
              "dateOfBirth": "1978-06-03",
              "nationality": "Colombian",
              "source": "International Criminal Watchlist",
              "sourceRegion": "Latin America",
              "remarks": "Involved in organized drug trafficking, and violent cartel operations.",
              "caution": "Considered a high-priority target by law enforcement and anti-narcotics agencies.",
              "url": "https://www.securitywatchlist.org/",
              "trustedEntity": "External Service #1"
            }
          ],
          [
            {
              "screeningType": 1,
              "score": 0.95,
              "name": "Carlos Ramirez",
              "aliases": [
                "El Lobo"
              ],
              "dateOfBirth": "1978-06-03",
              "nationality": "Colombian",
              "source": "International Criminal Watchlist",
              "sourceRegion": "Latin America",
              "remarks": "Involved in organized drug trafficking, and violent cartel operations.",
              "caution": "Considered a high-priority target by law enforcement and anti-narcotics agencies.",
              "url": "https://www.interpol.int/",
              "trustedEntity": "External Service #2"
            }
          ],
          [
            {
              "screeningType": 1,
              "score": 0.89,
              "name": "Carlos Ramirez",
              "dateOfBirth": "1978-06-03",
              "nationality": "Colombian",
              "source": "International Criminal Watchlist",
              "caution": "Subject is considered highly dangerous and involved in organized drug trafficking, human smuggling, and violent cartel operations.",
              "url": "https://www.interpol.int/",
              "address": "4567 Calle del Diablo, Bogotá",
              "gender": "male",
              "designationDate": "2012-05-17",
              "trustedEntity": "External Service #3"
            }
          ]
        ],
        "verificationName": "Watchlist Screening"
      },
      {
        "result": 1,
        "screeningResult": [
          [
            {
              "screeningType": 2,
              "score": 0.87,
              "name": "Carlos Ramirez",
              "url": "https://www.securitywatchlist.org/",
              "trustedEntity": "External Service #1",
              "text": "Carlos Ramirez is a known figure associated with organized crime, including drug trafficking, and violent cartel operations. He is linked to multiple criminal organizations across Latin America."
            }
          ],
          [
            {
              "screeningType": 2,
              "score": 0.9,
              "name": "Carlos Ramirez",
              "url": "https://www.securitywatchlist.org/",
              "trustedEntity": "External Service #2",
              "title": "Carlos Ramirez: Key Player in Drug Trafficking and Organized Crime in Latin America",
              "text": "Carlos Ramirez is a notorious figure linked to drug cartels, and violent criminal organizations across Latin America. His activities have led to significant international law enforcement operations.",
              "date": "2015-06-12"
            }
          ]
        ],
        "verificationName": "Adverse Media Screening"
      },
      {
        "result": 1,
        "screeningResult": [
          [
            {
              "screeningType": 3,
              "score": 0.93,
              "name": "Carlos Ramirez",
              "dateOfBirth": "1978-06-03",
              "trustedEntity": "External Service #1",
              "country": "Colombia",
              "professionalHistory": [
                "Drug Trafficker",
                "Organized Crime Leader"
              ]
            }
          ]
        ],
        "verificationName": "PEP Screening"
      }
    ],
    "attribute": [
      {
        "name": "name",
        "source": {
          "name": "Bank of Trustly",
          "type": 1
        },
        "createdAt": 1705516187371,
        "link": "user/name",
        "verification": [
          {
            "trustedEntity": "External Service #1",
            "verificationType": 4,
            "verificationMethod": 1,
            "result": 3,
            "verifiedAt": 1705516186882
          }
        ]
      },
      {
        "name": "email",
        "source": {
          "name": "Bank of Trustly",
          "type": 1
        },
        "createdAt": 1705516187348,
        "link": "user/email/0",
        "verification": [
          {
            "trustedEntity": "External Service #1",
            "verificationType": 5,
            "verificationMethod": 1,
            "result": 3,
            "verifiedAt": 1705516176223
          }
        ]
      },
      {
        "name": "phone",
        "source": {
          "name": "Bank of Trustly",
          "type": 1
        },
        "createdAt": 1705516187358,
        "link": "user/phone/0",
        "verification": [
          {
            "trustedEntity": "External Service #1",
            "verificationType": 4,
            "verificationMethod": 1,
            "result": 3,
            "verifiedAt": 1705516186882
          }
        ]
      },
      {
        "name": "address",
        "source": {
          "name": "Bank of Trustly",
          "type": 1
        },
        "createdAt": 1705516187364,
        "link": "user/address/0",
        "verification": [
          {
            "trustedEntity": "External Service #1",
            "verificationType": 4,
            "verificationMethod": 1,
            "result": 3,
            "verifiedAt": 1705516186882
          }
        ]
      },
      {
        "name": "dateOfBirth",
        "source": {
          "name": "Bank of Trustly",
          "type": 1
        },
        "createdAt": 1705516187390,
        "link": "user/dateOfBirth",
        "verification": [
          {
            "trustedEntity": "External Service #1",
            "verificationType": 4,
            "verificationMethod": 1,
            "result": 3,
            "verifiedAt": 1705516186882
          }
        ]
      },
      {
        "name": "taxId",
        "source": {
          "name": "External Service #1",
          "type": 4
        },
        "createdAt": 1705516187394,
        "link": "user/taxId",
        "verification": [
          {
            "trustedEntity": "External Service #1",
            "verificationType": 4,
            "verificationMethod": 1,
            "result": 3,
            "verifiedAt": 1705516186882
          }
        ]
      },
      {
        "name": "driverLicense",
        "source": {
          "name": "Globex",
          "type": 5
        },
        "createdAt": 1705516187356,
        "link": "user/driverLicense"
      }
    ]
  }
}
```

**SDK Code**

```python Verified user with expanded reasons - All screening matches
import requests

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

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

print(response.json())
```

```javascript Verified user with expanded reasons - All screening matches
const url = 'https://sandbox.trustly.one/api/v1/transactions/transactionId/user/detail';
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 Verified user with expanded reasons - All screening matches
package main

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

func main() {

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

	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 Verified user with expanded reasons - All screening matches
require 'uri'
require 'net/http'

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

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 Verified user with expanded reasons - All screening matches
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/user/detail")
  .basicAuth("<username>", "<password>")
  .asString();
```

```php Verified user with expanded reasons - All screening matches
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

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

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

```csharp Verified user with expanded reasons - All screening matches
using RestSharp;
using RestSharp.Authenticators;

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

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

```swift Verified user with expanded reasons - All screening matches
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/user/detail")! 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()
```

### Identity verification failed - Does not perform screening



**Response**

```json
{
  "detail": {
    "verification": [
      {
        "result": 1,
        "verificationName": "Basic Verification",
        "reason": [
          {
            "description": "The following attributes could not be verified with a match: [TAX_ID, NAME, EMAIL, ADDRESS, PHONE, DATE_OF_BIRTH]",
            "code": 4
          }
        ]
      },
      {
        "result": 1,
        "verificationName": "Watchlist Screening"
      },
      {
        "result": 1,
        "verificationName": "Adverse Media Screening"
      },
      {
        "result": 1,
        "verificationName": "PEP Screening"
      }
    ],
    "attribute": [
      {
        "name": "name",
        "source": {
          "name": "Bank of Trustly",
          "type": 1
        },
        "createdAt": 1705516187371,
        "link": "user/name",
        "verification": [
          {
            "trustedEntity": "External Service #1",
            "verificationType": 4,
            "verificationMethod": 1,
            "result": 1,
            "verifiedAt": 1705516186882
          }
        ]
      },
      {
        "name": "email",
        "source": {
          "name": "Bank of Trustly",
          "type": 1
        },
        "createdAt": 1705516187348,
        "link": "user/email/0",
        "verification": [
          {
            "trustedEntity": "External Service #1",
            "verificationType": 5,
            "verificationMethod": 1,
            "result": 1,
            "verifiedAt": 1705516176223
          }
        ]
      },
      {
        "name": "phone",
        "source": {
          "name": "Bank of Trustly",
          "type": 1
        },
        "createdAt": 1705516187358,
        "link": "user/phone/0",
        "verification": [
          {
            "trustedEntity": "External Service #1",
            "verificationType": 4,
            "verificationMethod": 1,
            "result": 1,
            "verifiedAt": 1705516186882
          }
        ]
      },
      {
        "name": "address",
        "source": {
          "name": "Bank of Trustly",
          "type": 1
        },
        "createdAt": 1705516187364,
        "link": "user/address/0",
        "verification": [
          {
            "trustedEntity": "External Service #1",
            "verificationType": 4,
            "verificationMethod": 1,
            "result": 1,
            "verifiedAt": 1705516186882
          }
        ]
      },
      {
        "name": "dateOfBirth",
        "source": {
          "name": "Bank of Trustly",
          "type": 1
        },
        "createdAt": 1705516187390,
        "link": "user/dateOfBirth",
        "verification": [
          {
            "trustedEntity": "External Service #1",
            "verificationType": 4,
            "verificationMethod": 1,
            "result": 1,
            "verifiedAt": 1705516186882
          }
        ]
      },
      {
        "name": "taxId",
        "source": {
          "name": "External Service #1",
          "type": 4
        },
        "createdAt": 1705516187394,
        "link": "user/taxId",
        "verification": [
          {
            "trustedEntity": "External Service #1",
            "verificationType": 4,
            "verificationMethod": 1,
            "result": 1,
            "verifiedAt": 1705516186882
          }
        ]
      },
      {
        "name": "driverLicense",
        "source": {
          "name": "Globex",
          "type": 5
        },
        "createdAt": 1705516187356,
        "link": "user/driverLicense"
      }
    ]
  }
}
```

**SDK Code**

```python Identity verification failed - Does not perform screening
import requests

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

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

print(response.json())
```

```javascript Identity verification failed - Does not perform screening
const url = 'https://sandbox.trustly.one/api/v1/transactions/transactionId/user/detail';
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 Identity verification failed - Does not perform screening
package main

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

func main() {

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

	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 Identity verification failed - Does not perform screening
require 'uri'
require 'net/http'

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

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 Identity verification failed - Does not perform screening
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/user/detail")
  .basicAuth("<username>", "<password>")
  .asString();
```

```php Identity verification failed - Does not perform screening
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

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

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

```csharp Identity verification failed - Does not perform screening
using RestSharp;
using RestSharp.Authenticators;

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

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

```swift Identity verification failed - Does not perform screening
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/user/detail")! 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()
```