create

fun create(activity: ComponentActivity, publishableKey: String, stripeAccountId: String? = null, callback: PaymentLauncher.PaymentResultCallback): PaymentLauncher

Create a PaymentLauncher instance with ComponentActivity.

This API registers an ActivityResultLauncher into the ComponentActivity, it needs to be called before the ComponentActivity is created.


fun create(fragment: Fragment, publishableKey: String, stripeAccountId: String? = null, callback: PaymentLauncher.PaymentResultCallback): PaymentLauncher

Create a PaymentLauncher instance with Fragment.

This API registers an ActivityResultLauncher into the Fragment's hosting Activity, it needs to be called before the Fragment is created.


Create a PaymentLauncher instance with ComponentActivity.

This API registers an ActivityResultLauncher into the ComponentActivity, it needs to be called before the ComponentActivity is created.

The publishable key and Stripe account ID are read lazily from PaymentConfiguration.