>does your plugin have an API that can be used to build an order receiving app?
in short, no. it’s a pure wordpress plugin that relies on the wordpress environment being loaded
furthermore, in general, there is no generic way to action refunds as that is payment gateway specific
(though you should probably consider not to charge people in the first place but only authorize payments and only capture once you accept an order)