Package 

Class BillingErrorKt

    • Method Summary

      Modifier and Type Method Description
      final static String billingErrorType(Throwable t) Stable discriminator string for a billing failure.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • billingErrorType

         final static String billingErrorType(Throwable t)

        Stable discriminator string for a billing failure.

        WHY: everything downstream of a failed purchase — the purchase_failed event, the paywall delegate, and the Flutter / React Native wrappers, which can only receive plain data across their bridge — used to see an untyped Throwable whose only signal was a human-readable message. A wrapper (or a BigQuery query) could not tell "user cancelled" from "card declined" from "product misconfigured" without regex-matching English prose. These strings are the contract; they are never localized and never renamed.

        Public, not internal: the React Native wrapper is a SEPARATE Gradle module, so internal put this out of its reach and it rejected every purchase — cancel, ask-to-buy, declined card, dead network — with one code (PURCHASE_ERROR) and a localized message. These are the exact strings iOS's billingErrorType(_:) returns; that is what makes one catch (e.code) work on both.