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

# getPaymentMethodResources

Call this method to retrieve resources for all the payment methods available on the current client
session.

```kotlin KOTLIN theme={"dark"}
@Throws(SdkUninitializedException::class)
@JvmStatic
fun getPaymentMethodResources(context: Context): List<PrimerPaymentMethodResource>
```

## Parameters

<Expandable title="Parameters" defaultOpen>
  <ResponseField name="context" type="Context" required>
    Android [Context](https://developer.android.com/reference/android/content/Context.html) of
    your `Activity` or `Fragment`.
  </ResponseField>
</Expandable>

## Returns

<Expandable title="Returns" defaultOpen>
  <ResponseField name="List<PrimerPaymentMethodResource>">
    <Expandable title="PrimerPaymentMethodResource" defaultOpen>
      <ResponseField name="PrimerPaymentMethodAsset">
        <Expandable title="Properties">
          <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>

          <ResponseField name="paymentMethodName" type="String" required>
            A user friendly English localized string identifier for the payment method.
          </ResponseField>

          <ResponseField name="paymentMethodLogo" type="PrimerPaymentMethodLogo" required>
            <Expandable title="Properties" defaultOpen>
              <ResponseField name="colored" type="Drawable?">
                A `Drawable` to be used anywhere.
              </ResponseField>

              <ResponseField name="dark" type="Drawable?">
                A `Drawable` to be used on dark theme.
              </ResponseField>

              <ResponseField name="light" type="Drawable?">
                A `Drawable` to be used on light theme.
              </ResponseField>
            </Expandable>
          </ResponseField>

          <ResponseField name="paymentMethodBackgroundColor" type="PrimerPaymentMethodBackgroundColor" required>
            <Expandable title="Properties" defaultOpen>
              <ResponseField name="colored" type="@ColorInt Int?">
                A `@ColorInt` to be used anywhere.
              </ResponseField>

              <ResponseField name="dark" type="@ColorInt Int?">
                A `@ColorInt` to be used on dark theme.
              </ResponseField>

              <ResponseField name="light" type="@ColorInt Int?">
                A `@ColorInt` to be used on light theme.
              </ResponseField>
            </Expandable>
          </ResponseField>
        </Expandable>
      </ResponseField>

      <ResponseField name="PrimerPaymentMethodNativeView">
        <Expandable title="Properties">
          <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>

          <ResponseField name="paymentMethodName" type="String" required>
            A user friendly English localized string identifier for the payment method.
          </ResponseField>

          <ResponseField name="createView" type="createView: (Context) -> View" required>
            A function to create a native view.
          </ResponseField>
        </Expandable>
      </ResponseField>
    </Expandable>
  </ResponseField>
</Expandable>

## Throws

<Expandable title="Throws" 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>
</Expandable>
