A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
I have an issue with refunds done via my custom app:
I have an app for a customer, where they are able to make partial refunds, refunding the order amount and shipping costs done via the GraphQL API.
Now the customer faces an issue, where one of the refunds was rejected by the offsite payment processor due to lacking funds.
The refunded amount was thus (correctly and, as expected) discarded and does not affect the orders total amount. However, with the same refund, part of the shipping cost was also refunded but it was not discarded (unexpectedly, I'm thinking erroneously) after the reject, but continues to affect the order's shipping cost.
Now, the customer can't make another refund as the GraphQL mutation will fail with error about not allowing to refund more shipping costs that were paid originally.
Have any of you made refunds via the GraphQL API and could possibly tell me is this behaviour indeed incorrect or could I have some issues with the GQL mutation so that the shipping cost against my expectations wouldn't be cancelled once the refund was rejected?