Overview

The Transaction History API provides a list of all transactions that match the search criteria set in the Request Message. Searches can be based on one the following elements:

  • Order ID
  • TenderType and Payment Account Unique ID
  • Gateway Key
  • Secondary Gateway Key
  • Store Id and Order ID
  • Store ID and Gateway Key
Optionally, a date range can be added to the criteria for any search. The date range is specified with FromDatetime and ToDatetime.

URI Summary

Action URI Template URI Example Request Content Type Response Content Type
POST /vM.m/stores/{StoreId}/payments/transaction/history.xml /v1.0/stores/TMSUS/payments/transaction/history.xml application/xml or text/xml application/xml or text/xml

Request Elements

The elements and attributes for the Transaction History Request Message vary according to the type of search.

By Order ID

Element Required Description Type Restriction
OrderId Yes The order ID of the transactions, as a search term to retrieve a list of transactions. String Min - 1 Character
Max - 20 Characters
FromDateTime No The beginning of the time frame in which to look up transaction history. DateTime yyyy-MM-ddTHH:mm:ss
ToDateTime No The ending of the time frame in which to look up transaction history. DateTime yyyy-MM-ddTHH:mm:ss

By Tender Type and Payment Account Unique ID

Element Required Description Type Restriction
TenderType Yes The tender type of the payment method used for the transactions, as a search term to retrieve a list of transactions. String PrivateLabelCreditCard, CreditCard, StoredValue
PaymentAccountUniqueId Yes The Payment Account Unique ID of the tender that is to be looked up String 22 Characters
PaymentAccountUniqueId
@isToken
Yes Attribute that indicates whether the payment account number is tokenized String true or false
FromDateTime No The beginning of the time frame in which to look up transaction history. DateTime yyyy-MM-ddTHH:mm:ss
ToDateTime No The ending of the time frame in which to look up transaction history. DateTime yyyy-MM-ddTHH:mm:ss

By Gateway Key

Element Required Description Type Restriction
GatewayKey Yes The gateway key of the transactions, as a search term to retrieve a list of transactions. String Min - 1 Character
Max - 30 Characters
FromDateTime No The beginning of the time frame in which to look up transaction history. DateTime yyyy-MM-ddTHH:mm:ss
ToDateTime No The ending of the time frame in which to look up transaction history. DateTime yyyy-MM-ddTHH:mm:ss

By Secondary Gateway Key

Element Required Description Type Restriction
SecondaryGatewayKey Yes The secondary gateway key of the transactions, as a search term to retrieve a list of transactions. String Min - 1 Character
Max - 16 Characters
FromDateTime No The beginning of the time frame in which to look up transaction history. DateTime yyyy-MM-ddTHH:mm:ss
ToDateTime No The ending of the time frame in which to look up transaction history. DateTime yyyy-MM-ddTHH:mm:ss

By Store ID And Order ID

Element Required Description Type Restriction
StoreId Yes Store ID used for the transaction, as a search term to retrieve a list of transactions. String Min length : 1 character
Max length : 100 characters
OrderId Yes The order ID of the transactions, as a search term to retrieve a list of transactions. String Min - 1 Character
Max - 20 Characters
FromDateTime No The beginning of the time frame in which to look up transaction history. DateTime yyyy-MM-ddTHH:mm:ss
ToDateTime No The ending of the time frame in which to look up transaction history. DateTime yyyy-MM-ddTHH:mm:ss

By Store Id And Gateway Key

Element Required Description Type Restriction
StoreId Yes Store ID used for the transaction, as a search term to retrieve a list of transactions. String Min length : 1 character
Max length : 100 characters
GatewayKey Yes The gateway key of the transactions, as a search term to retrieve a list of transactions. String Min - 1 Character
Max - 30 Characters
FromDateTime No The beginning of the time frame in which to look up transaction history. DateTime yyyy-MM-ddTHH:mm:ss
ToDateTime No The ending of the time frame in which to look up transaction history. DateTime yyyy-MM-ddTHH:mm:ss

Request Examples

The following examples show request messages for different types of searches.

By Order ID

Copy

                <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
                <TransactionHistoryRequest xmlns="http://api.gsicommerce.com/schema/checkout/1.0">
                    <OrderId>11111123</OrderId>
                    <FromDateTime>2015-06-01T00:00:00</FromDateTime>
                    <ToDateTime>2015-07-01T00:00:00</ToDateTime>
                </TransactionHistoryRequest>
            

By Tender Type and Payment Account Unique ID

Copy

                <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
                <TransactionHistoryRequest xmlns="http://api.gsicommerce.com/schema/checkout/1.0" sessionId="1234">
                    <TenderType>VC</TenderType>
                    <PaymentAccountUniqueId isToken="false">4111111111111111</PaymentAccountUniqueId>
                    <FromDateTime>2015-06-01T00:00:00</FromDateTime>
                    <ToDateTime>2015-07-01T00:00:00</ToDateTime>
                </TransactionHistoryRequest>
            

