Transaction Full Detail
URL Endpoint: https://easypay5.com/APIcardProcREST/v1.0.0/Query/Transaction_FullDetail
Request Method: POST
Headers:
Session Key is passed to the API via the header:
Content-Type: application/json
Accept: application/json
SessKey: A1842D663E9A4A72XXXXXXXX303541303234373138
Use this call to return all the details for a single transaction. Details are separated into 3 distinct objects including:
- AccountHolder (Card Holder)
- EndCustomer (Optional user entity if not the actual cardholder such as a child or spouse receiving the services)
- Transaction (All Transaction details)
Copied
{
"TxID": 12
}
{
"Transaction_FullDetailResult": {
"AccounttHolder": {
"AccountNum": "LrrzYPhktK0=chezRtSAD9mUQPi0Hxc8AwoCqRscw3Cf",
"AcctMask": "4111XXXXXXXX1111",
"Address1": "123 Fake St.",
"Address2": "",
"CardType": "VI",
"City": "PORTLAND",
"Company": "",
"CreatedOn": "\/Date(1549878586493-0500)\/",
"Email": "robert@easypaysolutions.com",
"ExpDate": "1028",
"Firstname": "Sean",
"ID": 1,
"LastChanged": "\/Date(1555525026490-0400)\/",
"LastName": "Wood",
"MerchID": 1,
"Phone": "8777248472",
"State": "ME",
"Zip": "04106"
},
"EndCustomer": {
"Address1": "21 ELM ST.",
"Address2": "SUITE 321 ",
"City": "TULSA ",
"ClientRefID": "",
"Company": "",
"CreatedOn": "\/Date(1549967861210-0500)\/",
"Email": "",
"Firstname": "JOHN",
"ID": 12,
"LastChanged": "\/Date(1549967861210-0500)\/",
"LastName": "DOE",
"MerchID": 1,
"Phone": "",
"Service": "",
"State": "AA ",
"Zip": "98324 "
},
"ErrCode": 0,
"ErrMsg": "",
"FunctionOk": true,
"RespMsg": "Successfully Returned Transaction Detail Record",
"Transaction": {
"ACCT_FIRST_NAME": "JOHN",
"ACCT_LAST_NAME": "DOE",
"ACCT_NO": "4111XXXXXXXX1111",
"AMOUNT": 0.0000,
"AVSr": "Y",
"AcctHolderID": 1,
"BatchLogID": 0,
"BatchNO": -1,
"BatchStatus": "N",
"CARD_TYPE": "VI",
"CASHBACK": 0.0000,
"CVVr": "",
"CardPresent": false,
"ConsentID": 0,
"CreatedOn": "\/Date(1549967861213-0500)\/",
"Credits": 0.0000,
"EMVPresent": false,
"EMVRecTags": "",
"EXP_DATE": "1028",
"EndCustID": 12,
"Flags": "",
"HAuthorizedAmount": -1.0000,
"ID": 12,
"IsLocked": false,
"IsPartialApproval": false,
"LAST_CHANGED_BY": "vidya_Venkatraman",
"LastChangedOn": "\/Date(1549967861213-0500)\/",
"MerchID": 1,
"Origin": "WID",
"PAYMENT_TYPE": "C",
"PartialAuthApproved": -1.0000,
"PreAuthID": 0,
"PrepaidBalance": -1.0000,
"REF_ID": "",
"RPGUID": "",
"RefTxID": 0,
"SALE_TAX": 0.0000,
"SEQ_NO": 16,
"SERVER": "",
"SURCHARGE": 0.0000,
"TIP": 0.0000,
"TXN_CODE": "297620",
"TXN_DATE": "021219",
"TXN_DATETIME": "\/Date(1549968682000-0500)\/",
"TXN_TIME": "125122",
"TxLOCK": "0",
"TxSTATUS": "AUTHOK",
"TxType": "CCAUTHONLY",
"UserID": 2546
}
}
}
Copied
private void FullDetailQuery() {
// Session Key gathered using the Authenticate Command.
string SessKey = "52B1F6B36F35400EA4303237343341303337353938";
// send the transactionID to query
string json = "{\"TxID\": 12}";
byte[] data = Encoding.UTF8.GetBytes(json);
// create Request
WebRequest request = WebRequest.Create("https://easypay5.com/APIcardProcREST/v1.0.0/Query/Transaction_FullDetail");
request.Method = "POST";
request.ContentType = "application/json";
request.ContentLength = data.Length;
// use your session key obtained when you authenticated
request.Headers.Add("SessKey: " + SessKey);
string Myheaders = request.Headers.ToString();
string responseContent = null;
// Using the Try block will catch communication errors
try {
using (Stream stream = request.GetRequestStream()) {
stream.Write(data, 0, data.Length);
}
using (WebResponse response = request.GetResponse()) {
using (Stream stream = response.GetResponseStream()) {
using (StreamReader sr99 = new StreamReader(stream)) {
responseContent = sr99.ReadToEnd();
}
}
}
} catch (Exception ee) {
logError("Problem communicating with EasyPay Service:" + ee.Message);
return;
}
// Check for null Response as this would be a critical communication error as well
if (responseContent == null) {
logError("Critical Error!, null response");
return;
}
/// develop Response Object
var Result = JsonConvert.DeserializeObject<dynamic>(responseContent);
bool FunctionOk = (bool)Result.Transaction_FullDetailResult.FunctionOk;
int ErrCode = (int)Result.Transaction_FullDetailResult.ErrCode;
string ErrMsg = (string)Result.Transaction_FullDetailResult.ErrMsg;
string RespMsg = (string)Result.Transaction_FullDetailResult.RespMsg;
//Check for unexpected Errors on cloud servers. If errors found Stop Processing and check ErrorCodes
if (!FunctionOk) {
logError(RespMsg + " " + ErrCode + " " + ErrMsg);
return;
}
// retrieve transaction details
string info = JsonConvert.SerializeObject(Result.Transaction_FullDetailResult);
Response.Write(info);
}
private static void logError(string msg) {
// implement your logging function here.
}