Show single paymentMethod in either Primer’s Checkout or Vault session.

Note that there are more options which you can set by passing your SDK settings in the configure function.

KOTLIN
fun showPaymentMethod(
  context: Context,
  clientToken: String,
  paymentMethod: String,
  intent: PrimerSessionIntent,
)

Parameters

Example

Show a specific payment method using the following code:

KOTLIN
class CheckoutActivity : AppCompatActivity() {
  // ...
  private fun showPaymentMethod(
    clientToken: String,
    paymentMethodType: String,
    sessionIntent: PrimerSessionIntent
  ) {
    // 👇 Add this
    Primer.instance.showPaymentMethod(context, clientToken, paymentMethodType, sessionIntent)
  }
}