Reporting
  • 20 Feb 2024
  • 6 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Reporting

  • Dark
    Light
  • PDF

Article summary

This message is used to retrieve the performed transactions list for the sent criteria; and it is based on the API Communication Model described in the Communication Model section. 

Request Parameters

ParameterDescription
merchantId
required
An alphanumeric value that represents the unique Merchant ID at SmartRoute. The Payment Gateway operation team provides this value based on the merchant enrollment.
  • Field Type: Alphanumeric
  • Length: 40
  • Sample Data: MID0001

authToken
required
An alphanumeric value that represents the Authentication Token. The Payment Gateway operation team provides this value based on the merchant enrollment. 
  • Field Type: Alphanumeric 
  • Length: 255 
  • Sample Data: N2FiZDRmYTQzNDUzOGM0YTI4N2I5YmZm 
fromDate
required
The date value represents the Start date of the expected Result. This value should be in the format dd/mm/yyyy. 
  • Field Type: Alphanumeric 
  • Length: 10
  • Sample Data: 01/01/2023 
toDate
required
Date value represents the End date of the desired date range for transactions. This value should be in a format dd/mm/yyyy.
Note:

The maximum difference between fromDate & toDate should be one month

  • Field Type: Alphanumeric 
  • Length: 10 
  • Sample Data: 01/01/2023 
currency
optional
The character ISO Code for the currency.  
  • Field Type: Alphanumeric
  • Length: 3
  • Sample Data: SAR

transactionStatus 
optional 
The number value represents the status of transaction, the below each number with its status. 
  • Field Type: Number 
  • Length: 5
  • Sample Data: 00000 
Sample status values (Check appendecies for more):
  • 00000: Transaction was processed successfully
  • 10001: Payment Failed
  • 10008: Payment canceled
  • 10009: Request Received
  • 10010: Card details are captured
  • 40001: Refund is Pending
  • 01111: Gateway Communication Error
transactionType
optional
The number value represents the type of transaction, the below each number with its type
  • Field Type: Number 
  • Length: 2
  • Sample Data: 1
Possible transaction type values:
  • 1: Redirect Sale
  • 4: Refund
  • 5: Completion
  • 6: Pre-Auth
  • 8: API Payment
  • 9: API mPayment
  • 10: API Approve
  • 11: Recurring Payment
  • 12: Direct Post Verify
  • 13: API Pre-Auth
  • 14: Redirect Payment Verify
  • 16: API mPre-Auth
  • 17: Authenticate Payer
  • 18: Mobile Payment
  • 19: Mobile Pre-Auth
  • 20: Resend OTP
  • 21: Standalone Refund
  • 23: Pre-Authorization Extension
  • 24: Pre-Authorization Release
transactionID
optional
Alphanumeric value representing the Transaction ID, this value should be unique per transaction and Merchant ID. 
  • Field Type: Alphanumeric 
  • Length: 40 
  • Sample Data: 1706433390518 
includeDynamicFields
optional
Boolean value representing the include dynamic fields, this flag to tell the API to return the dynamic fields with the response or not. 
  • Field Type: Boolean 
  • Length: 4
  • Sample Data: true 
dynamicFields
optional
String value that you can filter the transaction results based on the dynamic field and its value. 
  • Field Type: Alphanumeric 
  • Length: -
  • Sample Data: “dynamicField1=value1, dynamicField2 = value2” 
responseOptionalFields 
optional 

Array of Numbers that representing the optional extra fields that you may need in the response.

  • Field Type: Array 
  • Length: -
  • Sample Data: ["0", "1", "2", "3", "4", "5"] 
Possible response optional fields values:
  • 0: Original Amount
  • 1: Authorized Amount
  • 2: Original Currency 
  • 3: Authorized Currency 
  • 4: Transaction Type 
  • 5: Gateway Name 
  • 6: Gateway Status Parameter Description 
  • 7: Acquirer Name 
  • 8: Channel 
  • 9: BIN 
  • 10: RRN
  • 11: Approval Code
  • 12: Refund Transaction IDs 
  • 13: Completion Transaction IDs 
  • 14: Payment Method 
  • 15: Card Type 
  • 16: Original Transaction ID 
  • 17: Masked Card Number 
  • 18: Reversal Status 
  • 19: Gateway Status Description 
channel
optional

