Using JSON

Any of the request messages may be sent using JSON instead of the native Tag/Value format. Data should be formatted as strings for both the field name and the value.

When the request is sent using JSON then the response will be returned in JSON as well.

Example of Request

Native format:
tag=value&tag2=value2&array=[tag11=value11&tag12=value12][tag21=value21&tag22=value22]&tag3=value3
This is what it becomes in JSON:
{
"tag":"value",
"tag2":"value2",
"array":
	[
	"tag11":"value11",
	"tag12":"value12"
	]
  
	[
	"tag21":"value21",
	"tag22":"value22"
	],
"tag3":"value3"
}

Example of Transaction

Native format:
TERMID=TESTTERM&PASS=mypass&TYPE=L&SUBTYPE=GS&SCHEDID=1qhqndky1jov
This is what it becomes in JSON:
{
"termid":"TESTTERM",
"pass":"mypass",
"type":"L",
"subtype":"GS",
"schedid":"1qhqndky1jov"
}
and the response would be:
{
"TEXT": "OK",
"CODE": "0000",
"SCHEDID": "1qhqndky1jov",
"PYMTS": [
	{
		"DATE": "20200808",
		"AMT": "100.00",
		"REFNUM": "10qsshgp5l30ybzq",
		"RESULT": "A",
		"NOTIFY": "Y",
		"CARDMASK": "****5454",
		"RESPONSE": "APPROVED"
		},

		{
        "DATE": "20200901",
        "AMT": "100.00",
        "REFNUM": "1frgh22mncof9pn7",
        "RESULT": "A",
        "NOTIFY": "Y",
        "CARDMASK": "****5454",
        "RESPONSE": "APPROVED"
		},

		{
        "DATE": "20201001",
        "AMT": "100.00",
        "REFNUM": "udixn2om8a2gols9",
        "RESULT": "A",
        "NOTIFY": "Y",
        "CARDMASK": "****5454",
        "RESPONSE": "APPROVED"
        },

        {
        "DATE": "20201201",
        "AMT": "175.00",
        "REFNUM": "e0ac7b99-d94d-4b7a-b895-621e82e62a1e",
        "RESULT": "S",
        "NOTIFY": "N",
        "CARDMASK": "",
        "RESPONSE": ""
        }

],
"INVOICE": "1234567890",
"CARDMASK": "****5454",
"CARDHASH": "F1A4C12342655753EB662851254388FF",
"CUSTNAME": "JANE SMITH",
"CUSTEMAIL": "janesmith@email.com",
"STATUS": "C",
"DATE": "2020-10-15",
"TIME": "10:19:03",
"DUR": "0.681"
}