SOAP API Reference

Transaction Reporting

 

QueryBatch

The QueryBatch operation queries the batch summary and returns Batch Status, DateTime, and a list of transactionIds in the batch.

Note: The QueryBatch operation is only supported in Terminal Capture environments.

 

Operation

List QueryBatch(string sessionToken, QueryBatchParameters queryBatchParameters, PagingParameters pagingParameters)

Parameters

Parameter Data Type Description
sessionToken String The limited-life token used to authenticate to CWS.
queryBatchParameters QueryBatchParameters The batch query details.
pagingParameters PagingParameters Defines the parameters for the service to use for paging large datasets.
Note: the Paging Parameter PageSize is a value clamped between 0 and 50.
Note: When specifying DateRange in QueryBatchParameters, the range must be within the last 90 days or a fault is thrown. Regardless of how DateRange is specified, only the matching transactionIds within the last 90 days are returned.

 

Return Type

Data Type Description
List Collection of batch details

Exceptions

AuthenticationFault TMSTransactionFailedFault
ExpiredTokenFault TMSUnavailableFault
InvalidTokenFault TMSUnknownServiceKeyFault
TMSOperationNotSupportedFault TMSValidationResultFault
For additional details about the Transaction Management faults listed above, refer to the Transaction Management Fault Reference.
Note: The HTTP Authorization Header must contain the required sessionToken value.

Back to the top
 

QueryTransactionsDetail

The QueryTransactionsDetail operation queries the specified transactions and returns both summary details and full transaction details as a serialized object. QueryTransactionsDetail contains the same search criteria and includeRelated functionality as QueryTransactionsSummary.

Parameters

Parameter Data Type Description
sessionToken String The limited-life token used to authenticate to CWS.
queryTransactionsParameters QueryTransactionsParameters Query parameters. Note: When TransactionTenderData is supplied, no other parameters are valid for the query.
transactionDetailFormat TransactionDetailFormat Indicates the format for the complete serialized transactions — CWSTransaction or SerializedCWS.
pagingParameters PagingParameters Defines the parameters for the service to use for paging large datasets.
Note: the Paging Parameter PageSize is a value clamped between 0 and 50.
includeRelated Boolean Indicates whether transactions related to the resulting transaction should also be included.
Note: If using QueryType = ‘OR’ in QueryTransactionsParameters, the DateRange specified must be within the last 90 days or a fault is thrown. Regardless of how DateRange is specified, only the matching transactionId‘s within the last 90 days are returned.

 

Return Type

Data Type Description
ListTransactionDetail Collection of transaction details.

Exceptions

AuthenticationFault TMSUnavailableFault
ExpiredTokenFault TMSUnknownServiceKeyFault
InvalidTokenFault TMSValidationResultFault
TMSTransactionFailedFault
For additional details about the Transaction Management faults listed above, refer to the Transaction Management Fault Reference.

 

Code Snippets

