> ## 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.

# provideNolPayPaymentComponent

This method allows you get a new instance of `NolPayPaymentComponent` that can be used to link new
nol Pay cards.

```swift SWIFT theme={"dark"}
func provideNolPayStartPaymentComponent() -> NolPayPaymentComponent
```

## Returns

An instance of `NolPayPaymentComponent`.

**NolPayPaymentComponent**

**start**

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

**updateCollectedData(collectableData: NolPayPaymentCollectableData)**

Update component with collected data by passing implementations of sealed interface representing collectable data for payment flow with 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 [validationDelegate](#nolpaypaymentcomponent.validationDelegate)

**enum NolPayPaymentCollectableData**

**paymentData**

Data class representing nol Pay card and phone data used in payment process.

**Properties**

**cardNumber**

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

**mobileNumber**

The mobile number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format for which linked cards are to be retrieved.

**submit**

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

> [!NOTE]
>
> For `LinkCardComponent` you must call this function as a first step, to start NFC scanning of the card.

**stepDelegate** `PrimerHeadlessSteppableDelegate`

`NolPayPaymentState` is a enum class holding different output data
for specific steps. Whenever [submit](https://primer.io/docs/sdk/ios/v2.x.x/primer-headless-checkout/nol-pay-manager/provideNolPayPaymentComponent.md#param-submit) method is called, `stepDelegate` will trigger the next step in case
the call to the mentioned method was successful.

**enum NolPayPaymentStep**

**collectCardAndPhoneData**

Enum member representing the step of collecting card and phone data for nol Pay payment.

**paymentRequested**

Enum member representing the step of after successfull payment request. There will be API pooling

```swift SWIFT theme={"dark"}
  func didReceiveStep(step: PrimerHeadlessStep)
```

**validationDelegate** `PrimerHeadlessValidatableDelegate`

Validation delegate will be triggered every time collected data is updated.

```swift SWIFT theme={"dark"}
  func didUpdate(validationStatus: PrimerValidationStatus, for data: PrimerCollectableData?)
```

**PrimerValidationStatus** `Enum`

`PrimerValidationStatus` is an enum that represents the different validation statuses in the Primer SDK. It helps to communicate the state of validation for a particular process, providing clear categorization of validation states.

**enum PrimerValidationStatus**

**validating**

Enum case representing the ongoing validation state.
This indicates that the validation process is currently in progress.

**valid**

Enum case representing a successful validation state.
This indicates that the validation process has completed successfully and the data is valid.

**invalid**

Enum case representing an unsuccessful validation state due to validation errors.
This indicates that the validation process has completed but has found one or more errors in the data.

**Associated Value**

**errors** `[PrimerValidationError]`

An array of `PrimerValidationError` representing the specific validation errors found.

**error**

Enum case representing an error state due to an unexpected issue.
This indicates that an unexpected error has occurred during the validation process.

**Associated Value**

**error** `PrimerError`

A `PrimerError` representing the unexpected error that occurred.

**errorDelegate** `PrimerHeadlessErrorableDelegate`

Error delegate will be triggered every time an error is thrown in the process.

```swift SWIFT theme={"dark"}
  func didReceiveError(error: PrimerError)
```


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