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

**Parameters**

**context** `Context` *required*

Android [Context](https://developer.android.com/reference/android/content/Context.html) of your `Activity` or `Fragment`.

**intent** `PrimerSessionIntent` *required*

Set the preferred session intent when showing paymentMethodType.

**Properties**

**PrimerSessionIntent.CHECKOUT**

**PrimerSessionIntent.VAULT**

## Throws

**Exceptions**

**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](https://primer.io/docs/sdk/android/v2.x.x/primer-headless-checkout/listeners/PrimerHeadlessUniversalCheckoutListener.md#parameters) callback.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.