Temp refactoring for payment retry (to be squashed)