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.
true
newInstance
Useful for resetting state in tests or multi-tenant scenarios.
The AxonPayments instance.
// Get the singleton instanceconst payments1 = Payments();// Force a new instance (e.g., for testing or isolated context)const payments2 = Payments(true); Copy
// Get the singleton instanceconst payments1 = Payments();// Force a new instance (e.g., for testing or isolated context)const payments2 = Payments(true);
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
truetonewInstanceto force creation of a fresh instance.Useful for resetting state in tests or multi-tenant scenarios.