Examples
Authorization request (0100)
Chip read transaction (see Contactless- and Chip-capable Terminal transaction types)
// code is compatible with .net8 console app
using System.Web;
using Microsoft.Extensions.DependencyInjection;
var service = new ServiceCollection();
service.AddHttpClient();
var client = service.BuildServiceProvider()
.GetService<IHttpClientFactory>()!
.CreateClient();
var parameters = new Dictionary<string, string>
{
{ "MsgType", "0100" },
{ "MsgSenderID", "[insert your username]" },
{ "MsgSenderAP", "[insert your password]" },
{ "MsgID", "123456" },
{ "MerchantXID", "2995652ABCDEFGH" },
{ "MerchantType", "5999" },
{ "TerminalID", "18101001" },
{ "CardType", "V" },
{ "CardNumber", "4761739001010010" },
{ "CardExpDate", "2512" },
{ "TransType", "45" },
{ "TransAmount", "25.5" },
{ "TransCurrency", "352" },
{ "TransTime", "230101" },
{ "TransDate", "0310" },
{ "MerchantName", "CIP*Billy shoes" },
{ "MerchantCity", "London" },
{ "Track2", "4761739001010010D25122010000000000" },
{ "ICCData", "DF0101005F2A02035282027D00950500000080009A031609159C01009F02060000000010009F03060000000000009F0902008C9F100706010A03A000029F1A0203529F260824E4C09B606699A89F2701809F3303E0B8C89F34031E03009F3501229F360200029F37046B9A9D02840D5041592E5359532E4444463031" },
{ "DeviceId", "12345678" }
};
var request = new HttpRequestMessage(HttpMethod.Post, "https://authorization.acquiring.uat.valitor.com/process")
{
Content = new FormUrlEncodedContent(parameters)
};
HttpResponseMessage response = await client.SendAsync(request);
if (response.IsSuccessStatusCode)
{
var content = await response.Content.ReadAsStringAsync();
var responseParameters = System.Web.HttpUtility.ParseQueryString(content);
// Process responseParameters here
}
else
{
// Handle error
}
curl -i
--header "Content-Type:application/x-www-form-urlencoded"
--request POST
--data "MsgType=0100&MsgSenderID=[insert your username]&MsgSenderAP=[insert your password]&MsgID=123456&MerchantXID=2995652ABCDEFGH&MerchantType=5999&TerminalID=18101001&CardType=V&CardNumber=4761739001010010&CardExpDate=2512&TransType=45&TransAmount=25.5&TransCurrency=352&TransTime=230101&TransDate=0310&ICCData=DF0101005F2A02035282027D00950500000080009A031609159C01009F02060000000010009F03060000000000009F0902008C9F100706010A03A000029F1A0203529F260824E4C09B606699A89F2701809F3303E0B8C89F34031E03009F3501229F360200029F37046B9A9D02840D5041592E5359532E4444463031&Track2=4761739001010010D25122010000000000&MerchantName=CIP*Billy shoes&MerchantCity=London"
https://authorization.acquiring.uat.valitor.com/process
Authorization response (0110)
Response http body example: