@axonlabs/payments - v0.2.0
    Preparing search index...

    Function Payments

    • Factory function to get a singleton instance of the AxonPayments manager, or create a new instance if requested.

      By default, returns the existing singleton instance. Pass true to newInstance to force creation of a fresh instance.

      Useful for resetting state in tests or multi-tenant scenarios.

      Parameters

      • newIntance: boolean = false

      Returns AxonPayments

      The AxonPayments instance.

      // Get the singleton instance
      const payments1 = Payments();

      // Force a new instance (e.g., for testing or isolated context)
      const payments2 = Payments(true);