Custom charge API + bug fixes

* Custom charge API added
* NPE and API inconsistency fixed