Transaction Administration - Query Transaction


ability to query system for transaction payment information)

Variable Required Max Size Notes
publisher-name Mandatory NA Gateway account username issued to you.
publisher-password Mandatory NA Remote Client Password - This is different then the password used to login.
mode Mandatory NA Value needs to be set to ‘query_trans’
orderID Mandatory 20 Original transaction’s transaction ID.
startdate Mandatory 8 Start Date of transactions to assemble. Format: YYYYMMDD
enddate Optional 8 End Date of transactions to assemble. Format: YYYYMMDD
accttype Optional 8 Possible Values: ‘checking’, ‘savings’, and blank.Used to filter response.Defaults to displaying all account types when omitted.
operation Optional 10 Possible Values: ‘auth’, ‘postauth’, ‘forceauth’, ‘return’, and ‘void’Used to filter response (see not 1).Defaults to displaying any operation.
result Optional 10 Possible Values: ‘success’, ‘pending’, ‘badcard’, and ‘problem’Used to filter response.Defaults to displaying any status.
notify-email Optional NA Email Address to send alert notice for transaction problems.
gresp Optional NA Set value to ‘simple’ to receive the corresponding results in abbreviated form.
ordersummary Optional NA Set value to ‘1’ to include Order Database summary data in the corresponding results. This includes, but is not limited to: the shipping address, tax/shipping fees, and other related order details (see note 3).
orderdetails Optional NA Set value to ‘1’ to include Order Database itemized product details in the corresponding results. This includes product’s item, cost, quantity, description, and other related details (see note 3).
acct_code Optional 20 Use to customize report and group transactons.
acct_code2 Optional 20 Use to customize report and group transactons.
acct_code3 Optional 20 Use to customize report and group transactons.

Notes:

  1. When reviewing settlement data, you won’t know ahead of time what the values for ‘batchtotal_xxxxxx’ and ‘datetotal_YYYYMMDD’ will be. You will have to loop through all of the returned variables and look for the keys that match the pattern ‘batchtotal_’ and ‘datetotal_’ to pull out the batchID’s and dates.

  2. When querying only one transaction and the orderID is known, it is highly recommended that the ‘orderID’ field is used. This will result in a much faster query.

  3. This ‘ordersummary’ and ‘orderdetails’ parameters assume complete/itemized order information was supplied to us at time of authorization. If you have not supplied us complete/itemized order information for your transactions, do not use these options.

Response Values - Query Transaction

Variable Value Notes
FinalStatus success/problem Will return either ‘success’ upon success or ‘problem’ on failure.
success yes/no Will return either ‘yes’ upon success or ’no’ upon failure.
Mstatus success/problem Deprecated in favor of FinalStatus.
MErrMsg Error message if applicable on failure, i.e. No records found.
axxxx (xxxx will be a number from 00001 - 99999) Returned data record for each transaction Record will be URL encoded in the following format (field order no fixed):trans_date=data&operation=data&FinalStatus=data&card-amount=data&card-name=data&card-address1=data&card-city=data&card-state=data&card-zip=data&card-country=data&card-number=data&card-exp=data&result=data&MErrMsg=data&acct_code=data&acct_code2=data&acct_code3=data&acct_code4=data&auth-code=data&avs-code=data&…
opertotal_xxxxx (xxxxx being an operation) The sum of all transactions of the specified operation. For example, if you did a general query without specifying any operation then you could expect to receive back the following variables: opertotal_auth, opertotal_postauth, opertotal_return, opertotal_void, etc.
batchtotal_xxxxx (where xxxxx is the batchID) Appears when ‘operation’ is set to ‘batchquery’ and ‘status’ is set to ‘success’. This returns the the amount of each batch. Automatically adds all postauths and subtracts all returns.
datetotal_YYYYMMDD (where YYYYMMDD is a date format) Appears when ‘operation’ is set to ‘batchquery’ and ‘status’ is set to ‘success’. This is similar to the ‘batchtotal_xxxxx’ field except that it is by date.