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

# getAssetsManager

```ts TS theme={"dark"}
getAssetsManager(): IAssetsManager
```

Get an instance of `IAssetsManager`, which can be used to load and manage Primer's checkout assets.

## Returns

<Expandable defaultOpen>
  <ResponseField name="IAssetsManager">
    An instance of `IAssetsManager`.

    <Expandable defaultOpen title="IAssetsManager">
      <ResponseField name="getPaymentMethodAsset" type="(type: PaymentMethodType) => Promise<ButtonPaymentMethodAsset | null>">
        Retrieves the asset for a given [PaymentMethodType](/sdk/web/v2.x.x/constants/payment-method-types). Returns a promise that
        resolves to the asset or `null` if the asset is not available.

        <Expandable title="Parameters">
          <ResponseField name="type" type="PaymentMethodType">
            One of [PaymentMethodType](/sdk/web/v2.x.x/constants/payment-method-types).
          </ResponseField>
        </Expandable>

        <Expandable title="Returns">
          <ResponseField name="backgroundColor" type="object">
            The background color of the payment method button.

            <Expandable title="Properties">
              <ResponseField name="colored" type="string" required>
                The color to use when theme is colored.
              </ResponseField>

              <ResponseField name="dark" type="string" required>
                The color to use when theme is dark.
              </ResponseField>

              <ResponseField name="light" type="string" required>
                The color to use when theme is light.
              </ResponseField>
            </Expandable>
          </ResponseField>

          <ResponseField name="iconUrl" type="object">
            The URL of the payment method icon that is displayed on the payment method
            button.

            <Expandable title="Properties">
              <ResponseField name="colored" type="string" required>
                The color to use when theme is colored.
              </ResponseField>

              <ResponseField name="dark" type="string" required>
                The color to use when theme is dark.
              </ResponseField>

              <ResponseField name="light" type="string" required>
                The color to use when theme is light.
              </ResponseField>
            </Expandable>
          </ResponseField>

          <ResponseField name="paymentMethodName" type="string">
            ⚠️ This property is Deprecated. Please use buttonText or displayName
            instead.

            <br />

            The name of the payment method that is displayed on the payment method button.
            Optional.
          </ResponseField>

          <ResponseField name="buttonText" type="string">
            The name of the payment method that is displayed on the payment method
            button. This will be null for payment methods without a button title.
            Optional.
          </ResponseField>

          <ResponseField name="displayName" type="string">
            The name of the payment method. Optional.
          </ResponseField>
        </Expandable>
      </ResponseField>

      <ResponseField name="getCardNetworkAsset" type="(cardNetwork: string) => Promise<CardNetworkAsset>">
        Retrieves the asset for a given card network. Returns a promise that resolves to the asset object.

        <Expandable title="Parameters">
          <ResponseField name="cardNetwork" type="string">
            The network value, for example: `VISA`, `MASTERCARD`.
          </ResponseField>
        </Expandable>

        <Expandable title="Returns">
          <ResponseField name="cardUrl" type="string">
            The URL for retrieving the asset in a "card" style.
          </ResponseField>

          <ResponseField name="displayName" type="string">
            The name of the card network.\
            Can be used as [alt](https://developer.mozilla.org/en-US/docs/Web/api-reference/HTMLImageElement/alt)
            and [title](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title) for the image.
          </ResponseField>
        </Expandable>
      </ResponseField>
    </Expandable>
  </ResponseField>
</Expandable>
