> ## Documentation Index
> Fetch the complete documentation index at: https://primer.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# provideNolPayUnlinkCardComponent

This method allows you get a new instance of `NolPayUnlinkCardComponent` that can be used to unlink existing
nol Pay cards.

```kotlin KOTLIN theme={"dark"}
fun provideNolPayUnlinkCardComponent(viewModelStoreOwner: ViewModelStoreOwner): NolPayUnlinkCardComponent
```

## Parameters

**Parameters**

**viewModelStoreOwner** `ViewModelStoreOwner` *required*

The [ViewModelStoreOwner](https://developer.android.com/reference/androidx/lifecycle/ViewModelStoreOwner)
to associate with the component.

## Returns

An instance of `NolPayUnlinkCardComponent`.

**NolPayUnlinkCardComponent**

**start()**

Initialize the component by calling the start function. This method should be called only once.

**updateCollectedData(collectableData: NolPayUnlinkCollectableData)**

Update component with collected data by passing implementations of sealed interface representing collectable data for unlinking a nol Pay card.
This method can be called at any point, even if you have only partially collected data.
To validate the partially collected data, you can refer to the
[componentValidationStatus](#component-validation-status-flow-primer-validation-status-nol-pay-unlink-collectable-data)
and receive the validation status when it's updated.

**sealed interface NolPayUnlinkCollectableData**

**NolPayCardAndPhoneData**

Data class representing nol Pay card and phone data for unlinking.

**Properties**

**nolPaymentCard** `PrimerNolPaymentCard`

The nol Pay payment card to unlink is retrieved using [NolPayLinkedCardsComponent](https://primer.io/docs/sdk/android/v2.x.x/primer-headless-checkout/nol-pay-manager/provideNolPayLinkedCardsComponent.md).

**mobileNumber** `String`

The mobile number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format that was associated with the nol Pay account.

**NolPayOtpData**

Data class representing nol Pay OTP (One-Time Password) data collected during the unlinking process.

**Properties**

**otpCode**

The OTP code required for card linking.

**submit()**

Call `submit` function in order to process collected data and move component to next state.

**componentStep: Flow\<NolPayUnlinkCardStep>**

`NolPayUnlinkCardStep` is a class holding different output data for specific steps. Whenever&#x20;
[start](#param-start) or [submit](#param-submit) methods are
called,
`componentStep` will trigger the next step in case the call to the mentioned method was successful.

**sealed interface NolPayUnlinkCardStep**

**CollectCardAndPhoneData**

Object representing the step to collect card and phone data for unlinking nol Pay card.

**CollectOtpData**

Object representing the step of collecting OTP (One-Time Password) data for nol Pay card unlinking.

**CardUnlinked**

Data class representing the step when a card has been successfully unlinked.

**Properties**

**nolPaymentCard** `PrimerNolPaymentCard`

The unlinked nol Pay card.

**componentValidationStatus: Flow\<PrimerValidationStatus\<NolPayUnlinkCollectableData>>**

The `PrimerValidationStatus` interface encompasses a range of validation statuses.

**sealed interface PrimerValidationStatus**

**Validating\<NolPayUnlinkCollectableData>**

Indicates that data is currently in the process of being validated.

**Properties**

**collectableData** `NolPayUnlinkCollectableData`

The data being validated.

**Valid\<NolPayUnlinkCollectableData>**

Indicates that the data has successfully been validated.

**Properties**

**collectableData** `NolPayUnlinkCollectableData`

The successfully validated data.

**Invalid\<NolPayUnlinkCollectableData>**

Indicates that the data has been considered invalid after validation.

**Properties**

**validationErrors** `List\<PrimerValidationError\>`

List of `PrimerValidationError` objects that represent data validation errors emitted by this component.

**PrimerValidationError**

**List\<PrimerValidationError>**

**Type**

**PrimerValidationError**

**Properties**

**errorId** `String` *required*

A unique error identifier.

**description** `String` *required*

A error description.

**diagnosticsId** `String` *required*

A unique diagnostics id for the given error.

**collectableData** `NolPayUnlinkCollectableData`

The data that failed validation.

**Error\<NolPayUnlinkCollectableData>**

Represents the status when an error occurred during the validation process.

**Properties**

**error** `PrimerError`

The specific `PrimerError` that occurred during validation.

**PrimerValidationError**

**errorId** `String` *required*

A unique error identifier.

**errorCode** `String?`

A unique error code.

**description** `String` *required*

A error description.

**recoverySuggestion** `String?`

A recovery suggestion for the given error. In case it's present, use it to try
to recover from error.

**diagnosticsId** `String` *required*

A unique diagnostics id for the given error.

**collectableData** `NolPayUnlinkCollectableData`

The data for which the error occurred.

**componentError: Flow\<PrimerError>**

Get a [Flow](https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/)
of [PrimerError](https://primer.io/docs/sdk/android/v2.x.x/common-objects/PrimerError.md) objects that represent errors emitted by this component.
Subscribers can observe and handle errors using this Flow.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.