getPendingCheckoutId method
Returns the non-secret checkout id retained for a browser redirect.
A successful result may contain null when no checkout is pending. Session credentials and payment status must never be returned by this method.
Implementation
@override
Future<InappifySdkResult<String>> getPendingCheckoutId() {
return _invokeResult<String>(
method: InappifyChannelContract.getPendingCheckoutId,
payload: const <String, Object?>{},
decodeData: (data) {
final value = data['checkoutId'];
if (value is String && value.isNotEmpty) return value;
throw const FormatException(
'Pending checkout response must contain checkoutId.',
);
},
allowMissingData: true,
);
}