initCustomerSession

fun initCustomerSession(context: Context, ephemeralKeyProvider: EphemeralKeyProvider, shouldPrefetchEphemeralKey: Boolean = true)

Create a CustomerSession with the provided EphemeralKeyProvider.

You must call PaymentConfiguration.init with your publishable key before calling this method.

Parameters

context

The application context

ephemeralKeyProvider

An EphemeralKeyProvider used to retrieve EphemeralKey ephemeral keys

shouldPrefetchEphemeralKey

If true, will immediately fetch an ephemeral key using {@param ephemeralKeyProvider}. Otherwise, will only fetch an ephemeral key when needed.