By Gateway Key

Copy

                <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
                <TransactionHistoryRequest xmlns="http://api.gsicommerce.com/schema/checkout/1.0" sessionId="1234">
                    <GatewayKey>12345</GatewayKey>
                    <FromDateTime>2015-06-01T00:00:00</FromDateTime>
                    <ToDateTime>2015-07-01T00:00:00</ToDateTime>
                </TransactionHistoryRequest>
            

By Secondary Gateway Key

Copy

                <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
                <TransactionHistoryRequest xmlns="http://api.gsicommerce.com/schema/checkout/1.0" sessionId="1234">
                    <SecondaryGatewayKey>4443333</SecondaryGatewayKey>
                    <FromDateTime>2015-06-01T00:00:00</FromDateTime>
                    <ToDateTime>2015-07-01T00:00:00</ToDateTime>
                </TransactionHistoryRequest>
            

By Store ID And Order ID

Copy

                <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
                <TransactionHistoryRequest xmlns="http://api.gsicommerce.com/schema/checkout/1.0">
                    <StoreId>TMSUS</StoreId>
                    <OrderId>11111123</OrderId>
                    <FromDateTime>2015-06-01T00:00:00</FromDateTime>
                    <ToDateTime>2015-07-01T00:00:00</ToDateTime>
                </TransactionHistoryRequest>
            

By Store ID And Gateway Key

Copy

                <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
                <TransactionHistoryRequest xmlns="http://api.gsicommerce.com/schema/checkout/1.0" sessionId="1234">
                    <StoreId>TMSUS</StoreId>
                    <GatewayKey>12345</GatewayKey>
                    <FromDateTime>2015-06-01T00:00:00</FromDateTime>
                    <ToDateTime>2015-07-01T00:00:00</ToDateTime>
                </TransactionHistoryRequest>
            

Response Elements

Element Required Description Type Restriction
Transactions Yes The transactions matching the criteria of the request Complex Type
Transactions/
PaymentTransaction
No An individual transaction matching the request criteria Complex Type
PaymentTransaction/
PaymentContext
Yes The payment context of the transaction Complex Type
PaymentTransaction/
PaymentContext/
OrderId
Yes The order ID for the payment context of the transaction String 22 Characters
PaymentTransaction/
PaymentContext/
PaymentAccountUniqueId
Yes Either a raw Account Id or a token representing Account Id String 22 Characters
PaymentTransaction/
PaymentContext/
PaymentAccountUniqueId
@isToken
Yes Attribute that indicates whether the payment account number is tokenized String true or false
PaymentTransaction/
TenderType
Yes The Tender Type used in the transaction String PrivateLabelCreditCard, CreditCard, StoredValue
PaymentTransaction/
TransactionType
Yes The type of transaction that was performed String  
PaymentTransaction/
TransactionStatus
No The failure or success status of the transaction String  
PaymentTransaction/
TransactionAmount
No The amount of the transaction String  
PaymentTransaction/
TransactionAmount/
@currencyCode
Yes Attribute that identifies the currency for the TransactionAmount String IS-4217 three-letter code
PaymentTransaction/
ResponseCode
No The Response Code for the transaction String  
PaymentTransaction/
GatewayKey
No A key value returned by the gateway that processed the transaction String 30 Characters
PaymentTransaction/
GatewayResponseCode
No A response code returned from the gateway for the transaction String  
PaymentTransaction/
RequestTimestamp
No The timestamp of when the transactions request was made DateTime yyyy-MM-ddTHH:mm:ss.SSSZ
PaymentTransaction/
ReplyTimestamp
No The timestamp of when the transactions reply was made DateTime yyyy-MM-ddTHH:mm:ss.SSSZ
PaymentTransaction/
SecondaryGatewayKey
No A key value returned by the gateway that processed the transaction String 16 Characters
PaymentTransaction/
GatewayId
No The ID of the gateway that processed the transaction String  
PaymentTransaction/
CreditCardTransaction
No Information relevant to a Credit Card transaction Complex Type
PaymentTransaction/
SettlementTransaction
No Information relevant to a settlement transaction Complex Type
CreditCardTransaction/
AuthorizedAmount
No The amount authorized by the credit card String  
CreditCardTransaction/
AuthorizationCode
No An authorization code returned by the gateway that processed the transaction String  
CreditCardTransaction/
AuthorizationDate
No The date when the authorization was performed, in YYYY-MM-DD format date YYYY-MM-DD
CreditCardTransaction/
VerbalAuth
No Was the authorization performed as a verbal authorization? boolean true/false
CreditCardTransaction/
AvsResponse
No The response code returned by the address verification check String  
CreditCardTransaction/
Cvv2Response
No The response code returned by the CVV verification check String  
CreditCardTransaction/
CardExpirationDate
No The expiration date of the credit card used in the transaction, in YYYY-MM format gYearMonth YYYY-MM
SettlementTransaction/
TaxAmount
No The amount of taxes for the settlement transaction String  
SettlementTransaction/
SettlementType
No The type of settlement for the transaction String  
SettlementTransaction/
SettlementStatus
No The settlement status of the transaction String  
SettlementTransaction/
SettlementSentDate
No The date when the settlement was sent, in YYYY-MM-DD format date YYYY-MM-DD
SettlementTransaction/
SettlementConfirmDate
No The date when the settlement confirmation was sent, in YYYY-MM-DD format date YYYY-MM-DD
SettlementTransaction/
TransactionDate
No The date the transaction being settled took place, in YYYY-MM-DD format date YYYY-MM-DD
SettlementTransaction/
BusinessDate
No The date {fill in} date YYYY-MM-DD
SettlementTransaction/
BatchId
No The batch ID of the batch the settlement was sent in String  
SettlementTransaction/
SettlementConfirmationAmount
No The amount actually confirmed and settled on String  
SettlementTransaction/
SettlementConfirmationAmount/
@currencyCode
Yes if Settlement Confirmation Amount is present Code identifies the currency for SettlementConfirmationAmount String IS-4217 three-letter code
SettlementTransaction/
ProcessorSettleStatusCode
No The status code of the settlement returned by the process provider String  
SettlementTransaction/
ProcessorSettleReasonCode
No The reason code of the settlement returned by the process provider String  
MockPayment No This element indicates the transaction is Mock Payment or not. boolean

true or false

Response Example

Copy
<?xml version="1.0" encoding="UTF-8"?>
<TransactionHistoryReply xmlns="http://api.gsicommerce.com/schema/checkout/1.0">
   <Transactions>
      <PaymentTransaction>
         <PaymentContext>
            <OrderId>0002610423_s1_3</OrderId>
            <PaymentAccountUniqueId isToken="true">4111110PASeK1111</PaymentAccountUniqueId>
         </PaymentContext>
         <TenderType>VC</TenderType>
         <TransactionType>Credit Card Authorization</TransactionType>
         <TransactionStatus>S</TransactionStatus>
         <TransactionAmount currencyCode="USD">116.87</TransactionAmount>
         <ResponseCode>APPROVED</ResponseCode>
         <GatewayKey>20694</GatewayKey>
         <GatewayResponseCode>100</GatewayResponseCode>
         <RequestTimestamp>2015-06-03T20:40:17.936Z</RequestTimestamp>
         <ReplyTimestamp>2015-06-03T20:40:18.019Z</ReplyTimestamp>
         <SecondaryGatewayKey>-1</SecondaryGatewayKey>
         <GatewayId>COMPASS</GatewayId>
         <CreditCardTransaction>
            <AuthorizationCode>000075</AuthorizationCode>
            <AuthorizationDate>2015-06-03</AuthorizationDate>
            <VerbalAuth>false</VerbalAuth>
            <AvsResponse>M</AvsResponse>
            <Cvv2Response>M</Cvv2Response>
            <CardExpirationDate>2018-12</CardExpirationDate>
         </CreditCardTransaction>
         <MockPayment>true</MockPayment>
      </PaymentTransaction>
      <PaymentTransaction>
         <PaymentContext>
            <OrderId>00026109284_s1_2</OrderId>
            <PaymentAccountUniqueId isToken="true">4111110PASeK1111</PaymentAccountUniqueId>
         </PaymentContext>
         <TenderType>VC</TenderType>
         <TransactionType>Credit Card Authorization</TransactionType>
         <TransactionStatus>S</TransactionStatus>
         <TransactionAmount currencyCode="USD">116.87</TransactionAmount>
         <ResponseCode>APPROVED</ResponseCode>
         <GatewayResponseCode>100</GatewayResponseCode>
         <RequestTimestamp>2015-06-10T00:01:58.579Z</RequestTimestamp>
         <ReplyTimestamp>2015-06-10T00:01:58.655Z</ReplyTimestamp>
         <SecondaryGatewayKey>-1</SecondaryGatewayKey>
         <GatewayId>COMPASS</GatewayId>
         <CreditCardTransaction>
            <AuthorizationCode>000024</AuthorizationCode>
            <AuthorizationDate>2015-06-10</AuthorizationDate>
            <VerbalAuth>false</VerbalAuth>
            <AvsResponse>M</AvsResponse>
            <Cvv2Response>M</Cvv2Response>
            <CardExpirationDate>2018-12</CardExpirationDate>
         </CreditCardTransaction>
         <MockPayment>true</MockPayment>
      </PaymentTransaction>
   </Transactions>
</TransactionHistoryReply>