Web Services for Client, Merchant and Transaction

Send comments on this topic.
See Also

 

This Web Service includes the following services:

  • Client – Create and manage client and payment method tokens.
  • Transaction – Search and pull transaction information.
  • Merchant – Pull hierarchy data

Table of Contents


Enum/Types

Name
ClientStatus
CompareOperators
EntryType
FundingType
OriginationSummary
PaymentType
SearchOperators
SearchType
SettleSummary
SortDirection
TransactionColumn

 

Back to Top

 

Objects

NOTE: The requirement indicators in the tables that follow are: (M)anditory, (O)ptional, (C)onditional , (R)eturned and dash ("-") for not applicable (or ignored). The data types are N for numeric, A for alphanumeric, B for boolean, E for enumeration (values listed in the Notes column) with field widths where significant.

Name Description
Authentication Authentication
Client Client data object
EntryType Entry Type 
Hierarchy Hierarchy
LineItem Line Item 
Merchant Merchant data
Page Page
PaymentMethod Payment method data
Range Range object.
ReceivedSummary Received Summary 
SearchFilter Common filter parameters
Settlement Detail settlement transaction data
Transaction Transaction response data
TransactionResponse Detail transaction data
TransactionSummary Summary transaction data

 

Methods

 

Authentication

Although these methods are contained outside the transaction and client service, the Authentication methods play a major role in executing transaction and client requests. For complete code samples, for the two methods below this paragraph, please download the ServiceTestClient project

Name Description
GetTransactionAuthTicket Allows user to authenticate and work with TransactionService
GetClientAuthTicket Allows user to authenticate and work with ClientService

 

Clients Live Sandbox

Name Description 
createClient Creates a client
updateClient Updates a client
deleteClient Deletes a client
getClient Get a client
Payment Methods  
createPaymentMethod Create a payment method
updatePaymentMethod Updates a payment method
deletePaymentMethod Deletes a payment method
getPaymentMethod Get a payment method

 

Merchants Live Sandbox

Name Description
getHierarchyTree Get merchant hierarchy tree

 

Transactions Live Sandbox

Name Description
searchTransactions Search received or originated transactions
searchSettleActivity Search settled transactions
getReceivedSummary Get received transactions by date
getOriginationSummary Get originated transactions by date
getSettleSummary Get summary transactions by date
getSettleDetail Get settle detail transactions by settle date
getReceivedDetail Get received detail transactions by received date
getTransaction Get details of a transaction

 

Back to Top

 

Enum

Active
Deleted
Suspended

 

Back to Top

CompareOperators

Equal
NotEqual
GreaterThan
LessThan


Note: Equal behaves similar to starts with.

 

Back to Top

 

EntryType

VISA
MAST
DISC
AMER
DINE
JCB
PPD
CCD
POP
RCK
WEB
TEL
CTX
CIE
POS
ARC
BOC
None

 

Back to Top

 

FundingType

Funded  (eCheck)
Rejected (eCheck)
Previously_Funded_Reject  (eCheck)
Settled (Credit Card)
Chargeback (Credit Card)
UnChargeback (Credit Card)

 

Back to Top

 

PaymentType

eCheck
CreditCard

 

Back to Top

 

SearchOperators

And
Or

 

Back to Top

 

SearchType

 

Received
Originated


Back to Top

 

SortDirection

ascending
descending


 

Back to Top

 

 

TransactionColumn

FirstName
LastName
CompanyName
EnteredBy
Last4
Amount
ConsumerID
Status

 

Back to Top

  

 

 

Types

Folder

Name Type Description 
Name string Folder Name
HID int Hierarchy ID
Folders array Array of Folder Objects
Merchants array Array of Merchant Objects

 

Back to Top

 

OriginationSummary

Name Type  Description 
MerchantID string Merchant ID
DateSum datetime Date summary
TransactionType int Transaction type
Status string Status
EntryType string Entry type
Count int Count
ConvFeeAmount double Convenience fee amount (service fee) 
TotalAmount double Total amount

 

Back to Top

 

SettleSummary

Name Type  Description 
MerchantID int Merchant ID
SettleDate datetime Settle date
ResponseCode string Response code
FundingType string FundingType
Count int Count
ConvFeeAmount double Principal convenience fee amount (service fee) 
TotalAmount double Principal total amount
ConvFeeAmountFunded double Funded convenience fee amount (service fee)
TotalAmountFunded double Funded total amount

 

Back to Top

 

Object

The Authentication object contains the ApiLoginID and SecureTransactionKey used to identify and authenticate the requestor. Both fields may be maintained in the Virtual Terminal’s "Gateway Settings" section.

Name Type Description
APILoginID string Set in the Virtual Terminal.
TSHash string HMACMD5 (APILoginID + "|" + UTCTime, SecureTransactionKey)
UTCTime string UTC in ticks (since 01/01/0001 00:00:00)

 

Back to Top


Client

This object is used to represent the information for a given client. Most fields are alphanumeric in nature. The only validation rules are (1) that the record must have either First and Last name or a company name and (2) the Status must be one of the enumerated values: ACTIVE, SUSPENDED or DELETED. Note that transactions for suspended clients will always fail. (M)anditory, (O)ptional, (C)onditional, (R)eturned

Name Type Create Update Delete Get Description
MerchantID int M M M M Merchant ID
ClientID int R M M M Client ID
FirstName string M M M M Optional if company name is present.
LastName string M O - R Optional if company name is present.
CompanyName string C O - R Optional if first and last name are present.
Address1 string C O - R Billing Address for customer, first line.
Address2 string O O - R Billing Address for customer, second line (i.e. Apt.).
City string O O - R Billing City for customer.
State string O O - R Billing State, two letter abbreviation for customer.
PostalCode string O O - R Billing zip code for customer.
PhoneNumber string O O - R Billing phone number for customer.
CountryCode string O O - R Billing country code for customer. United States is 01.
EmailAddress string O O - R Billing e-mail for customer.
FaxNumber string O O - R Billing fax for customer.
ShiptoFirstName string O O - R First name of goods receiver.
ShiptoLastName string O O - R Last name of goods receiver.
ShiptoCompanyName string O O - R Company name of goods receiver, if applicable.
ShiptoAddress1 string O O - R First line of shipping address.
ShiptoAddress2 string O O - R Second line of shipping address (i.e. Apt. #).
ShiptoCity string O O - R Customer's shipping address.
ShiptoState string O O - R Shipping address' state. Two letter abbreviation.
ShiptoPostalCode string O O - R Customer's shipping address' zip code.
ShiptoCountryCode string O O - R Country code of shipping address. 01 is for United States.
ShiptoPhoneNumber string O O - R Phone number for customer receiving product.
ShiptoFaxNumber string O O - R Fax number for customer receiving product.
ConsumerID string O O - R Consumer ID
Status enum - O - R ACTIVE, SUSPENDED, DELETED
 


EntryType

Name Type Description
CC_Sale_10 string Credit Card 10
CC_Auth_Only_11 string  Credit Card Authorization Only 11 
CC_Credit_13 string  Credit Card Credit 13 
CC_Ext_Authorization_15 string  Credit Card External Authorization 15 
eCheck_Sale_20 string eCheck Sale 20 
eCheck_Auth_Only_21 string  eCheck Authorization Only 21 
eCheck_Credit_23 string eCheck Credit 23 
eCheck_Force_25 string  eCheck Force 25 
 

Hierarchy

Name Type Description
Folder Folder Top Folder Object
 

Back to Top

 

LineItem

Name Type Description
Headers string Header data
Items string Item data

 

Back to Top

 

Merchant

Name Type Description
Name string Merchant Name
ID int Merchant ID

 

Back to Top

 

Page

Name Type Description
PageSize int Number of records returned. 0 = maximum.
PageIndex int Page number (0 based)
SortBy TransactionColumn Sort by this field.
SortDirection enum Direction of the sorted field

 

Back to Top

This object is used to represent payment method data. The ClientID may be omitted if it is for use without a Client record. Only the AcctHolderName, CcExpirationDate, CcProcurementCard, Note, and IsDefault fields may be updated. Other changes represent a new payment method and will have to be put into a new PaymentMethod record. CcCardNumber and EcAccountNumber fields are masked in response messages. Each record may hold either credit card or electronic check information but never both. (M)anditory, (O)ptional, (C)onditional, (R)eturned

Name Type Create Update Delete Get Description
MerchantID int M M M M Merchant ID.
ClientID int M M - O If not zero, must exist and be associated with Merchant ID.
PaymentMethodID int R M M O Assigned by service for Create. Update must exist and be associated with Merchant ID.
AcctHolderName string R M M O Full name of credit card account holder, as it appears on the credit card.
CcCardNumber string M O - R Must be a valid credit card number.
CcExpirationDate string C - - R Format is YYYYMM.
CcCardType enum C O - R VISA, MAST, AMER, DISC, DINE or JCB
CcProcurementCard bool C - - R A Boolean specifying whether the card is used for procurement.
EcAccountNumber string C C - R Must be a valid account number.
EcAccountTRN string C - - R Must be a valid routing number
EcAccountType enum C - - R Savings, Checking
Note string O O - R Merchant data.
IsDefault bool C C - R Automatically sets to true, if only one payment method has been specified.

 

Back to Top

 

Range

Name Type Description
MerchantIDs string Merchant IDs
StartDate datetime StartDate
EndDate datetime EndDate
ChildMID boolean If true child merchant IDs will be included
EntryType EntryType   
TransactionType TransactionType  This parameter has not been implemented

 

Back to Top

 

ReceivedSummary

Name Type Description
MerchantID int Merchant ID
DateSum datetime Date summary
TransactionType int Transaction type
Status string Status
Code string Code
EntryType string Entry type
Count int Count
ConvFeeAmount (Legacy) double Convenience fee amount
ServiceFeeAmount double Service fee amount
TotalAmount double Total amount
 

SearchFilter


Name Type Description
FieldName  enum Field to search 
CompareOperator  enum Method of comparison
SearchOperator  enum Method of search 
SearchText              enum String to Search 
  

 

The settlement object holds information about transferring the funds from the card issuer's bank to the aquiring bank, which is the one for your store.
Name Type Description
MerchantID string Merchant ID
TransactionID guid Transaction ID
TransSettleID guid Transaction Settle ID
SettleDate datetime Settle Date
ResponseCode string Response Code
PaymentType string Credit Card or eCheck
FundingType string Funding type
*TotalAmountFunded double Service Fee Amount Funded
*ServiceFeeAmountFunded double Service Fee Amount Funded
Transaction object Transaction Object

 

Back to Top

 

Transaction

This object holds the credit card, billing and shipping info for an order.

Name Type Description
MerchantID string Merchant ID
Amount (*TotalAmount) double Amount
SalesTaxAmount double Sales tax amount
ConvenienceFee (*ServiceFeeAmount) double Convenience fee amount
ConvenienceFeePrincipal (*ServiceFeePrincipalAmount) double Convenience fee principal
DebitCredit string Debit or credit transaction
EnteredBy string Entered by
IPAddress string IP Address
TransactionID string Transaction or Trace ID
UpdatedDate datetime Updated date of transaction
Billto    
BilltoFirstName string Bill to first name
BilltoLastName string Bill to last name
BilltoCompanyName string Bill to company name
BilltoAddress string Bill to address
BilltoAddress2 string Bill to address 2
BilltoCity string Bill to city
BilltoState string Bill to state
BilltoPostalCode string Bill to postal code
BilltoEmailAddress string Bill to email address
BilltoPhone string Bill to phone
ShipTo
ShiptoName string Ship to name
ShiptoCompanyName string Ship to company name
ShiptoAddresss string Ship to address
ShiptoAddress2 string Ship to address 2
ShiptoCity string Ship to city
ShiptoState string Ship to state
ShiptoPostalCode string Ship to postal code
ShiptoFreightAmount string Ship to freight amount
Defined Fields
ConsumerOrderID string Consumer Order ID
ConsumerID string Consumer ID
WalletID string Wallet ID
MerchantData1 string Merchant Data 1
MerchantData2 string Merchant Data 2
MerchantData3 string Merchant Data 3
MerchantData4 string Merchant Data 4
MerchantData5 string Merchant Data 5
MerchantData6 string Merchant Data 6
MerchantData7 string Merchant Data 7
MerchantData8 string Merchant Data 8
MerchantData9 string Merchant Data 9
LineItems array Array of LineItem objects
User Defined string User defined fields
eCheck Info
OriginationDate datetime Origination date
UpdatedDate datetime Updated Date
AttemptNumber string Attempt Number
AcctTRN string Account Transit Routing Number
AccountType string Account type
CheckNo string Check number
EntryClassCode string Entry class code
EntryDescription string Entry description
ItemDescription string Item description
Credit Card Info
CardType string Card type
CardExpDate string Card expiration date
CardHolderName string Card holder name
TransactionResponse
 

TransactionResponse

After the transaction has been submitted, this object holds the response.

Name Type Description
TransactionID string Transaction or Trace ID
Last4 string Last four digits of CC or eCheck number
ResponseType string Response type
ResponseCode string Response code
ResponseDescription string Response description
Status string Status
AuthCode string Authorization code
PreauthResult string Pre-auth result
PreauthCode string Pre-authorization code
PreauthDescription string Pre-authorization description
PreauthNegReport string Pre-authorization negative items
AVSResult string Address verification result
MerchantClientID int Merchant client id if created
 
Back to Top

TransactionSummary

This object summarizes the transaction object, highlighting some of the more important fields
Name Type Description
MerchantID string Merchant ID
MerchantClientID string Merhcant client ID
TransactionID guid Transaction or Trace ID
Status string Status
TsCreated datetime Date of transaction
Last4 string Last four digits of account or credit card number
BilltoFirstName string Bill to first name
BilltoLastName string Bill to last name
BilltoCompanyName string Bill to company name
CardType string Credit card type
DebitCredit string Debit or credit transaction
EnteredBy string Entered by
ConsumerOrderID string Consumer Order ID
ConsumerID string Consumer ID
WalletID string Wallet ID
ResponseCode string Response code
AuthCode string Authorization code
Amount double Amount of transaction
ConvenienceFeePrincipal double Amount of convenience fee principal if applicable
TransactionType int Numeric transaction code

Methods 


getTransactionAuthTicket

Allows the user to authenticate to the Transaction Service, so the user can work with the Transaction API.

Request
   
Name Type Description
strAPILoginID string APILogin ID for authentication
strKey string Secret key for authentication
Return 
Authentication
An authentication object.

 

public static TransactionService.Authentication GetTransactionAuthTicket(string strAPILoginID, string strKey)
        {
            TransactionService.Authentication ticket = new TransactionService.Authentication();
            ticket.APILoginID = strAPILoginID;
            ticket.UTCTime = DateTime.UtcNow.Ticks.ToString();
            ticket.TSHash = CalculateHMACMD5(ticket.APILoginID + "|" + ticket.UTCTime, strKey.Trim());
 
            return ticket;
        }

 

Back to Top

 

getClientAuthTicket

Allows the user to authenticate to the Transaction Service, so the user can work with the Transaction API.

Request

 
Name Type Description
strAPILoginID string APILogin ID for authentication
strKey string Secret key for authentication
Return Authentication An authentication object

 

public static ClientService.Authentication GetClientAuthTicket(string strAPILoginID, string strKey)
{
    ClientService.Authentication ticket = new ClientService.Authentication();
    ticket.APILoginID = strAPILoginID;
    ticket.UTCTime = DateTime.UtcNow.Ticks.ToString();
    ticket.TSHash = CalculateHMACMD5(ticket.APILoginID + "|" + ticket.UTCTime, strKey.Trim());
 
    return ticket;
}

 

Back to Top

createClient

Creates a client. Status is set to active ("A").

Request    
Name Type Description
Ticket Authentication Authentication object
Client object Client Object
Return int Client ID

  

private void CreateClient(int mid)
{
    ClientRecord client = new ClientRecord();
    client.MerchantID = MerchantID;
    client.FirstName = "Bob";
    client.LastName = "Smith";
    //other code describing client omitted
 
    try
    {
        using (ClientServiceClient proxy = new ClientServiceClient())
        {
            int id = proxy.createClient(Authenticate.GetClientAuthTicket(txtID.Text.Trim(), txtKey.Text.Trim()), client);
            Response.Write("Created Client ID = " + id.ToString());
        }
    }
    catch (Exception e)
    {
      Response.Write(e.Message);
    }
}

 

Back to Top

updateClient

Updates a client. Note deleting a client or updating the client's status to Suspended will likewise affect the client's scheduled transactions. Updating the client status from Suspended to Active will not affect the client's scheduled transactions.

Request
   
Name
Type Description
Ticket Authentication Authentication object
Client object Client Object
Return int Client ID

 

private void UpdateClient(int mid)
{
    ClientRecord client = new ClientRecord();
    client.MerchantID = MerchantID;
    client.FirstName = "Bob";
    client.LastName = "Smith";
    
 
    try
    {
        using (ClientServiceClient proxy = new ClientServiceClient())
        {
            int id = proxy.updateClient(Authenticate.GetClientAuthTicket(txtID.Text.Trim(), txtKey.Text.Trim()), client);
            Response.Write("Updated Client ID = " + id.ToString());
        }
    }
    catch (Exception e)
    {
      Response.Write(e.Message);
    }
}

 

Back to Top

 

deleteClient

Deletes a client.

Request
   
Name
Type Description
Ticket Authentication Authentication object
MerchantID int Merchant ID
ClientID int Client ID
Return int Client ID

 

private void DeleteClient(int ClientID, int mid)
        {
            try
            {
                using (ClientServiceClient proxy = new ClientServiceClient())
                {
                    int id = proxy.deleteClient(Authenticate.GetClientAuthTicket(txtID.Text.Trim(), txtKey.Text.Trim()), mid, ClientID);
                    Response.Write("Deleted Client ID: " + id.ToString());
                }
            }
            catch (Exception e)
            {
               Response.Write(e.Message);
            }
        }

 

Back to Top

 

getClient

Gets a client.

Request
   
Name
Type Description
Ticket Authentication Authentication object
MerchantID int Merchant ID
ClientID int Client ID
Return array Client

 

public void GetClients(int mid)
{
    try
    {
        using (ClientServiceClient proxy = new ClientServiceClient())
        {
            int ClientID = txtClientID.Text.Trim().Length > 0 ? Convert.ToInt32(txtClientID.Text) : 0;
            grid.DataSource = proxy.getClient(Authenticate.GetClientAuthTicket(txtID.Text.Trim(), txtKey.Text.Trim()), mid, ClientID);
            grid.DataBind();
        }
    }
    catch (Exception e)
    {
        Response.Write(e.Message);
    }
}

 

Back to Top

 

createPaymentMethod

This method creates a new PaymentMethod record. Either the CC or eCheck fields must be present but not both. If the method is created for a valid ClientID and no other payment methods exist for that client then the isDefault flag will be set automatically. If successful, the new PaymentMethodID is returned and a fault is returned on failure.

Request
   
Name
Type Description
Ticket Authentication Authentication object
PaymentMethod object Payment method object
Return int Payment Method ID

 

private void CreateCCPayment(int ClientID, int mid)
{
    PaymentMethod payment = new PaymentMethod();
    payment.AcctHolderName = "Bob Smith";
    payment.CcCardNumber = "4111111111111111";
    payment.CcExpirationDate = "201506";
    payment.CcCardType = CcCardType.VISA;
    payment.Note = "Insert Note";
    payment.ClientID = ClientID;
    payment.MerchantID = mid;
 
    try
    {
        using (ClientServiceClient proxy = new ClientServiceClient())
        {
            int id = proxy.createPaymentMethod(Authenticate.GetClientAuthTicket(txtID.Text.Trim(), txtKey.Text.Trim()), payment);
            Response.Write("Created CC Payment Method ID: " + id.ToString());
        }
    }
    catch (Exception e)
    {
        Response.Write(e.Message);
    }
}

 

Back to Top

 

updatePaymentMethod

This method updates an existing PaymentMethod object. Setting the isDefault flag for a payment method will unset the flag for the previous default (if one existed). A fault is returned on failure. NOTE: The ClientID field may not be updated.

Request
   
Name
Type Description
Ticket Authentication Authentication object
PaymentMethod object Payment method object
Return int Payment nethod ID

 

private void UpdateCCPayment(int ClientID, int mid)
{
    PaymentMethod payment = new PaymentMethod();
    payment.AcctHolderName = "Bob Sanders";
    payment.CcExpirationDate = "201111";
    payment.IsDefault = true;
    payment.CcProcurementCard = true;
    payment.Note = "Insert Note";
    payment.ClientID = ClientID;
    payment.MerchantID = mid;
    payment.PaymentMethodID = Convert.ToInt32(ViewState["PaymentMethodID"]);
 
    try
    {
        using (ClientServiceClient proxy = new ClientServiceClient())
        {
            int id = proxy.updatePaymentMethod(Authenticate.GetClientAuthTicket(txtID.Text.Trim(), txtKey.Text.Trim()), payment);
            Response.Write("Updated CC Payment Method ID: " + id.ToString());
        }
    }
    catch (Exception e)
    {
        Response.Write(e.Message);
    }
}

 

Back to Top

 

deletePaymentMethod

Deletes a payment method. Note that Payment Methods used by Active or Suspended scheduled transactions cannot be deleted.

Request
   
Name
Type Description
Ticket Authentication Authentication object
MerchantID int Payment method object
PaymentMethodID int Payment method ID
Return int Payment method ID

 

private void DeletePayment(int PaymentMethodID, int mid)
{
    try
    {
        using (ClientServiceClient proxy = new ClientServiceClient())
        {
            int id = proxy.deletePaymentMethod(Authenticate.GetClientAuthTicket(txtID.Text.Trim(), txtKey.Text.Trim()), mid, PaymentMethodID);
            Response.Write("Deleted Payment Method ID: " + id.ToString());
        }
    }
    catch (Exception e)
    {
        Response.Write(e.Message);
    }
}

 

Back to Top


getPaymentMethod

Gets a payment method.

Request
   
Name
Type Description
Ticket Authentication Authentication object
MerchantID int Payment method object
ClientID int Client ID
PaymentMethodID int Payment method ID
Return Array Payment method array

 

public void GetPaymentMethods(int mid)
{
    try
    {
        using (ClientServiceClient proxy = new ClientServiceClient())
        {
            grid.DataSource = proxy.getPaymentMethod(Authenticate.GetClientAuthTicket(txtID.Text.Trim(), txtKey.Text.Trim()), mid, ClientID, PaymentMethodID);
            grid.DataBind();
        }
    }
    catch (Exception e)
    {
        Response.Write(e.Message);
    }
}

 

Back to Top

 

getHierarchyTree

Gets a hierarchy tree.

Request
   
Name
Type Description
Ticket Authentication Authentication object
MerchantID int Merchant ID
Return Hierarchy Hierarchy object

Back to Top

 

searchTransactions

Search received or orginated transactions.

Request
   
Name
Type Description
Ticket Authentication Authentication object
Range Range Range Object
Page Page Paging object
SearchType SearchType Received or originated results
PaymentType PaymentType Credit card or eCheck
sFilter SearchFilter Array of transaction search filter objects
TotalCount (out) int Total record count
Return array Array of TransactionSummary objects

 

  protected void btnGetTransDetail_Click(object sender, EventArgs e)
        {
            try
            {
                using (TransactionServiceClient proxy = new TransactionServiceClient())
                {
                    int TotalRecords;
                    Range range = new Range();
                    range.StartDate = new DateTime(2000, 1, 1);
                    range.EndDate = new DateTime(2010, 1, 12);
                    TransactionService.Page page = new ServiceTestClient.TransactionService.Page();
                    page.PageIndex = 0;
                    page.PageSize = 0;
                    page.SortBy = TransactionColumn.Amount;
                    page.SortDirection = ServiceTestClient.TransactionService.SortDirection.ascending;
                    Authentication ticket = Authenticate.GetTransactionAuthTicket(txtID.Text.Trim(), txtKey.Text.Trim());
                   
                    TransactionSummary[] tran = proxy.searchTransactions(ticket, range, page, SearchType.Originated, null, null, out TotalRecords);
                    foreach (TransactionSummary t in tran)
                    {
                        Response.Write(t.Amount);
                    }
}
}

 

Back to Top

 

searchSettleActivity

Search settled activity offers a settlement history of a transaction including chargebacks (C00) and un-chargebacks (U00). The transaction object is not available within Settle objects for this method. Use the getSettleDetails or getTransaction methods to get the transaction information.

Request
   
Name
Type Description
Ticket Authentication Authentication object
Range Range Range object
PaymentType PaymentType Payment type object
FundingType FundingType Funding type object
PageIndex int 0 based page index
PageSize int Number of records per page (max 200)
Return array Array of Settle objects
  int Number of total records returned if not paged

 

private void DoSearch(int pageIndex, int pageSize)
{
    try
    {
        using (TransactionServiceClient proxy = new TransactionServiceClient())
        {
            int TotalRecords = 0;
            Range range = new Range();
            range.StartDate = Convert.ToDateTime(txtStart.Text);
            range.EndDate = Convert.ToDateTime(txtEnd.Text);
 
            range.ChildMID = chkChild.Checked;
            range.MerchantIDs = txtMID.Text;
 
            Nullable<PaymentType> p = null;
 
            switch (ddlPayment.SelectedValue)
            {
                case "CreditCard":
                    p = PaymentType.CreditCard;
                    break;
                case "eCheck":
                    p = PaymentType.eCheck;
                    break;
            }
 
            Nullable<FundingType> f = null;
 
            switch (ddlFunding.SelectedValue)
            {
                case "Chargeback":
                    f = FundingType.Chargeback;
                    break;
                case "Funded":
                    f = FundingType.Funded;
                    break;
                case "Previously Funded Reject":
                    f = FundingType.Previously_Funded_Reject;
                    break;
                case "Rejected":
                    f = FundingType.Rejected;
                    break;
                case "Settled":
                    f = FundingType.Settled;
                    break;
                case "UnChargeback":
                    f = FundingType.UnChargeback;
                    break;
 
            }
  
            grid.DataSource = proxy.searchSettleActivity(Authenticate.GetTransactionAuthTicket(txtID.Text.Trim(), txtKey.Text.Trim()), range, p, f, pageIndex, pageSize, out TotalRecords);
 
            grid.DataBind();
           }
      }
}

 

Back to Top

 

getReceivedSummary

Get received transactions by date.

Request
   
Name
Type Description
Ticket Authentication Authentication object
Range Range Range object
PageIndex int 0 based page index
PageSize int Number of records per page (max 200)
Return ReceivedSummary Array of received summary objects
  int Number of total records returned if not paged

 

        private object CallSummaries(int pageIndex, int pageSize, ref int TotalRecords)
        {
            try
            {
                using (TransactionServiceClient proxy = new TransactionServiceClient())
                {
                    Range range = new Range();
                    range.StartDate = Convert.ToDateTime(txtStart.Text);
                    range.EndDate = Convert.ToDateTime(txtEnd.Text);
                     
                    range.ChildMID = chkChild.Checked;
                    range.MerchantIDs = txtMID.Text;
 
                    object summaries = null;
 
                    Authentication ticket = Authenticate.GetTransactionAuthTicket(txtID.Text.Trim(), txtKey.Text.Trim());
                     
                    if ((string)ViewState["type"] == "getSettleSummary")
                    {
                        range.EntryType = (EntryType)Enum.Parse(typeof(EntryType), ddlEntryType.SelectedValue);
                        range.TransactionType = (TransactionType)Enum.Parse(typeof(TransactionType), ddlTransType.SelectedValue);
                        summaries = proxy.getSettleSummary(ticket, range, pageIndex, pageSize, out TotalRecords);
                    }
                    else if ((string)ViewState["type"] == "getReceivedSummary")
                        summaries = proxy.getReceivedSummary(ticket, range, pageIndex, pageSize, out TotalRecords);
                    else if ((string)ViewState["type"] == "getOriginationSummary")
                        summaries = proxy.getOriginationSummary(ticket, range, pageIndex, pageSize, out TotalRecords);
 
//Other code omitted
                }   
                     
            }
            catch (Exception ex)
            {
                Response.Write(e.Message);
      }
        }

 

Back to Top

 

getOriginationSummary

Get originated transactions by date.

Request
   
Name
Type Description
Ticket Authentication Authentication object
Range Range Range object
PageIndex int 0 based page index
PageSize int Number of records per page (max 200)
Return OriginationSummary Array of origination summary objects
  int Number of total records returned if not paged

Back to Top

 

getSettleSummary

Get settled transactions by date.

Request
   
Name
Type Description
Ticket Authentication Authentication object
Range Range Range object
PageIndex int 0 based page index
PageSize int Number of records per page (max 200)
Return SettleSummary Array of settle summary objects
  int Number of total records returned if not paged

 

Back to Top

 

getSettleDetail

Get settled transactions by settle date.

Request
   
Name
Type Description
Ticket Authentication Authentication object
MerchantID int Merchant ID
Day datetime Day
PageIndex int 0 based page index
PageSize int Number of records per page (max 200)
Return Settle Array of Settle objects
  int Number of total records returned if not paged

 

private void DoSearch(int pageIndex, int pageSize)
 {
     try
     {
         using (TransactionServiceClient proxy = new TransactionServiceClient())
         {
             int TotalRecords = 0;
             int MerchantID = Convert.ToInt32(txtMID.Text);
             DateTime day = Convert.ToDateTime(txtDay.Text);
              
             grid.PageSize = Convert.ToInt32(txtPageSize.Text);
 
             Settle[] settles = proxy.getSettleDetail(Authenticate.GetTransactionAuthTicket(txtID.Text.Trim(), txtKey.Text.Trim()), MerchantID, day, pageIndex, pageSize, out TotalRecords);
 
             grid.DataSource = settles;
             grid.DataBind();
 
            //Other code omitted
                       }
             
     }
     catch (Exception ex)
     {
         Response.Write(e.Message);         
     }
 }

 

Back to Top

 

getReceivedDetail

Get received transactions by receive date.

Request
   
Name
Type Description
Ticket Authentication Authentication object
MerchantID int Merchant ID
Day datetime Day
PageIndex int 0 based page index
PageSize int Number of records per page (max 200)
Return Transaction Transaction detail object (no line items)
  int Number of total records returned if not paged

 

private void DoSearch(int pageIndex, int pageSize)
{
    try
    {
        using (TransactionServiceClient proxy = new TransactionServiceClient())
        {
            int TotalRecords = 0;
            DateTime day = Convert.ToDateTime(txtDay.Text);
 
            int MerchantID = Convert.ToInt32(txtMID.Text);
 
            grid.DataSource = proxy.getReceivedDetail(Authenticate.GetTransactionAuthTicket(txtID.Text.Trim(), txtKey.Text.Trim()), MerchantID, day, pageIndex, pageSize, out TotalRecords);
            grid.DataBind();
 
 
            lblMsg.Text = string.Empty;
            lblInfo.Text = "Total records count: " + TotalRecords.ToString();
            if (TotalRecords > 0)
                Response.Write("<br>Showing record #: " + (pageIndex * pageSize + 1).ToString() + " to " + ((TotalRecords < (pageIndex + 1) * pageSize) ? TotalRecords.ToString() : ((pageIndex + 1) * pageSize).ToString()));
 
            //show pager if TotalRecords > PageSize
            if (TotalRecords > Convert.ToInt32(txtPageSize.Text))
            {
                int totalpages = TotalRecords / Convert.ToInt32(txtPageSize.Text) + 1;
                divPager.Visible = true;
                lnkPrev.Enabled = (pageIndex > 0);
                lnkNext.Enabled = (pageIndex < totalpages - 1);
                //load avaliable page number
                lstPage.Items.Clear();
                for (int i = 0; i < totalpages; i++)
                {
                    lstPage.Items.Add(i.ToString());
                }
                lstPage.SelectedValue = pageIndex.ToString();
 
            }
            else
                divPager.Visible = false;
        }
    }
    catch (Exception ex)
    {
        Response.Write(e.Message);
      }
}

 

Back to Top

 

getTransaction

Get details of a transaction.

Request
   
Name
Type Description
Ticket Authentication Authentication object
MerchantID int Merchant ID
TransactionID string Transaction ID
Return TransactionSummary Array of transaction summary objects

 

protected void btnGetTransDetail_Click(object sender, EventArgs e)
{
    try
    {
        using (TransactionServiceClient proxy = new TransactionServiceClient())
        {
            Transaction tran = proxy.getTransaction(Authenticate.GetTransactionAuthTicket(txtID.Text.Trim(), txtKey.Text.Trim()), Convert.ToInt32(txtMID.Text), txtTransID.Text);
             
            //show the transaction in a grid
            grid.DataSource = new List<Transaction> { tran };
            grid.DataBind();
 
            //show the transaction response in a grid
            gridResponse.DataSource = new List<TransactionResponse> { tran.Response };
            gridResponse.DataBind();
 
            //show the lineitems in a grid
            gridLineItem.DataSource = tran.LineItems;
            gridLineItem.DataBind();
            lblMsg.Text = string.Empty;
        }
    }
    catch (Exception ex)
    {
Response.Write(e.Message);
    }
}

 

Error Messages


Error message

Description

U55

See pg_response_description

Invalid Client Token

Either the specified token was not found or the token does not belong to the merchant making the request.

Client Token Suspended

The client's Status has been set to "Suspended" and that no transactions my be processed for it at this time.

No Default Payment Token
The client token specified has no default payment method token.

Invalid Payment Token

Either the specified payment token was not found, the payment token does not belong to the merchant making the request or the payment token associated with the client token also present in the request.