Skip to main content
Vindicia Knowledge Center




The fetchByAccount method returns one or more Refund objects that represent refunds made for Transactions whose Account object matches the input. Call this method for a list of all the refunds that have been issued to a certain customer.


srd: sparse response description, a SOAP string (which must be a JSON object), in which you specify the elements you want returned.This parameter enables the calling system to constrain a method call to return only components you specify. This gives you greater control over returned content, and improves response time within the Vindicia platform by reducing the processing needed for the call.

Some fields are required, either practically or in the WSDL, and will be returned regardless of the srd. A null srd returns the complete response.

account: the Account object that serves as the search criterion. Use the merchantAccountId or VID to identify the object.

includeChildren: an optional Boolean flag that, if set to true, includes any children associated with this Account. If null or false, CashBox will construct the query without including children accounts.


return: an object of type Return that indicates the success or failure of the call.

refunds: an array of one or more Refund objects associated with the Transaction objects that are, in turn, associated with the Account object specified in the input.


In addition to those listed in Standard Return Codes, this call returns:

Return Code

Return String


One of the following:

  • Unable to load account to search by: No matches.
  • No account specified to load refunds by!


Unable to load account to search by: error-description.


$account = new Account();

$refund = new Refund();
$response = $refund->fetchByAccount($account);
if($response['returnCode'] == 200) {

$fetchedRefunds = $response['data']->refunds;

// process fetched refunds here

if ($fetchedRefunds != null) {

foreach ($fetchedRefunds as $fetchedRef) {

// process a fetched refund here

print "Refund VID " . $fetchedRef->getVID();
print "Refund amount ". $fetchedRef->getAmount();
print "Refund timestamp ". $fetchedRef->getTimestamp();




For Users

Learn More
For Users

Cashbox Features

Learn More
Cashbox Features
Back to Top