How does invoice payment work?