Welcome to our new developer portal! Use the "Ask" button to chat with our AI Agent.
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Use correlationID

Get and set a correlation ID for Tokenization tracking.

Overview

Each Tokenization process has an associated correlationID that you can share with Thales to help with troubleshooting.

This identifier can be obtained in two ways:

  • From a successful eligibility check or from a Tokenization error.

  • You can also assign your own custom correlationID when calling checkEligibility() .

SDK integration

Get correlationID from checkEligibility(...)

  • After successful checkEligibility(...)

    • After a successful eligibility check, read acceptanceData.correlationID.

    • Store this value if you need to trace the same Tokenization process later.

  • After error on checkEligibility(...)

    • Read or store correlationID as soon as the error is caught.

The following example explains how to get correlationID checkEligibility(...)

// Get correlationID during digitizeCard()
let cardDigitizationService = CardDigitizationService()
let authenticationToken = Data() // Issuer backend token for green flow enrollment.
let fcmToken = "FACY6074293608087656831WRF1234" // Example only.

do {
    try await cardDigitizationService.digitizeCard(
        withTNC: termsAndConditions.accept(),
        pushToken: fcmToken, // Firebase Cloud Messaging (FCM) token
        language: "en",
        authenticationToken: authenticationToken
    )
} catch let error as CardDigitizationService.Error {
    let returnedCorrelationID = error.correlationID
} catch let error as CardDigitizationService.DigitizeError {
    let returnedCorrelationID = error.correlationID
} catch {
    // Handle other errors.
}

for await state in await cardDigitizationService.eventStream {
    switch state {
    case let .digitizationApproved(digitalCardID):
        _ = digitalCardID
        return
    case let .errorEncountered(error):
        if let error = error as? CardDigitizationService.Error {
            let returnedCorrelationID = error.correlationID
        } else if let error = error as? CardDigitizationService.DigitizeError {
            let returnedCorrelationID = error.correlationID
        }
        return
        default:
        break
    }
}

Set a custom correlationID

You can set correlationID only in checkEligibility(...).

The following checkEligibility(...) variants support this parameter.

Use a custom value when you want to trace a Tokenization process across the issuer backend, the digital wallet application, and Thales logs.

You can also use your own identifier format, for example:

Set a custom correlationID with instrument data

Set a custom correlationID with a pushSessionID

Last updated

Was this helpful?