Is there a way for developers to unsubscribe a specific user?

Our service has an IOS and Android app and a backend server.
I have a question about handling refunds for simultaneous payments on Android and IOS.

Is there any way to cancel and refund the IOS subscription payment in the backend when Google is paid first and IOS is paid almost simultaneously?

For Android, unlike IOS IAP, the backend server can confirm the purchase with a purchase confirmation (ack), so even if IOS is paid first at almost the same time, it is possible to cancel it by checking the payment data in the backend and not sending an ack to Google's server if the IOS payment is already made.