where is the API documentation ?

I'm looking for the API documentation. I need to integrate a custom payment gateway.