refundTransactions might be needed when a customer has canceled a subscription, or has separately paid a bill independent of Retain processing. This call results in Retain either ceasing attempts (retries) to capture a submitted failed transaction, or refunding a Retrain transaction that has already been captured.
If a submitted refund transaction fails to Retain input validation it is returned in the response array, along with information indicating the issue.
After Retain processes the refundTransactions call, a call to fetchBillingResults for the datetime range in which the refundTransactions was performed, or to fetchByMerchantTransactionId, will return details of the refundTransactions operation for applicable transactions.
Input
refunds: an array ofmerchantTransactionIds and optional amounts to refund/cancel. If amount is not specified, Retain will attempt to refund the total amount of the specified Transaction.
Note: Use of the optional amount field is discouraged. If the value is less than the total amount of the originally submitted failed transaction then a partial refund can be processed but future retries will still be discontinued. Any future refunds will have to specify the precise, remaining balance (original, submitted transaction amount minus any partial refunds that have been performed) in order to pass input validation.
Output
return: an object of typeReturn indicating success or failure of the call.
response: an object of type TransactionValidationResponse, which includes the merchantTransactionID of each transaction that returned an error.
Note: An empty TransactionValidationResponse object indicates that the call succeeded without error. For more information, see TransactionValidationResponse Values.
