Question or Problem Statement:
When creating a refund against payment or payment against invoice via API call. The refund/payment is created with "Error" status, and the refund/payment is not affecting the account balance. However the API call to create the refund/payment returns a success message:
<ns1: Success>true</ns1: Success>
If using the API to create a refund or payment object, the "Success=true" message on the Response string means that you were able to successfully create the refund/payment object. The "Success=true" message is a reference to the success or failure of the SaveResult of the zCreate call. Successfully creating a refund/payment object thru the API does not necessarily mean that the transaction request was approved by the payment gateway.
The Status of the refund/payment transaction request is stored within the refund/payment object itself and is not reflected on the "Success=true" message of the API's response string. Thus, after receiving "Success=true" message of the create call, you will have to execute a query() call to check if the successfully created refund/payment object was approved or declined by the payment gateway.