onPaywallPurchaseFailed method

void onPaywallPurchaseFailed(
  1. String paywallId,
  2. Object error,
  3. String errorType,
  4. String? productId,
)

A wrapper host cannot introspect error: it crosses the bridge as an opaque platform object, so a JS or Dart host could not tell a user cancel from a declined card from a dead network — and so could not decide whether a retry was even sensible. errorType is the stable discriminator (userCancelled | productNotFound | verificationFailed | networkError | serverError | pending | providerNotAvailable | unknown). productId is null only when no product was ever selected — a paywall selling two plans must say WHICH one failed.

Implementation

void onPaywallPurchaseFailed(String paywallId, Object error, String errorType, String? productId) {}