The Channel to be used by SmartRoute System. It could be one of the following: 

  • 0 for E-Commerce
  • 1 for IVR
  • 2 for POS
  • Field Type: Numeric
  • Length: 1
  • Sample Data: 0
paymentMethod 
optional

An Alphanumeric value indicates the payment method.

  • Field Type: Alphanumeric
  • Length: 25
  • Sample Data: C_Visa 
Sample status values (Check appendecies for more):
  • C_Visa: Visa 
  • C_MasterCard: MasterCard 
  • C_Amex: Amex 
  • C_Mada Visa: Mada Visa 
  • C_Mada Master: Mada Master 
  • C_Apple Pay-Visa: Apple Pay-Visa 
  • C_Apple Pay-MasterCard: Apple Pay-MasterCard 
  • C_Apple Pay-Amex: Apple Pay-Amex 
  • C_Apple Pay-MADA: Apple Pay-MADA 
  • PM_URPay: URPay 
  • PM_STCPay: STCPay 
  • PM_SADAD Billing: SADAD Billing 
  • PM_Emkan: Emkan 
  • PM_Tabby: Tabby 
  • C_Google Pay-Visa: Google Pay-Visa 
  • C_Google Pay-MasterCard: Google Pay-MasterCard 
  • C_Google Pay-Amex: Google Pay-Amex
usePagination 
optional 

Boolean value representing the use pagination, this flag used to enable pagination in the webservice.

  • Field Type: Boolean 
  • Length: 4
  • Sample Data: true
pageSize 
conditional
Number value represents the page size, this value is used to determine the number of transactions to be retrieved per page. It will be required when “usePagination” is true. 
  • Field Type: Number 
  • Length: -
  • Sample Data: 1
pageNumber 
conditional

Number value representing the page Number, this value used to determine the number of page. It will be required when “usePagination” is true.

  • Field Type: Number 
  • Length: -
  • Sample Data: 1

Sample Request Code (Java)

{ 
"merchantId":"testMerchant", 
"authToken":"NGQ0OWIyODM3NjM4YzBkMTIyNTZAy", 
"fromDate":"26/01/2024", 
"toDate":"05/02/2024", 
"currency":"SAR", 
"transactionStatus":"00000", 
"transactionType":"1", 
"transactionID":"", 
"includeDynamicFields":"true", 
"dynamicFields":"DynamicField=test1", 
"responseOptionalFields":["0","1","2","3","4","5","6","7","8","9","10","11",
"12","13","14","15","16","17","18"], 
"channel":"0", 
"paymentMethod":"C_Google Pay-MasterCard", 
"usePagination":"true", 
"pageSize":"1", 
"pageNumber":"1" 
}

Response Parameters

ParameterDescription

numberOfPages  
conditional

A number value representing the total number of pages based on the pageSize value provided

  • Field Type: Number 
  • Length
  • Sample Data: 16
transactions 
required

An JSON Array of transaction details - see section below.

  • Field Type: JSON

Response Parameters - Transactions

ParameterDescription

transactionID  
required

The merchant generates the Transaction ID. It represents a unique identifier for the transaction and it is an alphanumeric and must not include special characters or spaces. 

  • Field Type: Alphanumeric
  • Length: 40 
  • Sample Data: 1440954863817
transactionStatus 
required

An alphanumeric value that represents the original transaction status.

  • Field Type: Alphanumeric
  • Length: 100
  • Sample Data: Transaction was processed successfully.
originalAmount 
optional

A numeric value that contains the purchase amount of the item. The value is in ISO format with no decimal point. Also. For example, 100 for 1.00 USD.

  • Field Type: Numeric
  • Length: 9
  • Sample Data: 100
authorizedAmount 
optional

A numeric value that contains the purchase Authorized Amount of the item. The value is in ISO format with no decimal point. For example, 100 for 1.00 USD. 

  • Field Type: Numeric
  • Length: 9
  • Sample Data: 100
originalCurrency
optional
The numeric value is in ISO abbreviation for the currency. The value should be neither character value nor decimal point. For example, JOD, SAR. 
  • Field Type: Alphanumeric
  • Length: 3
  • Sample Data: JOD 
authorizedCurrency
optional
Authorized Currency uses the numeric ISO Code for the payment. For example, JOD, SAR. 
  • Field Type: Alphanumeric
  • Length: 3
  • Sample Data: JOD
transactionType 
optional 

A value that represents the type of the transaction: 

  • Field Type: Alphanumeric 
  • Length: 64
  • Sample Data: Redirect Sale 
