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.

123456
fun showPaymentMethod(  context: Context,  clientToken: String,  paymentMethod: String,  intent: PrimerSessionIntent,)
kotlin
copy

Parameters

context
ContextRequired

Android Context of your Activity or Fragment.

clientToken
stringRequired

A client token as returned by the create client session call.

paymentMethod
StringRequired
A paymentMethod to be shown.
intent
PrimerSessionIntentRequired
Set the preferred session intent when showing paymentMethodType.

Example

Availing Universal Checkout is as easy as implementing one line of code:

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