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

# newInstance

The native UI manager is responsible for payment methods that need to present their own UI (e.g. Google Pay).

This method enables you to create a Native UI manager instance.

```kotlin KOTLIN theme={"dark"}
@Throws(SdkUninitializedException::class, UnsupportedPaymentMethodException::class)
@JvmStatic
fun newInstance(
  paymentMethodType: String
): PrimerHeadlessUniversalCheckoutNativeUiManagerInterface
```

## Parameters

**Parameters**

**paymentMethodType** `String` *required*

A unique string identifier for the payment method. Supported payment methods for current client session are returned in [onAvailablePaymentMethodsLoaded](https://primer.io/docs/sdk/android/v2.x.x/primer-headless-checkout/listeners/PrimerHeadlessUniversalCheckoutListener.md#onavailablepaymentmethodsloaded) callback.

## Throws

**Exceptions**

**SdkUninitializedException**

An exception that will be thrown in case the SDK was not initialized properly.
Before calling any of the manager's method, the SDK must be initialized using [start](https://primer.io/docs/sdk/android/v2.x.x/primer-headless-checkout/methods/start.md) method.

**UnsupportedPaymentMethodException**

An exception that will be thrown in case the initialization of the manager has been done using unsupported `paymentMethodType` - `PrimerHeadlessMainComponent` combination.
Supported payment methods for current client session are returned
in [onAvailablePaymentMethodsLoaded](https://primer.io/docs/sdk/android/v2.x.x/primer-headless-checkout/listeners/PrimerHeadlessUniversalCheckoutListener.md#onavailablepaymentmethodsloaded) callback. See [Supported types](https://primer.io/docs/sdk/android/v2.x.x/primer-headless-checkout/component-with-redirect-manager/provide.md#type-parameters) for the supported combinations.


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