You've chosen our Reporting API

Reporting API allows users to access transaction-related data for analysis and reporting purposes.

Introduction

The Reporting API is an invaluable tool for developers, empowering them to retrieve and analyze data for the creation of detailed reports. This tool provides a structured method for data collection and report generation customized to specific criteria.

The TNS PayOrch platform provides REST APIs for generating reports. By utilizing the straightforward API, you can access the transaction-related information you require.

Let's start with an example. In this demonstration, we will guide you through the steps to perform a simple API call to get transaction information for last 7 days.

Step 1

Get start with Authentication

All requests made through our system are authenticated using HMAC. To execute a sample request, you will need to obtain the API Key and Secret from TNS. Please reach out to our support team to acquire the API Key and Secret.

If you want to see how to create a HMAC signature, see Authentication section of our documentation.

Step 2

Try a sample Transaction Search request

When you use our Reporting REST APIs, you'll be making calls from your backend system directly to our payment system. To get started, you'll need to familiarize yourself with our APIs and calling options using your programming language of choice. Let's use our API Explorer to make a simple call together to help you see how our APIs work. To do this, let's run a simple search transaction request for the last 7 days.

For information on header parameters and request body fields, see Transaction List section of our documentation.

                                                    
Field Description Type Example

fromDateTime
Required

This is the start date & time for the search criteria, formatted in UTC as YYYYMMDDHHmmss.

String 2024-07-08T11:16:54Z

toDateTime
Required

This is the end date and time for the search criteria, formatted in UTC as YYYYMMDDHHmmss.

String 2024-07-15T11:16:54Z

dateType
Required

Specifies the date type on which the transaction is searched upon.
DATE_EFFECTIVE - Date & time received as transaction date.
DATE_AUTHORIZED - Date & time transaction was approved by the acquirer.
DATE_SETTLED - Transaction settlement date as provided by the acquirer.

String DATE_EFFECTIVE

currencyCode
Required

Update to the latest text with example. This is the ISO 4217 currency code. Use "036" for Australian dollar, "840" for United States dollar, "826" for Pound sterling. Please refer https://en.wikipedia.org/wiki/ISO_4217 for list of all currency codes.

String 840

For more information on the request fields, see Transaction List section of our documentation.

Sample Response

                                                
JSON
{ "data": [ { "customerName": "Petron", "acquirerName": "FISERV US", "approvedAmount": "1000", "authCode": "OK0238", "authorizedDate": "2024-08-13 06:24:03", "cardHolderName": null, "cardType": "Visa", "clientTransactionId": "ee3625a8-7b80-49e5-ad44-0d0c8d5f25c2", "currencyCode": "840", "entryMode": "KEYED", "expiryDate": "1224", "firstSix": "400556", "hostResponseCode": "00", "hostResponseText": "APPROVAL", "lastFour": "2149", "originalAuthCode": null, "originalEAuth": null, "originalERef": null, "originalStan": null, "originalTransactionId": null, "originalTRef": null, "orn": "00000003.177447.20240813062400.20240813062400.000000178884.000.OK0238.02.N.014226116634199CN++.....H+.........012..P......", "paymentChannel": "CREDITCARD", "referenceId": null, "responseCode": null, "rrn": "b590ed5d-0dc6-47ed-810e-89b4abb28c7a", "settlementDate": "2024-08-13 00:00:00", "stan": null, "surchargeAmount": "0", "taxAmount": null, "tenderType": "CREDIT", "terminalId": "TID100012", "tnsResponseCode": "00", "transactionStatus": "approved", "tnsResponseText": "APPROVAL", "token": "7912403706882149", "totalAmount": "1000", "transactionDate": "2024-08-13 06:24:00", "transactionId": null, "transactionType": "SALE", "merchantName": "MERCHANT AUTOMATION", "receiptData": "AKKNMP", "agreementId": "13433", "posCardEntryMode": null, "eref": null, "eauth": null, "xrequestId": "15bd2b5f-1a31-4342-8227-89fd65e18b8b", "tref": null } ] }
*Only single record is displayed for sample.

For a complete reference and detailed information on response fields, see Response section of Transaction List in documentation.

That's It, You're Done!

You have successfully generated a list of transactions for last 7 days.

We use cookies to personalize your browsing experience. By continuing to visit this website you agree to our use of cookies. You may read more about this on our Terms & Conditions.
×