Home > API General, Credit Cards, Payments, Receipts, Refunds, Retail/Merchandise > SWS GetTransactionDetails Method

SWS GetTransactionDetails Method


Returns receipt detail information for the specified transaction ID(s).

Parameters

Name DataType Is Required
SiteID Long Required
Description The site’s ID number. This can be found using the GetSiteList method.
TransactionIDs ArrayOfLong Required
Description The transaction’s ID number. Transaction IDs are system generated for each payment transaction that occurs in the system. The transaction ID is returned when any MakePayment method is used.

Returned Parameters

Name DataType
TransactionID Long
Description The transaction’s ID number. Transaction IDs are system generated for each payment transaction that occurs in the system. A null or “0” response indicates the transaction failed.
ErrorMsg String
Description If there is an error processing this method this will provide text about the problem that occurred.
TransactionDate DateTime
Description The date the transaction occured.
TransactionTime String
Description The time the transaction occured.
PaymentAmount Decimal
Description The total amount to be paid after all assessments and credits are applied.
EscrowCreditAmount Decimal
Description The amount of the funds taken that were applied to cash credit/escrow.
Type String
Description The type of transaction that occurred.
Status String
Description The status of the transaction.
Agent String
Description The name of the user that completed the transaction.
AccountName String
Description The name on the account where the transaction occurred. This may differ from the primary contact’s name in some instances, such as a business account or a guardianship account.
TransactionPaymentMethod: PaymentMethod String
Description The type of payment that was received for the transaction.
TransactionPaymentMethod: Amount  Decimal
Description The total amount to be paid after all assessments and credits are applied.
TransactionPaymentMethod: AmountTendered Decimal
Description The amount received from the customer.
TransactionPaymentMethod: CashBack Decimal
Description If the payment was cash, this indicates the cash returned to the customer.
TransactionReceiptDetail: ChargeDate DateTime
Description The date the transaction occurred.
TransactionReceiptDetail: ItemDescription String
Description The name of the assessment that was paid.
TransactionReceiptDetail: Amount Decimal
Description The amount of the particular assessment.

Example

As with every method we need to pass in credentials. We do this with the LookupUser request object.

We’ll assume you’ve got a web reference, let’s name it SWS, in your Visual Studio project. At this point we need to our objects. We’ll need the standard service object, a GetTransactionDetails request object and a GetTransactionDetails response object. We can define and create those like this:

// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.GetTransactionDetails_Request request = new SWS.GetTransactionDetails_Request();
SWS.GetTransactionDetails_Response response;

Here’s my sample code of the Request object.

// GetTotalDuePastDue Request
request.SiteID = 123456;
request.TransactionIDs = new long[] { 123456 };

Finally we can call the method and pass across the login object and the request object to retrieve the transaction details. It’s a good idea to do this in a Try Catch block.

// Call the method that will load the response object
try
{
  response = service.GetTransactionDetails(user_request, request);
}
catch (Exception ex)
{
  MessageBox.Show(ex.Message);
}

Note that if something goes wrong the service will respond with an exception. You’ll want to take a look at that message returned in that exception so it can be debugged.

For a full list of methods see SWS Methods.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s