This really isn't the best place to post, as this forum is more regarding finished 3rd party modules. A better location for you would be
Program Logic
Regardless, there is no api. It's all procedural code, so you have to pretty much try to figure out how the entire process works from start to finish, and where your code would best be inserted.
Good luck, the cart is one area I've never been a fan of working in
EDIT: BTW, for the admin config page, if you create a module entry, then you can define config options for that module entry, which will automatically show up in the Module Administration with a link to the module options