{
	"info": {
		"_postman_id": "d074d210-70b7-48cc-aa2e-020b3e519711",
		"name": "TRAPI get transaction",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"name": "TRAPI get transaction index",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							"var timestamp = Math.floor(Date.now() / 1000);\r",
							"var nonce = \"949ea362891adfe9085057c4560ef1142cbe9893817343b9bad71407e977a7d4ab67ad075d5d71b3\";\r",
							"var app_key = \"Sonv0K7kB6PCIAbF0NzclFTsp89w7QHoYbWxOEg0wxcjthyP6szpAGw6y2HDFa0uvgFqM6E9Dx3\";\r",
							"var secret = \"pqZBSsrS1l\";\r",
							"var access_key = CryptoJS.HmacSHA256(app_key, secret + timestamp + nonce).toString(CryptoJS.enc.Hex);\r",
							"\r",
							"pm.environment.set(\"new_timestamp\", timestamp);\r",
							"pm.environment.set(\"access_key\", access_key);\r",
							"pm.environment.set(\"nonce\", nonce);\r",
							"pm.environment.set(\"app_key\", app_key);"
						],
						"type": "text/javascript"
					}
				}
			],
			"protocolProfileBehavior": {
				"disabledSystemHeaders": {
					"content-type": true
				}
			},
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "",
						"type": "default"
					},
					{
						"key": "X-tranzila-api-app-key",
						"value": "{{app_key}}",
						"type": "default"
					},
					{
						"key": "X-tranzila-api-request-time",
						"value": "{{new_timestamp}}",
						"type": "default"
					},
					{
						"key": "X-tranzila-api-nonce",
						"value": "{{nonce}}",
						"type": "default"
					},
					{
						"key": "X-tranzila-api-access-token",
						"value": "{{access_key}}",
						"type": "default"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\r\n  \"terminal_name\": \"hujipay\",\r\n  \"transaction_index\": 121\r\n}\r\n",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "https://api.tranzila.com/v1/transactions",
					"protocol": "https",
					"host": [
						"api",
						"tranzila",
						"com"
					],
					"path": [
						"v1",
						"transactions"
					],
					"query": [
						{
							"key": "Tdate",
							"value": null,
							"disabled": true
						},
						{
							"key": "Fdate",
							"value": null,
							"disabled": true
						}
					]
				}
			},
			"response": []
		},
		{
			"name": "TRAPI get transaction date",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							"var timestamp = Math.floor(Date.now() / 1000);\r",
							"var nonce = \"949ea362891adfe9085057c4560ef1142cbe9893817343b9bad71407e977a7d4ab67ad075d5d71b3\";\r",
							"var app_key = \"Sonv0K7kB6PCIAbF0NzclFTsp89w7QHoYbWxOEg0wxcjthyP6szpAGw6y2HDFa0uvgFqM6E9Dx3\";\r",
							"var secret = \"pqZBSsrS1l\";\r",
							"var access_key = CryptoJS.HmacSHA256(app_key, secret + timestamp + nonce).toString(CryptoJS.enc.Hex);\r",
							"\r",
							"pm.environment.set(\"new_timestamp\", timestamp);\r",
							"pm.environment.set(\"access_key\", access_key);\r",
							"pm.environment.set(\"nonce\", nonce);\r",
							"pm.environment.set(\"app_key\", app_key);"
						],
						"type": "text/javascript"
					}
				}
			],
			"protocolProfileBehavior": {
				"disabledSystemHeaders": {
					"content-type": true
				}
			},
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "",
						"type": "default"
					},
					{
						"key": "X-tranzila-api-app-key",
						"value": "{{app_key}}",
						"type": "default"
					},
					{
						"key": "X-tranzila-api-request-time",
						"value": "{{new_timestamp}}",
						"type": "default"
					},
					{
						"key": "X-tranzila-api-nonce",
						"value": "{{nonce}}",
						"type": "default"
					},
					{
						"key": "X-tranzila-api-access-token",
						"value": "{{access_key}}",
						"type": "default"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\r\n  \"terminal_name\": \"terminal_name\",\r\n  \"transaction_start_date\": \"2022-08-01\",\r\n  \"transaction_end_date\": \"2022-08-31\",\r\n  \"page\": 2\r\n }\r\n",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "https://api.tranzila.com/v1/transactions",
					"protocol": "https",
					"host": [
						"api",
						"tranzila",
						"com"
					],
					"path": [
						"v1",
						"transactions"
					],
					"query": [
						{
							"key": "Tdate",
							"value": null,
							"disabled": true
						},
						{
							"key": "Fdate",
							"value": null,
							"disabled": true
						}
					]
				}
			},
			"response": []
		}
	]
}