> For the complete documentation index, see [llms.txt](https://developer.convergegate.com/legacy/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.convergegate.com/legacy/token-api/tokens/retrieve-a-token-by-transaction-id.md).

# Retrieve a token by transaction id

Retrieves the trustly token linked to the given transaction id if any.

<mark style="color:green;">`GET`</mark>` ``/v1/tokens/trustly/:id`

{% tabs %}
{% tab title="CURL" %}

```
curl https://testapi.txpmnts.com/v1/tokens/trustly/123456789 \
  -u sk_test_yFStF-KUmgr-7CoumuY2JA: \
  -H 'Content-Type: application/application/x-www-form-urlencoded' \
```

{% endtab %}
{% endtabs %}

The above command returns JSON structured like this:

```json
{
	"id": "aH79qManT3uP4vCKzUiryy",
	"type": "trustly",
	"client_ip": "127.0.0.1",
	"created_at": 1627464935,
	"fingerprint": "-hzCuTB1NmGekIyKul2aRAH2rMsbJwKUAvMmQfApbv8",
	"merchant": "7qc0R04oQ0uyGG8goQqHrg",
	"usage": "multiple_use",
	"customer": "7qc0R04oQ0uyGG8goQqHrg",
	"trustly": {
		"transaction_id": "123456789",
		"token": "-hzCuTB1NmGekIyKul2aRAH2rMsbJwKUAvMmQfApbv9",
		"reference": "reference-12345"
	}
}
```

## Arguments <a href="#arguments-3" id="arguments-3"></a>

| Parameter | Type   | Required | Description                                     |
| --------- | ------ | -------- | ----------------------------------------------- |
| id        | string | required | The transaction id linked to the desired token. |

## Returns <a href="#returns-3" id="returns-3"></a>

Returns a token if was created using the provided transaction id. Returns an error otherwise.
