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

# getCardNetworkAsset

This method returns a card asset for the specified card network.

The SDK must be initialized before this method is called or an error will be thrown.

```kotlin KOTLIN theme={"dark"}
@Throws(SdkUninitializedException::class)
@JvmStatic
fun getCardNetworkAsset(
  context: Context,
  cardNetwork: CardNetwork.Type
): PrimerCardNetworkAsset
```

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

  <ResponseField name="cardNetwork" type="CardNetwork.Type" required>
    <Expandable title="cases">
      <ResponseField name="CardNetwork.Type.OTHER">
        {}
      </ResponseField>

      <ResponseField name="CardNetwork.Type.VISA">
        {}
      </ResponseField>

      <ResponseField name="CardNetwork.Type.MASTERCARD">
        {}
      </ResponseField>

      <ResponseField name="CardNetwork.Type.AMEX">
        {}
      </ResponseField>

      <ResponseField name="CardNetwork.Type.DINERS_CLUB">
        {}
      </ResponseField>

      <ResponseField name="CardNetwork.Type.DISCOVER">
        {}
      </ResponseField>

      <ResponseField name="CardNetwork.Type.JCB">
        {}
      </ResponseField>

      <ResponseField name="CardNetwork.Type.UNIONPAY">
        {}
      </ResponseField>

      <ResponseField name="CardNetwork.Type.MAESTRO">
        {}
      </ResponseField>

      <ResponseField name="CardNetwork.Type.ELO">
        {}
      </ResponseField>

      <ResponseField name="CardNetwork.Type.MIR">
        {}
      </ResponseField>

      <ResponseField name="CardNetwork.Type.HIPER">
        {}
      </ResponseField>

      <ResponseField name="CardNetwork.Type.HIPERCARD">
        {}
      </ResponseField>

      <ResponseField name="CardNetwork.Type.CARTES_BANCAIRES">
        {}
      </ResponseField>
    </Expandable>
  </ResponseField>
</Expandable>

## Returns

<Expandable title="Returns" defaultOpen>
  <ResponseField name="PrimerCardNetworkAsset">
    <Expandable title="Properties">
      <ResponseField name="cardNetwork" type="CardNetwork.Type">
        The card network that the asset represents.
      </ResponseField>

      <ResponseField name="displayName" type="String">
        The human-readable name of the card network (e.g., Visa, Mastercard)
      </ResponseField>

      <ResponseField name="cardImage" type="Drawable?">
        A small rectangular icon representing the card network.
      </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>
