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

# provideComponent

After creating an instance of the `PrimerHeadlessUniversalCheckout.ComponentWithRedirectManager ` you must use one of the compatible provide methods
which will provide the component that can be used to build the flow.
The method `provideComponent` is compatible with Objective-C.

```swift SWIFT theme={"dark"}
@objc public func provideComponent(paymentMethodType: String) -> PrimerHeadlessBanksComponentWrapper
```

## Parameters

**Parameters**

**paymentMethodType** `String` *required*

A unique string identifier for the payment method. Supported payment methods for current client session are returned in `primerHeadlessUniversalCheckoutDidLoadAvailablePaymentMethods`.
For Component with redirect manager, the supported payment method is ADYEN\_IDEAL.

## Returns

An instance of type `PrimerHeadlessBanksComponentWrapper`.
The `PrimerHeadlessBanksComponentWrapper` conforms to `PrimerHeadlessBanksComponentWrapperDelegate`.

```swift SWIFT theme={"dark"}
@objc public final class PrimerHeadlessBanksComponentWrapper: NSObject, PrimerHeadlessBanksComponentWrapperDelegate
```

**PrimerHeadlessBanksComponentWrapper**

**PrimerHeadlessBanksComponentWrapperDelegate**

**start**

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

**submit**

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

**selectBankById** `selectBankById(_ bankdId: String)`

Instance method to use in order to select a bank by id.

```swift SWIFT theme={"dark"}
  @objc func selectBankById(_ bankdId: String)
```

**filterBankByName** `filterBankByName(_ text: String)`

Instance method to use in order to filter a bank by name.

```swift SWIFT theme={"dark"}
  @objc func filterBankByName(_ text: String)
```

**errorDelegate** `BanksComponentErrorable`

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

```swift theme={"dark"}
  @objc func didReceiveError(_ error: NSError)
```

**stepDelegate** `BanksComponentSteppable`

`BanksComponentSteppable` is a protocol that processes different
output data for specific steps. Whenever&#x20;
[submit](#param-submit) method is called,&#x20;
`stepDelegate` will trigger the next step in case the call to the
mentioned method was successful.

This is provided for the payment method type ADYEN\_IDEAL and Objective-C
backward compatibility.

**didStartLoading**

Protocol method notifying of banks loading.

**didReceiveBanks(banks: \[IssuingBank])**

Protocol method processing issuing banks retrieved.

**Properties**

**banks** `[IssuingBank]`

The issuing banks array associated with this payment flow.

```swift SWIFT theme={"dark"}
@objc func didStartLoading()
@objc func didReceiveBanks(_ banks: [IssuingBank])
```

## Throws

**Throws**

**unsupportedPaymentMethod**

An error that will be thrown in case the provide method has been called using unsupported `paymentMethodType`.

Supported payment methods for current client session are returned in the `onAvailablePaymentMethodsLoaded` delegate.

Currently, the supported payment method types are:

<ul>
  <li>ADYEN\_IDEAL</li>
</ul>

**genericError**

An error that will be thrown in case the provide method fails because of sdk not correctly used.


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