> ## 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 raw data manager is responsible for payment methods that need to receive data from the user (e.g. card form).

This method enables you to create a Raw Data manager instance.

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

## Parameters

<Expandable title="Parameters" defaultOpen>
  <ResponseField name="paymentMethodType" type="String" required>
    A unique string identifier for the payment method. Supported payment methods for current client session are returned in [onAvailablePaymentMethodsLoaded](/sdk/android/v2.x.x/primer-headless-checkout/listeners/PrimerHeadlessUniversalCheckoutListener#onavailablepaymentmethodsloaded) callback.
  </ResponseField>
</Expandable>

## Throws

<Expandable title="Exceptions" defaultOpen>
  <ResponseField name="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](/sdk/android/v2.x.x/primer-headless-checkout/methods/start) method.
  </ResponseField>

  <ResponseField name="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](/sdk/android/v2.x.x/primer-headless-checkout/listeners/PrimerHeadlessUniversalCheckoutListener#onavailablepaymentmethodsloaded) callback. See [Supported types](/sdk/android/v2.x.x/primer-headless-checkout/component-with-redirect-manager/provide#type-parameters) for the supported combinations.
  </ResponseField>
</Expandable>
