zerogw payload api refactoring