Overview

Set the PrimerHeadlessUniversalCheckoutRawDataManagerListener in order to receive different callbacks from Primer SDK.

onValidationChanged

KOTLIN
fun onValidationChanged(isValid: Boolean, errors: List<PrimerInputValidationError>)

Returns whether the rawData set by setRawData is valid, and all the errors that occurred during validation.

Parameters

onMetadataChanged

Returns metadata for the current data set by using the setRawData. This synchronous callback provides immediate metadata updates based on internal SDK calculations. Check the section below for the metadata types that can be returned.

KOTLIN
fun onMetadataChanged(metadata: PrimerPaymentMethodMetadata)

Parameters

onMetadataStateChanged

Returns metadata state for the current data set by using the setRawData.

In contrast to onMetadataChanged, this callback involves internal asynchronous operations, offering a broader and more accurate dataset that can be fetched remotely. Its dynamic nature enables you to access the current state of SDK operations, providing an opportunity to tailor the UI accordingly.

Check the section below for the metadata state types that can be returned.

KOTLIN
fun onMetadataStateChanged(metadataState: PrimerPaymentMethodMetadataState)

Parameters