Skip to main content

A. Managing Authentication Results

After an item is successfully submitted through the Entrupy Android SDK's capture flow, the journey of an authentication is not yet complete. The CaptureCallback interface provides onCaptureStarted() to confirm the capture flow has launched, and onCaptureError() to report any errors during capture. The definitive authentication result (e.g., Authentic, Unidentified) is determined by Entrupy's backend systems and delivered asynchronously via webhooks to your backend server.

This guide provides an overview of how to think about these results and introduces concepts that will be further detailed in the SDK Reference, particularly concerning the Detail View.

1. Understanding the Result Lifecycle

  1. Capture Flow Confirmation: The CaptureCallback only reports whether the capture flow started successfully (onCaptureStarted()) or encountered an error (onCaptureError()). It does not deliver authentication results. Once the capture flow completes, Entrupy's backend processes the submission and delivers the result — including a unique Entrupy ID, status information, and echoed item metadata — via webhook to your backend server.

    Your backend should store the Entrupy ID, associating it with your customer_item_id, to track the authentication status.

  2. Asynchronous Result Delivery: The final authentication result is typically delivered asynchronously.

    • Webhooks (Recommended for Backend): The most robust way to receive final results is by configuring webhooks from the Entrupy API to your backend server. Your backend can then update your system of record and notify your app as needed.
    • API Polling/Refreshing: Making direct requests to the Entrupy API to receive results is also an option if webhooks are not a fit for your deployment.
    • SDK Polling/Refreshing: The SDK provides mechanisms to refresh or fetch the latest status of a submission, often used when displaying a list of authentications or a specific item's detail view.
  3. Interpreting the Final Result: The final result will categorize the item (e.g., Authentic, Unidentified, Not Supported, Invalid). Along with this primary result, you may also receive:

    • Result reason text: For Invalid or Not Supported outcomes, data aligned with the Entrupy API includes status.result.reason: a human-readable explanation for the outcome, which may include custom messaging from Entrupy when applicable. Treat it as display copy, not a fixed set of codes; see the API Data Model.
    • Certificate Information: For authentic items, a link to a digital certificate of authenticity.
    • Flags: Information about any issues or flags raised on the item (see Handling Result Flags).
    • Catalog Data: Rich product information, condition details, and market data displayed in the Detail View.
    • Event Timeline: A history of events related to the authentication.

2. Key Identifiers

When managing results, keep track of these important identifiers:

  • customer_item_id: Your internal unique identifier for the item. This is important for correlating Entrupy's results with your own inventory or records.
  • Entrupy ID: The unique ID generated by Entrupy for each authentication attempt. This is used when querying the API or SDK for updates, viewing an item's certificate or when referencing a specific authentication with Entrupy support.

3. Displaying Results in the SDK

The Entrupy Android SDK often provides UI components to display authentication results, most notably the Detail View.

  • Linking to Detail View: Once you have an Entrupy ID, you can typically use it to launch or present the SDK's Detail View for that specific item. This view is designed to show:
    • The final authentication result.
    • ETAs if the result is still pending.
    • Flags associated with the item.
    • Relevant Catalog Data.
    • Certificate access.
    • Communication/support options for that item.

Full details on how to invoke and use the Detail View are in the SDK Reference: Detail View Controller.

Example of handling webhook result data on your backend (conceptual):

// On your backend server, when you receive the webhook payload:
// val entrupyId = webhookPayload["entrupy_id"] // Unique ID for the authentication
// val resultStatus = webhookPayload["status"] // e.g., "Authentic", "Unidentified"
// val customerItemId = webhookPayload["customer_item_id"]

// Store the entrupyId and associate it with your customer_item_id
// Notify your app: "Authentication complete for item $customerItemId"
// Use the entrupyId to show the Detail View in the SDK

4. Next Steps