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

# provideNolPayLinkCardComponent

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

```swift SWIFT theme={"dark"}
  func provideNolPayLinkCardComponent() -> NolPayLinkCardComponent
```

## Returns

An instance of `NolPayLinkCardComponent`.

<Expandable title="NolPayLinkCardComponent" defaultOpen>
  <ResponseField name="start">
    Initialize the component by calling the start function. This method should be called only once.
  </ResponseField>

  <ResponseField name="updateCollectedData(collectableData: NolPayLinkCollectableData)">
    Update component with collected data by passing an enum representing collectable data for linking 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](/sdk/ios/v2.x.x/primer-headless-checkout/nol-pay-manager/provideNolPayLinkCardComponent#param-validation-delegate)

    {" "}

    <Expandable title="enum NolPayLinkCollectableData" defaultOpen>
      <ResponseField name="phoneData">
        Enum member representing nol Pay phone data collected during the linking
        process.

        <Expandable title="Properties" defaultOpen>
          <ResponseField name="mobileNumber" type="String">
            The mobile number in
            [E.164](https://www.twilio.com/docs/glossary/what-e164) format for which
            linked cards are to be retrieved.
          </ResponseField>
        </Expandable>
      </ResponseField>

      <ResponseField name="otpData">
        Enum member representing nol Pay OTP (One-Time Password) data collected
        during the linking process.

        <Expandable title="Properties" defaultOpen>
          <ResponseField name="otpCode">
            The OTP code required for card linking.
          </ResponseField>
        </Expandable>
      </ResponseField>
    </Expandable>
  </ResponseField>

  <ResponseField name="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.
    </Note>
  </ResponseField>

  <ResponseField name="stepDelegate" type="PrimerHeadlessSteppableDelegate">
    <p>
      <code>NolPayLinkDataStep</code> is a enum class holding different output data
      for specific steps. Whenever <span><a href="/sdk/ios/v2.x.x/primer-headless-checkout/nol-pay-manager/provideNolPayLinkCardComponent#param-submit">submit</a></span> will trigger the next step in case
      the call to the mentioned method was successful.
    </p>

    <Expandable title="enum NolPayLinkDataStep">
      <ResponseField name="collectTagData">
        Enum member representing the step of collecting tag data for nol Pay card linking.
        This is a default/first step for linking flow. To start the linking flow you will have to call `submit` function after you called `start` function.
      </ResponseField>

      <ResponseField name="collectPhoneData">
        Enum member representing the step of collecting phone data for nol Pay card linking.

        <Expandable title="Properties" defaultOpen>
          <ResponseField name="cardNumber" subtitle="String">
            The card number associated with the nol Pay card scanned in `collectTagData` step.
          </ResponseField>
        </Expandable>
      </ResponseField>

      <ResponseField name="collectOtpData">
        Enum member representing the step of collecting OTP (One-Time Password) data for nol Pay card linking.

        <Expandable title="Properties" defaultOpen>
          <ResponseField name="phoneNumber" subtitle="String">
            Phone number used for sending of OTP SMS.
          </ResponseField>
        </Expandable>
      </ResponseField>

      <ResponseField name="cardLinked">
        Enum member representing the step of successfully linking a nol Pay card
      </ResponseField>
    </Expandable>

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

  <ResponseField name="validationDelegate" type="PrimerHeadlessValidatableDelegate">
    Validation delegate will be triggered every time collected data is updated.

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

    <ResponseField name="PrimerValidationStatus" type="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.

      <Expandable title="enum PrimerValidationStatus" defaultOpen>
        <ResponseField name="validating">
          Enum case representing the ongoing validation state.
          This indicates that the validation process is currently in progress.
        </ResponseField>

        <ResponseField name="valid">
          Enum case representing a successful validation state.
          This indicates that the validation process has completed successfully and the data is valid.
        </ResponseField>

        <ResponseField name="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.

          <Expandable title="Associated Value" defaultOpen>
            <ResponseField name="errors" type="[PrimerValidationError]">
              An array of `PrimerValidationError` representing the specific validation errors found.
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="error">
          Enum case representing an error state due to an unexpected issue.
          This indicates that an unexpected error has occurred during the validation process.

          <Expandable title="Associated Value" defaultOpen>
            <ResponseField name="error" type="PrimerError">
              A `PrimerError` representing the unexpected error that occurred.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>
  </ResponseField>

  <ResponseField name="errorDelegate" type="PrimerHeadlessErrorableDelegate">
    Error delegate will be triggered every time an error is thrown in the process.

    ```swift SWIFT theme={"dark"}
      func didReceiveError(error: PrimerError)
    ```
  </ResponseField>
</Expandable>
