refactor verify billing function
fix error handling