Retrieve a token by transaction id

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

GET /v1/tokens/trustly/:id

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

The above command returns JSON structured like this:

{
	"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

Parameter
Type
Required
Description

id

string

required

The transaction id linked to the desired token.

Returns

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

Last updated