initializePaymentSheet method

Future<void> initializePaymentSheet(
  1. PaymentSheetConfiguration configuration
)

Validates and stores configuration for the next presentation.

This method does not perform the Checkout network request. Call it again whenever the Order ID or presentation options change. Never include a merchant API key in a Flutter application.

Throws ArgumentError for malformed client-owned configuration and PlatformException when the native SDK rejects initialization.

Implementation

Future<void> initializePaymentSheet(
  PaymentSheetConfiguration configuration,
) async {
  await _channel.invokeMethod<void>(
    'initializePaymentSheet',
    configuration.toJson(),
  );
}