preloadCheckout method

Future<Uri?> preloadCheckout({
  1. String? stripeCustomerId,
})

Preload a checkout session for faster presentation. Returns the checkout URL on success, or null when the offer is a web_to_web upgrade (no WebView needed) or preloading failed.

Implementation

Future<Uri?> preloadCheckout({String? stripeCustomerId}) async {
  _ensureNotDisposed();
  final result =
      await _methodChannel.invokeMethod<String?>('preloadCheckout', {
    if (stripeCustomerId != null) 'stripeCustomerId': stripeCustomerId,
  });
  return result == null ? null : Uri.parse(result);
}