startCheckout method

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

Start the web checkout flow. Returns the checkout URL or null on failure. Errors are delivered via checkoutFailures when available.

Implementation

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