public List QueryTransactionsDetail(string sessionToken, QueryTransactionsParameters queryTransactionsParameters, TransactionDetailFormat transactionDetailFormat,PagingParameters pagingParameters, Boolean includeRelated)
{
	using (var client = new TMSOperationsClient(ConfigurationManager.AppSettings["Bindings.MgmtSoap"]))
	{
		try
		{
			return client.QueryTransactionsDetail(sessionToken, queryTransactionsParameters, transactionDetailFormat, includeRelated, pagingParameters).ToList();
		}
		catch (FaultException ex)
		{
			SoapFaultHandler.HandleFaultException(ex); 
		}
	}
}
public function queryTransactionsDetail($queryTransactionParameters, $includeRelated, $transactionDetailFormat, $pagingParameters)
{
	if (! $this->signOn ())
		return false;

	// Build QueryTransactionsDetail
	$qtd = new QueryTransactionsDetail();
	$qtd->sessionToken = $this->session_token;
	$qtd->queryTransactionsParameters = $queryTransactionParameters;
	$qtd->includeRelated = $includeRelated;
	$qtd->transactionDetailFormat = $transactionDetailFormat;
	$qtd->pagingParameters = $pagingParameters;

	try
	{
		$response = $this->txnManagement->QueryTransactionsDetail($qtd)->QueryTransactionsDetailResult->TransactionDetail;
		//echo ($this->txnManagement->__getLastRequest ());
		return $response;
	}
	catch ( SoapFault $e )
	{
		echo 'SERVER ERROR: Error trying to QueryTransactionFamilies.
';
		echo ('
'.$this->txnManagement->__getLastRequestHeaders());
		echo ('
' . $this->txnManagement->__getLastRequest ());
		echo ('
' . $this->txnManagement->__getLastResponse ());
		$xmlFault = $this->txnManagement->__getLastResponse ();
		$errors = handleTxnFault ( $e, $xmlFault );
		echo $errors;
		exit ();
	}
}

Back to the top
 

QueryTransactionFamilies

The QueryTransactionFamilies operation returns family summary information and a list of TransactionIds that can be used to query for full transaction details.
 

Operation

List FamilyDetail QueryTransactionFamilies(string sessionToken, QueryTransactionsParameters queryTransactionsParameters, PagingParameters pagingParameters.)

Parameters

Parameter Data Type Description
sessionToken String The limited-life token used to authenticate to CWS.
queryTransactionsParameters QueryTransactionsParameters Query parameters. Note: When TransactionTenderData is supplied, no other parameters are valid for the query.
pagingParameters PagingParameters Defines the parameters for the service to use for paging large datasets.
Note: the Paging Parameter PageSize is a value clamped between 0 and 50.

Return Type

Data Type Description
List Collection of transaction families.

Exceptions

AuthenticationFault TMSUnavailableFault
ExpiredTokenFault TMSUnknownServiceKeyFault
InvalidTokenFault TMSValidationResultFault
TMSTransactionFailedFault
For additional details about the Transaction Management faults listed above, refer to the Transaction Management Fault Reference.

 

Code Snippets

public List QueryTransactionFamilies(string sessionToken, QueryTransactionsParameters queryTransactionsParameters, PagingParameters pagingParameters)
{
	using (var client = new TMSOperationsClient(ConfigurationManager.AppSettings["Bindings.MgmtSoap"]))
	{
		try
		{
			return client.QueryTransactionFamilies(sessionToken, queryTransactionsParameters, pagingParameters).ToList();
		}
		catch (FaultException ex)
		{
			SoapFaultHandler.HandleFaultException(ex); 
		}
	}
}
public function queryTransactionFamilies($queryTransactionParameters, $includeRelated, $pagingParameters)
{
	if (! $this->signOn ())
		return false;

	// Build QueryTransactionsSummary
	$qtf = new QueryTransactionFamilies();
	$qtf->sessionToken = $this->session_token;
	$qtf->queryTransactionsParameters = $queryTransactionParameters;
	$qtf->includeRelated = $includeRelated;
	$qtf->pagingParameters = $pagingParameters;

	try
	{
		$response = $this->txnManagement->QueryTransactionFamilies($qtf)->QueryTransactionFamiliesResult;
		echo ($this->txnManagement->__getLastRequest ());
		return $response;
	}
	catch ( SoapFault $e )
	{
		echo 'SERVER ERROR: Error trying to QueryTransactionFamilies.
';
		echo ('
'.$this->txnManagement->__getLastRequestHeaders());
		echo ('
' . $this->txnManagement->__getLastRequest ());
		echo ('
' . $this->txnManagement->__getLastResponse ());
		$xmlFault = $this->txnManagement->__getLastResponse ();
		$errors = handleTxnFault ( $e, $xmlFault );
		echo $errors;
		exit ();
	}
}
Note: The HTTP Authorization Header must contain the required sessionToken value.

Back to the top
 

QueryTransactionsSummary

The QueryTransactionsSummary operation queries the specified transactions and returns summary details related to one or more transactions matching specific search criteria. You can indicate if the response will include all related transactions (includeRelated = ‘true’). This returns all transactions matching specific search criteria and all transactions that have parent/child relationships with those matches.
 

Operation

ListSummaryDetail QueryTransactionsSummary(string sessionToken, QueryTransactionsParameters queryTransactionsParameters, bool includeRelated, PagingParameters pagingParameters)

Parameters

Parameter Data Type Description
sessionToken String The limited-life token used to authenticate to CWS.
queryTransactionsParameters QueryTransactionsParameters Query parameters. Note: When TransactionTenderData is supplied, no other parameters are valid for the query.
pagingParameters PagingParameters Defines the parameters for the service to use for paging large datasets.
Note: the Paging Parameter PageSize is a value clamped between 0 and 50.
includeRelated Boolean Indicates whether transactions related to the resulting transaction should also be included.

Return Type

Data Type Description
List Collection of transaction summaries.

Exceptions

AuthenticationFault TMSUnavailableFault
ExpiredTokenFault TMSUnknownServiceKeyFault
InvalidTokenFault TMSValidationResultFault
TMSTransactionFailedFault
For additional details about the Transaction Management faults listed above, refer to the Transaction Management Fault Reference.

 

Code Snippets

public List QueryTransactionsSummary(string sessionToken, QueryTransactionsParameters queryTransactionsParameters, PagingParameters pagingParameters, Boolean includeRelated)
{
	using (var client = new TMSOperationsClient(ConfigurationManager.AppSettings["Bindings.MgmtSoap"]))
	{
		try
		{
			return client.QueryTransactionsSummary(sessionToken, queryTransactionsParameters, includeRelated, pagingParameters).ToList();
		}
		catch (FaultException ex)
		{
			SoapFaultHandler.HandleFaultException(ex); 
		}
	}
}
public function queryTransactionsSummary($queryTransactionParameters, $includeRelated, $pagingParameters)
{
	if (! $this->signOn ())
		return false;

	// Build QueryTransactionsSummary
	$qts = new QueryTransactionsSummary();
	$qts->sessionToken = $this->session_token;
	$qts->queryTransactionsParameters = $queryTransactionParameters;
	$qts->includeRelated = $includeRelated;
	$qts->pagingParameters = $pagingParameters;

	try
	{
		$response = $this->txnManagement->QueryTransactionsSummary($qts)->QueryTransactionsSummaryResult;
		//echo ($this->txnManagement->__getLastRequest ());
		//echo ($this->txnManagement->__getLastResponse());
		return $response;
	}
	catch ( SoapFault $e )
	{
		echo 'SERVER ERROR: Error trying to QueryTransactionsSummary.
';
		echo ('
'.$this->txnManagement->__getLastRequestHeaders());
		echo ('
' . $this->txnManagement->__getLastRequest ());
		echo ('
' . $this->txnManagement->__getLastResponse ());
		$xmlFault = $this->txnManagement->__getLastResponse ();
		$errors = handleTxnFault ( $e, $xmlFault );
		echo $errors;
		exit ();
	}
}

Back to the top
 

QueryRejectedDetail

The QueryRejectedDetail operation is used to collect transaction detail information from the service provider (post-settlement), in the event that a captured transaction was rejected during settlement by the service provider. The QueryRejectedDetail operation is supported by both the Bankcard Processing (BCP) and Electronic Checking (ECK) service classes.

For example, an ACH transaction is approved by the service provider and subsequently captured by the merchant for settlement processing. During funds processing of the transaction by the service provider, an “insufficient funds” condition occurs and the transaction is not processed. The merchant can use QueryRejectedDetail to discover this information, typically as a function of end-of-day reporting from the payment application, by reconciling actual dollars deposited in the merchant’s account.

Whether or not QueryRejectedDetail is available to the merchant depends on their service configuration returned in the ServiceInformation response to GetServiceInformation.
 

Operation

QueryResponse QueryRejectedDetail(string sessionToken, QueryRejectedParameters queryRejectedParameters, PagingParameters pagingParameters)

Parameters

Parameter Data Type Description
sessionToken String The limited-life token used to authenticate to CWS.
queryRejectedParameters QueryRejectedParameters Non-service class specific query parameters.
pagingParameters PagingParameters Defines the parameters for the service to use for paging large datasets.
Note: the Paging Parameter PageSize is a value clamped between 0 and 50.

Return Type

Data Type Description
QueryResponse A collection of batch details. Note: The response object is ElectronicCheckingRejectedDetailResponse.

Exceptions

AuthenticationFault TMSTransactionFailedFault
ExpiredTokenFault TMSUnavailableFault
InvalidTokenFault TMSUnknownServiceKeyFault
TMSOperationNotSupportedFault TMSValidationResultFault
For additional details about the Transaction Management faults listed above, refer to the Transaction Management Fault Reference.

Back to the top
 

QueryRejectedSummary

The QueryRejectedSummary operation is used to collect transaction summary information from the service provider (post-settlement), in the event that a captured transaction was rejected during settlement by the service provider. The QueryRejectedSummary operation is supported by both the Bankcard Processing (BCP) and Electronic Checking (ECK) service classes.

For example, an ACH transaction is approved by the service provider and subsequently captured by the merchant for settlement processing. During funds processing of the transaction by the service provider, an “insufficient funds” condition occurs and the transaction is not processed. The merchant can use QueryRejectedSummary to discover this information, typically as a function of end-of-day reporting from the payment application, by reconciling actual dollars deposited in the merchant’s account.

Whether or not QueryRejectedSummary is available to the merchant depends on their service configuration returned in the ServiceInformation response to GetServiceInformation.
 

Operation

QueryResponse QueryRejectedSummary(string sessionToken, QueryRejectedParameters queryRejectedParameters, PagingParameters pagingParameters)

Parameters

Parameter Data Type Description
sessionToken String The limited-life token used to authenticate to CWS.
queryRejectedParameters QueryRejectedParameters Non-service class specific query parameters.
pagingParameters PagingParameters Defines the parameters for the service to use for paging large datasets.
Note: the Paging Parameter PageSize is a value clamped between 0 and 50.

Return Type

Data Type Description
QueryResponse A collection of batch details. Note: The response object is ElectronicCheckingRejectedSummaryResponse.

Exceptions

AuthenticationFault TMSTransactionFailedFault
ExpiredTokenFault TMSUnavailableFault
InvalidTokenFault TMSUnknownServiceKeyFault
TMSOperationNotSupportedFault TMSValidationResultFault
For additional details about the Transaction Management faults listed above, refer to the Transaction Management Fault Reference.

Back to the top