Added credit API.
Documented credit API.