Merge payments refactoring