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

# showPaymentMethod

Use this method to present the payment method user interface (UI) to the user.

```kotlin KOTLIN theme={"dark"}
@Throws(UnsupportedPaymentIntentException::class)
fun showPaymentMethod(context: Context, sessionIntent: PrimerSessionIntent)
```

## 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="intent" type="PrimerSessionIntent" required>
    Set the preferred session intent when showing paymentMethodType.

    <Expandable title="Properties">
      <ResponseField name="PrimerSessionIntent.CHECKOUT">
        {}
      </ResponseField>

      <ResponseField name="PrimerSessionIntent.VAULT">
        {}
      </ResponseField>
    </Expandable>
  </ResponseField>
</Expandable>

## Throws

<Expandable title="Exceptions" defaultOpen>
  <ResponseField name="UnsupportedPaymentIntentException">
    An exception that will be thrown in case method of the manager has been called using unsupported `sessionIntent`. Supported payment session intents for given payment method are returned in [onAvailablePaymentMethodsLoaded](/sdk/android/v2.x.x/primer-headless-checkout/listeners/PrimerHeadlessUniversalCheckoutListener#parameters) callback.
  </ResponseField>
</Expandable>
