I am developing a mobile POS application that is a semi-integration with the Clover Flex. I support taking payments through the Clover Flex, as well as through the ecommerce API (v1/charges) using a card token generated by the Clover iframe in a WebView.
I want to be able to void/refund any payment through the Clover Flex device. This works fine for payments that were made with the device. However, I am having trouble accomplishing this for payments that were made with v1/charges. The response from v1/charges comes back with a charge ID, and initiating a void/refund to the device through the CloverConnector does not work when setting the payment ID to the charge ID. Also, it seems that an order ID is required as well but v1/charges does not return an order ID. Furthermore I am uncertain on whether charge ID from the v1/charges response and payment ID from the CloverConnector sale response represent the same thing.
Any clarification and advice would be appreciated!