SOAP API Reference
Optional Operations (SOAP)
The Acknowledge
operation is used to mark a transaction as ‘acknowledged’ after receiving a successful transaction response. This acknowledgement is useful when performing transaction management functions, such as those provided by the Transaction Management Service API.
Once a successful transaction processing response has been received, the Acknowledge
operation can be called to set an IsAcknowledged flag to ‘true’ in the transaction database for a specific transactionId
. In the event that a transaction response is not received, specific Transaction Management operations can be called to query the transaction database for transactions that have the IsAcknowledged flag set to ‘false’. This is helpful when troubleshooting the reason for a failed transaction.
Operation
Response Acknowledge(string sessionToken, string transactionId, string applicationProfileId, string workflowId);
Parameters
Parameter | Data Type | Description |
---|---|---|
sessionToken |
String | The limited-life token used to authenticate to CWS. |
transactionId |
String | The transactionId to acknowledge. |
applicationProfileId |
String | A token representing the PTLS Socket ID unique to each Service Key and configuration data combination. Returned by the SaveApplicationData operation. |
workflowId |
String | Identifies the workflow to use for the transaction. If not supporting custom workflows, pass the serviceId returned by GetServiceInformation . |
Return Type
Data Type | Description |
---|---|
Response |
Transaction response data.
Note: For Bankcard (BCP) transactions, the response object is BankcardTransactionResponsePro . |
Exceptions
CWSFault |
CWSInvalidOperationFault |
AuthenticationFault |
CWSInvalidServiceInformationFault |
ExpiredTokenFault |
CWSOperationNotSupportedFault |
InvalidTokenFault |
CWSTransactionAlreadySettledFault |
CWSConnectionFault |
CWSTransactionFailedFault |
CWSExtendedDataNotSupportedFault |
CWSTransactionServiceUnavailableFault |
CWSInvalidMessageFormatFault |
CWSValidationResultFault |
The QueryAccount
operation is used to perform a balance inquiry on a cardholder’s account to determine the current account balance. It can also be used to perform a balance inquiry on pre-paid credit cards.
Operation
Response QueryAccount(string sessionToken, Transaction transaction, string applicationProfileId, MerchantProfile merchantProfile, string merchantProfileId, string workflowId);
Parameters
Parameter | Data Type | Description |
---|---|---|
sessionToken |
String | The limited-life token used to authenticate to CWS. |
transaction |
Transaction |
Transaction detail data. |
applicationProfileId |
String | A token representing the PTLS Socket ID unique to each Service Key and configuration data combination. Returned by the SaveApplicationData operation. |
merchantProfileId |
String | The specific Merchant Profile Identifier to use. |
workflowId |
String | Identifies the workflow to use for the transaction. If not supporting custom workflows, pass the serviceId returned by GetServiceInformation . |
Return Type
Data Type | Description |
---|---|
Response |
Transaction response data.
Note: For Bankcard (BCP) transactions, the response object is BankcardTransactionResponsePro . |
Exceptions
CWSFault |
CWSInvalidOperationFault |
AuthenticationFault |
CWSInvalidServiceInformationFault |
ExpiredTokenFault |
CWSOperationNotSupportedFault |
InvalidTokenFault |
CWSTransactionAlreadySettledFault |
CWSConnectionFault |
CWSTransactionFailedFault |
CWSExtendedDataNotSupportedFault |
CWSTransactionServiceUnavailableFault |
CWSInvalidMessageFormatFault |
CWSValidationResultFault |
Code Snippets
/* $credit_info is class type creditCard * $trans_info is class type transData * $amount and $tip_amount: ('#.##'} (At least $1, two decimals required (1.00))*/ public function queryAccount($ach_info, $trans_info) { if (! $this->signOn ()) return false; $ach_trans = buildACHTransaction($ach_info, $trans_info); // Build QueryAccount $queryAccount = new QueryAccount(); $queryAccount->sessionToken = $this->session_token; $queryAccount->transaction = $ach_trans; $queryAccount->merchantProfileId = $this->merchantProfileID; $queryAccount->workflowId = $this->workflowId; $queryAccount->applicationProfileId = $this->appProfileID; try { $authResponse = $this->bankCard->QueryAccount( $queryAccount )->QueryAccountResult; //var_dump($queryAccount); //echo ($this->bankCard->__getLastRequest ()); //echo (' ' . $this->bankCard->__getLastResponse ()); return $authResponse; } catch ( SoapFault $e ) { echo 'SERVER ERROR: Error trying to Query Account. '; //var_dump($queryAccount); //echo(' '.$this->bankCard->__getLastRequestHeaders()); //echo (' ' . $this->bankCard->__getLastRequest ()); //echo (' ' . $this->bankCard->__getLastResponse ()); $xmlFault = $this->bankCard->__getLastResponse (); $errors = handleTxnFault ( $e, $xmlFault ); echo $errors; exit (); } }
The Disburse
operation is used to submit a disbursement request to the service provider who then electronically disburses funds from the payer’s bank account to the payee’s account.
Operation
Response Disburse(string sessionToken, Transaction transaction, string applicationProfileId, MerchantProfile merchantProfile, string merchantProfileId, string workflowId);
Parameters
Parameter | Data Type | Description |
---|---|---|
sessionToken |
String | The limited-life token used to authenticate to CWS. |
transaction |
Transaction |
Transaction detail data.
Note: You must send in BankcardTransaction for Bankcard transactions. |
applicationProfileId |
String | A token representing the PTLS Socket ID unique to each Service Key and configuration data combination. Returned by the SaveApplicationData operation. |
merchantProfileId |
String | The specific Merchant Profile Identifier to use. |
workflowId |
String | Identifies the workflow to use for the transaction. If not supporting custom workflows, pass the serviceId returned by GetServiceInformation . |
Return Type
Data Type | Description |
---|---|
Response |
Transaction response data.
Note: For Bankcard (BCP) transactions, the response object is BankcardTransactionResponsePro . |
Exceptions
CWSFault |
CWSInvalidOperationFault |
AuthenticationFault |
CWSInvalidServiceInformationFault |
ExpiredTokenFault |
CWSOperationNotSupportedFault |
InvalidTokenFault |
CWSTransactionAlreadySettledFault |
CWSConnectionFault |
CWSTransactionFailedFault |
CWSExtendedDataNotSupportedFault |
CWSTransactionServiceUnavailableFault |
CWSInvalidMessageFormatFault |
CWSValidationResultFault |
The Verify
operation is used to verify information about a payment account, such as address verification data (AVSData) on a credit card account, without reserving any funds.
Verify
operation is specific to Credit transactions only.Operation
Response Verify(string sessionToken, Transaction transaction, string applicationProfileId, MerchantProfile merchantProfile, string merchantProfileId, string workflowId);
Parameters
Parameter | Data Type | Description |
---|---|---|
sessionToken |
String | The limited-life token used to authenticate to CWS. |
transaction |
Transaction |
Transaction detail data.
Note: You must send in BankcardTransaction for Bankcard transactions. |
applicationProfileId |
String | A token representing the PTLS Socket ID unique to each Service Key and configuration data combination. Returned by the SaveApplicationData operation. |
merchantProfileId |
String | The specific Merchant Profile Identifier to use. |
workflowId |
String | Identifies the workflow to use for the transaction. If not supporting custom workflows, pass the serviceId returned by GetServiceInformation . |
Return Type
Data Type | Description |
---|---|
Response |
Transaction response data.
Note: For Bankcard (BCP) transactions, the response object is BankcardTransactionResponsePro . |
Exceptions
CWSFault |
CWSInvalidOperationFault |
AuthenticationFault |
CWSInvalidServiceInformationFault |
ExpiredTokenFault |
CWSOperationNotSupportedFault |
InvalidTokenFault |
CWSTransactionAlreadySettledFault |
CWSConnectionFault |
CWSTransactionFailedFault |
CWSExtendedDataNotSupportedFault |
CWSTransactionServiceUnavailableFault |
CWSInvalidMessageFormatFault |
CWSValidationResultFault |
The RequestTransaction
operation allows for the retrieval of any transaction matching the supplied tender data. This is useful in situations when the application does not receive a response from CWS indicating the TransactionState
.
Operation
ListRequestTransaction(string sessionToken, string merchantProfileId, TransactionTenderData tenderData);
Parameters
Parameter | Data Type | Description |
---|---|---|
sessionToken |
String | The limited-life token used to authenticate to CWS. |
merchantProfileId |
String | The specific Merchant Profile Identifier to use. |
tenderData |
TransactionTenderData |
The tender data to match. |
Return Type
Data Type | Description |
---|---|
List<Response > |
Returns one or more transactions that match the supplied tender data.
Note: For Bankcard (BCP) transactions, the response object is BankcardTransactionResponsePro . |
Exceptions
CWSFault |
CWSInvalidOperationFault |
AuthenticationFault |
CWSInvalidServiceInformationFault |
ExpiredTokenFault |
CWSOperationNotSupportedFault |
InvalidTokenFault |
CWSTransactionAlreadySettledFault |
CWSConnectionFault |
CWSTransactionFailedFault |
CWSExtendedDataNotSupportedFault |
CWSTransactionServiceUnavailableFault |
CWSInvalidMessageFormatFault |
CWSValidationResultFault |