There is no documentation for payment plugins api yet. And the best way is to take any existing plugin that works similar way as example and create new one based on this. Also you can contact us in helpdesk we will help with any info.