Skip to main content
Vindicia Knowledge Center




The fetchByAccount method returns one or more Transaction objects associated with the Account object specified in the input. Call this method to retrieve one-time, recurring, migrated, or other types of transactions in Vindicia Subscribe for a given customer.

Since transactions change their status as they go through their life cycle in Vindicia Subscribe, the returned Transaction objects might show a different status from before, especially for Vindicia Subscribe-processed transactions. The latest Transaction status is the first entry in the statusLog array (see the statusLog attribute in the table on the Transaction object data members).


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 this flag is omitted, Vindicia Subscribe will interpret it as false, and constructs the query without looking at any child's account.


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

transactions: an array of one or more Transaction objects 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 transaction by!


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


// Create an Account object to represent an
// existing customer account by its id

$account = new Account();

// create a transaction object to make the call

$soap_tx= new Transaction();

// fetch the record(s)

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

$fetchedTxns = $response['data']->transactions;

// process fetched transactions here

if ($fetchedTxns != null) {

foreach ($fetchedTxns as $fetchedTx) {

// process a fetched transaction here

print "Transaction VID " . $fetchedTx->getVID();
print "Transaction amount ". $fetchedTx->getAmount();
print "Transaction status ";
print $fetchedTx->statusLog[0]->status . "\n";



else {

print "No transactions found \n";



For Users

Learn More
For Users

Vindicia Subscribe Features

Learn More
Vindicia Subscribe Features
Back to Top