identityVerificationCredentials property

CrossmintIdentityVerificationCredentials? get identityVerificationCredentials

Verification credentials for the current order, or null when the order does not need identity verification. Pass these to CrossmintIdentityVerification when checkout runs with identityVerificationHandling set to external.

With session credentials this turns null as soon as the buyer submits, before verification shows its result. Keep the widget mounted with the latest non-null value until its onComplete or onCancel fires, then keep it closed for that order.

Implementation

CrossmintIdentityVerificationCredentials? get identityVerificationCredentials {
  final Object? payment = _order?['payment'];
  if (payment is! Map<String, Object?>) return null;
  final Object? preparation = payment['preparation'];
  if (preparation is! Map<String, Object?>) return null;
  return CrossmintIdentityVerificationCredentials.tryFromJson(
    preparation['kyc'],
  );
}