• Multi Bank Virtual POS

Transaction Inquiry General Concepts

This service is utilized to retrieve the most up-to-date status of transactions conducted via Tami. By transmitting 'true', the transaction's order number and transaction details can be queried. This service is designed to exhibit the latest transaction status and provide details on all transactions associated with the specified order. The information output is presented in the English language.

Test/Prod Envirenement API User Information

For Virtual POS transactions, merchants can use the merchant information given in the table below for the controls they want to perform in the test environment.

For Virtual POS transactions to be realized from the prod environment via Tami, the merchant number is obtained by making an application.

You can access the Sandbox test portal at https://sandbox-portal.tami.com.tr. When you log in to the test portal with the users provided below, the transactions made by the workplace connected to this user can be viewed. Transactions can be canceled/refunded.

User Phone Number User Password Sms / Email Otp Workplace Number Terminal Number Secret Key
5346484700 147850 147852 77006950 84006953 0edad05a-7ea7-40f1-a80c-d600121ca51b
5346484709 147850 147852 77006951 84006954 c8581bb6-a4b2-4925-8c94-529fc651399e
5346484803 147850 147852 77006952 84006955 ff7d4895-0c32-4f48-86ab-fb9ecca9f3d7
5346484807 147850 147852 77006953 84006956 33124ff0-0b19-4cf9-b002-13a35eae865b
5346484800 147850 147852 77006954 84006957 7daf9631-e136-4164-9ddb-dd1c02df851d
5346484808 147850 147852 77006956 84006959 fe6f3fff-0434-4932-a27d-bb3dac9de49d

Hash Calculation

The request sent for many transaction types should include the PG-Auth-Token in the header information. The PG-Auth-Token consists of the values "MerchantNumber:TerminalNumber:Hash".

When calculating the hash here, the merchantNumber, terminalNumber, and secretKey information belonging to the merchant are hashed with sha256 and converted to a string.

public class SHA256Example {\n public static String sha256(Long merchantNumber, Long terminalNumber, String secretKey) {\n String text = merchantNumber.toString() + terminalNumber.toString() + secretKey;\n try {\n MessageDigest digest = MessageDigest.getInstance(\"SHA-256\");\n byte[] hash = digest.digest(text.getBytes(StandardCharsets.UTF_8));\n String sha256Hex = DatatypeConverter.printBase64Binary(hash);\n return sha256Hex;\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n return null;\n }\n }\n}

TAMİ Test Portal Information

You can access the Tami test portal at https://sandbox-portal.tami.com.tr. From this address, you can view the portal screen with the users specified above. 

For your production environment information you can become a member at https://portal.tami.com.tr or You can apply to the e-commerce support unit.

Query Process API Information

The url "https://sandbox-paymentapi.tami.com.tr/payment/query" will be used in the studies to be carried out in the test environment.

In the studies to be carried out in the production environment, the url "https://paymentapi.tami.com.tr/payment/query" will be used.

API Request Parameters and Descriptions

Field Format Max Size (O)psiyonel / (M)andatory Description
orderId String (2-36) M The information is the order number for the sales transaction to be queried.
isTransactionDetail String   O If "true" is provided, all transactions from the inception of the order will be disclosed. If "false" or left empty is provided, only details concerning the final status of the order will be conveyed.
securityHash String M It is the value expected to be calculated and transmitted as specified in the document. If it is missing or incorrectly transmitted, the transaction is not routed to the bank, an error is given.

API Request Example

{\n \"orderId\": \"orderquery\", \n \"isTransactionDetail\": \"true\",\n \"securityHash\": \"4djd40585YY95U8375wdkdT==\"\n}

API Response Example

{\n \"success\": true,\n \"securityHash\": \"873e78gedceb378937==\",\n \"systemTime\": \"2023-09-15T14:48:45.755\",\n \"correlationId\": \"correlation3962\",\n \"amount\": 50,\n \"orderDate\": \"2023-08-17T16:47:54.012\",\n \"currency\": \"TRY\",\n \"installmentCount\": 7,\n \"orderStatus\": \"AUTH\",\n \"card\": {\n \"binNumber\": \"41556501\",\n \"cardBrand\": \"DİĞER BANKA\",\n \"cardOrganization\": \"VISA\",\n \"cardType\": \"CREDIT\"\n },\n \"transactions\": [\n {\n \"amount\": 50,\n \"transactionType\": \"AUTH\",\n \"transactionStatus\": \"SUCCESS\",\n \"transactionDate\": \"2023-08-17T16:47:54.833\"\n }\n ]\n}

API Response Parameters and Descriptions

Field Format Description
success String The transaction outcome is directly linked to the query. Should it prove to be accurate, additional details pertaining to the transaction will likewise be provided.
errorCode String If the "Success" field is set to "False," it represents the error code that was encountered.
errorMessage String This parameter is passed if the operation fails. Error message information.
systemTime DateTime It is now time to consider the actions that have been taken.
correlationId String The provided information pertains to the transaction number associated with the inquiry transaction submitted by the member merchant.
amount Number The provided information represents the net amount of the transaction. For instance, in a transaction valued at 100 Turkish Lira with a refund transaction of 20 Turkish Lira, the amount will be displayed as 80 Turkish Lira.
orderDate dateTime The transaction creation date.
currency String The foreign currency code of the transaction.
installmentCount Number The number of installments of the transaction
orderStatus String The final status of the transaction.
card Object The following document provides information regarding the transaction card.
card/binNumber String The first eight digits of the card being processed.
card/cardBrand String Card reward group information includes BONUS, WORLD, AXESS, and other relevant reward categories.
card/cardOrganization String Card organization information comprises well-known entities such as American Express (AMEX), Troy, Mastercard, Visa, and others.
card/cardType String It is a card type, either CREDIT or DEBIT.
transactions List If the parameter `isTransactionDetail='true'` is included in the request, the system will return all transaction data starting from the initiation of the respective order.
transactions/amount Number The amount of the relevant record
transactions/transactionType String The transaction type of the relevant record.
transactions/transactionStatus String the success status of the relevant record
transactions/transactionDate dateTime Date of the relevant record
transactions/reason String Date of the relevant record
securityHash String The value to be used to determine that the result of the operation came from the correct source. The documentation specifies how it should be calculated.

Security Hash Calculation

You can use the documentation here to calculate the securityHash field in service requests and incoming service responses. 

Error Codes

You can access the list of error codees on this page.

Test Cards

You can access the list of test cards on this page.

We are here for all your questions and support requests.

Ask a Question Ask a Question