Add invoice model and logic behind it as requested in #24

Add invoice model and logic behind it as requested in #24

Ps : Sorry for all the horribles mistakes I made in the commit title
I'd remove this property. createdAt is just as descriptive, and less processing is required on our end.