gatewayName 
optional
This value represents the gateway name that processed the transaction. It can be alphanumeric with special characters like space, ‘@’ and ‘_’. 
  • Field Type: Alphanumeric and Some Special 
  • Length: 40
  • Sample Data: TestGateway

gatewayStatus 
optional

An alphanumeric value that represents the gateway response code. This code covers errors generated by the chosen gateway. 

  • Field Type: Alphanumeric
  • Length: 15
  • Sample Data:00000
gatewayStatusDescription
optional

An alphanumeric value that represents a message describing the response status received from the chosen gateway using the language specified in the request.

  • Field Type: Alphanumeric
  • Length: 100 
  • Sample Data: Approved
acquirerName 
optional

The acquirer's name for the transaction.
  • Field Type: Alphanumeric
  • Length: 40
  • Sample Data: ANB 
Channel
optional

The Channel to be used by SmartRoute System. It could be one of the following: 

  • 0 for E-Commerce
  • 1 for IVR
  • 2 for POS
  • Field Type: Numeric
  • Length: 1
  • Sample Data: 0
bin
optional

A value represents the Bank Identification Number.
  • Field Type: Numeric
  • Length: 10
  • Sample Data: 5555
rrn
optional
An alphanumeric value that represents a Receipt Reference Number for the current payment transaction. This value is returned if the value is provided from the gateway.
  • Field Type: Alphanumeric 
  • Length: 60 
  • Sample Data: 201508201600462840000000000 
approvalCode
optional
Approval Code received from Payment Processor such as Visa.
The values are returned in the following cases:
  • Only after a successful transaction
  • Value is provided from the gateway 


  • Field Type: Alphanumeric 
  • Length: 10
  • Sample Data: 12345678
refundTransactionIDs 
optional
An array of the refund transaction IDs is provided in case the transaction has a refund.
  • Field Type: Array
  • Length
  • Sample Data: [1440954863817, 1440954863818]
completionTransactionIDs 
optional
An array of the completion transaction IDs is provided in case the transaction has a completion.
  • Field Type: Array
  • Length
  • Sample Data: [1440954863200, 1440954863215]
paymentMethod
optional
An Alphanumeric value indicates the payment method used in the transaction.
  • Field Type: Alphanumeric 
  • Length: 200
  • Sample Data: Google Pay.
cardType
optional
An Alphanumeric value indicates the Card type used in the transaction.
  • Field Type: Alphanumeric 
  • Length: 40
  • Sample Data: Google Pay-Visa
originalTransactionID 
optional

A numeric value indicates the original transaction ID for the provided transaction. It depends on the transaction type whether it has an original transaction associated with it or not. For instance, completion transactions have a pre-authorization transaction as their original transaction. If the transaction does not have an original transaction, this field will be an empty string.
  • Field Type: Alphanumeric 
  • Length: 40
  • Sample Data: 1440954863817
maskedCardNumber  
optional

An alphanumeric value represents the masked Card Number.
  • Field Type: Alphanumeric 
  • Length: 19 
  • Sample Data: 4747******123 
reversalStatus   
optional
The Reversal Status of the transaction has the below mentioned possible values which are needed to be inquired about:
  • 0 for reversal required
  • 1 for reversal not required 
  • 2 for reversal successful 
  • 3 for reversal failed 


  • Field Type: Alphanumeric 
  • Length: 1
  • Sample Data: 1

Sample Response Code (Java)

{
"numberOfPages": 6,
"transactions": [
{
"refundTransactionIDs": [
"17023791029375"
],
"approvalCode": null,
"transactionStatus": "Transaction was processed success
fully",
"gatewayName": "TabbyGateway",
"bin": null,
"dynamicFields": [],
"channel": "Mobile",
"cardType": "",
"reversalStatus": "1",
"maskedCardNumber": null,
"transactionID": "1702377732208",
"rrn": "fc1ac51d-32cd-4cbd-b99c-b6c5dee04ad8",
"transactionType": "Redirect Sale",
"completionTransactionIDs": "",
"authorizedCurrency": "SAR",
"originalAmount": "10.00",
"originalTransactionID": "",
"authorizedAmount": "10.00",
"paymentMethod": "Tabby",
"originalCurrency": "SAR",
"gatewayStatus": "CLOSED",
"acquirerName": null
}
]
}




What's Next