Get Last Transaction Status
Terminal Agent expose an API to recover from network issue while using the Sync payment API,
in event of error or closed connection, you can use this API to fetch the current status of the last transaction created.
Usage Flow:
Call GET request to: http://localhost:8003/api/transactions/last Without any request payload
DeviceId field is not required - Terminal agent will append it automatically
Reponse will return immediately according to Transaction Status schema
Example
URL: http://localhost:8003/api/transactions/last
Response body:
{
"TransactionNumber": "1dde6de24cb4b96678517350c075a3e89a4103ed3132b3444ee055ed",
"date": "2024-04-17T19:50:33.588Z",
"amount": "1",
"baseAmount": "1",
"currency": "USD",
"status": 5,
"statusName": "Transaction Approved",
"timeoutDate": "2024-04-17T19:58:53.820Z",
"maxInstallments": 1,
"reason": null,
"paymentCommit": {
"messsage": "Please Commit this payment in 7200 seconds",
"secondsToCommit": 7200,
"commitLink": "https://api.sandbox.sensepass.com/api/transactions/commitPayment/1dde6de24cb4b96678517350c075a3e89a4103ed3132b3444ee055ed"
},
"methodType": 0,
"businessId": "91878198955101",
"businessName": "SensePass",
"pos": "SensePass",
"businessOwnerPhone": "113654",
"businessCountry": "USA",
"businessCity": "A",
"businessState": "B",
"businessStreet": "NY",
"businessAddress": "NY",
"locale": {
"language": "en"
},
"products": [],
"productsSum": {
"allAmountSum": "0.00",
"allTipSum": "NaN",
"allVatSum": "0.00",
"allTotalSum": "0.00",
"allDiscountSum": "0.00",
"allDiscountedAmountSum": "0.00"
},
"paymentProcessRequestID": "5330731519",
"confirmation": {
"approvedBy": "Shift4 Sandbox",
"dateApproval": "2024-04-17T19:50:44.964Z",
"approvalDate": "2024-04-17T19:50:44.964Z",
"paymentType": "Regular",
"sensePassReferenceId": "d4t9xyubad5geoj1c2yc",
"paymentMethodName": "Credit Card (Sensepass PCI)",
"providerId": "bmU4Ip5koVvi8harpkh5WW50BEQj7FpdNJhWkTMEbqQ=",
"authNumber": null,
"acquirer": null,
"voucher": null,
"referenceNumber": null,
"requestID": "5330731519",
"amount": 1,
"confirmationNumber": "297-OK522Z",
"fullConfirmationCode": "297-OK522Z",
"providerName": "Shift4 Sandbox",
"cardType": "VISA",
"lastFourDigits": "1111",
"cardMask": "411111******1111",
"expiration": "1234",
"cardExpiration": "1234",
"installments": 1,
"paymentMethod": "Credit Card",
"Credit Card": {
"cardType": "VISA",
"lastFourDigits": "1111",
"mask": "411111******1111",
"expiration": "1234"
},
"extraDetails": {
"email": null
}
},
"confirmationNumber": "297-OK522Z",
"confirmations": [
{
"approvedBy": "Shift4 Sandbox",
"dateApproval": "2024-04-17T19:50:44.964Z",
"approvalDate": "2024-04-17T19:50:44.964Z",
"paymentType": "Regular",
"sensePassReferenceId": "d4t9xyubad5geoj1c2yc",
"paymentMethodName": "Credit Card (Sensepass PCI)",
"providerId": "bmU4Ip5koVvi8harpkh5WW50BEQj7FpdNJhWkTMEbqQ=",
"authNumber": null,
"acquirer": null,
"voucher": null,
"referenceNumber": null,
"requestID": "5330731519",
"amount": 1,
"confirmationNumber": "297-OK522Z",
"fullConfirmationCode": "297-OK522Z",
"providerName": "Shift4 Sandbox",
"cardType": "VISA",
"lastFourDigits": "1111",
"cardMask": "411111******1111",
"expiration": "1234",
"cardExpiration": "1234",
"installments": 1,
"paymentMethod": "Credit Card",
"Credit Card": {
"cardType": "VISA",
"lastFourDigits": "1111",
"mask": "411111******1111",
"expiration": "1234"
},
"extraDetails": {
"email": null
}
}
],
"balance": 1,
"paymentMethodImages": {},
"clientPhoneNumber": null,
"clientEmail": null
}
Last updated