initCustomerSession static method

void initCustomerSession(
  1. EphemeralKeyProvider provider, {
  2. String apiVersion = defaultApiVersion,
  3. String? stripeAccount,
  4. bool prefetchKey = true,
})

Initiate the customer session singleton instance. If prefetchKey is true, fetch the ephemeral key immediately.

Implementation

static void initCustomerSession(EphemeralKeyProvider provider,
    {String apiVersion = defaultApiVersion, String? stripeAccount, bool prefetchKey = true}) {
  CustomerSession._(provider, apiVersion: apiVersion, stripeAccount: stripeAccount);
  if (prefetchKey) {
    _instance!._keyManager.retrieveEphemeralKey();
  }
}