The system enables fully automated billing without the need for user intervention.
It supports the submission of files containing a large number of charge records in batch mode, in order to reduce processing time and minimize the load on the client workstation.
The system allows users to submit charge record files in the Shva IntIn format.
It supports the use of pre-generated tokens by including the token identifier in Field B of each record.
File uploads and downloads are performed via API. Each submitted file is assigned a unique key (reference ID), which must be used for identifying and tracking the billing process.
The billing is performed asynchronously in the background. Users can monitor the status of the billing process in several ways:
Once the billing is complete, the results file can be downloaded in the Shva IntOt format, either via the API or through the “File Management” page in the Reports System. In the Reports System, the results can also be downloaded in CSV format (see field definitions at the end of this document).
batch_proxy.exe – Usage Details
The batch_proxy.exe module allows integration with the BATCH interface via command line.
Usage Syntax:
batch_proxy.exe action (put/check/get) -parameter (-u, -p…) value …
Uploading a File for Billing
Command Line Parameters:
| Parameter | Description |
| put | Action type – for uploading a billing file |
| -u user | Username |
| -p password | Password |
| -t terminal | Terminal number |
| -f path | Path to the input file to be uploaded |
| -s sign | Token identifier |
| [-a path] | Service address (optional) |
| [-m mail] | Email address to receive billing summary notification (optional) |
| [-e] | Indicates the file is encoded in UTF-8; no value needed (optional) |
Example:
batch_proxy.exe put -t 0962210 -u uuuu -p pppp -m email@server.com -s tk578 -f C:\input.txt
Output:
A string with two comma-separated values:
result_code,request_id
request_id:
result_code Values:
| Code | Meaning |
| 000 | No error |
| 501 | User authentication failed |
| 514 | Invalid token identifier |
| 507 | Terminal not authorized for batch operations |
597 – General error, please contact support.
Important Note:
If the file upload fails (i.e., the result code is not 000), the error description will be returned instead of the request id.
Example – Error Response:
597,Error Message
Example – Successful Response:
000,CYWQ66RAT7TMCZ5
Checking Billing Status with batch_proxy.exe
Command Line Parameters:
| Parameter | Description |
| check | Action type – for checking billing status |
| -b batchid | The request ID (15-character reference) |
| [-a path] | Service address (optional) |
Example:
batch_proxy.exe check -b 30XLOFA9LIGTGS5
Output – Billing Status Codes:
| Code | Meaning |
| 1 | Successfully received (file was accepted) |
| 2 | Billing is in progress |
| 3 | Process completed |
| 6 | Aborted due to an error – please contact support |
| 510 | Operation does not exist |
| 597,<error description> | General error – operation failed with message |
Downloading the Output File with batch_proxy.exe
Command Line Parameters:
| Parameter | Description |
| get | Action type – download output file |
| -u user | Username |
| -p password | Password |
| -t terminal | Terminal number |
| -b batchid | Request ID (from file upload) |
| -f path | Path to save the output file |
| [-a path] | Service address (optional) |
Example:
batch_proxy.exe get -t 0962210 -u pppp -p uuuu -b ADIBAFVALGC2YYR -f C:\result.txt
Output Format:
result_code,status
Result Codes:
| Code | Description |
| 000 | No error – file downloaded successfully. Status should be 3. |
| 501 | User authentication failed |
| 510 | Request ID not found |
| 515 | Billing status does not allow file download (status shown in second field) |
| 597,<error message> | General error – error string replaces the status field |
Status Codes (Second Field):
| Status | Meaning |
| 1 | Successfully received |
| 2 | Billing in progress |
| 3 | Process completed (file is ready) |
| 6 | Aborted due to error – contact support |
batch_client.dll – .NET Component for Batch API Integration
The batch_client.dll interface exposes three core methods:
string UploadFile(
string terminal,
string user,
string password,
string tsign,
string fileFullPath,
string servicePath,
string mail = "",
bool utf8 = false
)
Parameters:
| Name | Type | Description |
| terminal | string | Terminal number |
| user | string | Username |
| password | string | Password |
| tsign | string | Token identifier (used in Field B of the INTIN format) |
| fileFullPath | string | Full path to the file being uploaded |
| servicePath | string | Service endpoint URL (optional) |
| string | Email address for receiving billing completion notice (optional) | |
| utf8 | bool | Set to true if the input file uses UTF-8 encoding (optional) |
Return Value:
String in format:
result_code,request_id
Result Codes:
| Code | Meaning |
| 000 | Success |
| 501 | User authentication failed |
| 514 | Invalid token identifier |
| 507 | Terminal not authorized for batch operations |
| 597 | General error – please contact support |
string GetStatus(string requestId, string servicePath)
Parameters:
| Name | Type | Description |
| requestId | string | 15-character request ID from UploadFile |
| servicePath | string | Service endpoint URL (optional) |
Return Value:
Billing status code:
| Code | Meaning |
| 1 | Successfully received |
| 2 | Billing in progress |
| 3 | Operation completed |
| 6 | Aborted due to error – contact support |
| 510 | Operation not found |
| 597,<error> | General error with error message |
string DownloadFile(
string terminal,
string user,
string password,
string requestId,
string saveAsFullName,
string servicePath
)
Parameters:
| Name | Type | Description |
| terminal | string | Terminal number |
| user | string | Username |
| password | string | Password |
| requestId | string | Request ID (from UploadFile) |
| saveAsFullName | string | Full path for saving the result file |
| servicePath | string | Service endpoint URL (optional) |
Return Value:
String in format:
result_code,status
Result Codes:
| Code | Meaning |
| 000 | Success – file downloaded. status should be 3 |
| 501 | User authentication failed |
| 510 | Operation ID not found |
| 515 | Billing is not yet complete – file cannot be downloaded |
| 597,<error> | General error – message replaces the status field |
Status Codes:
| Status | Meaning |
| 1 | Successfully received |
| 2 | Billing in progress |
| 3 | Operation completed |
| 6 | Aborted due to error – contact support |
This section demonstrates how to use Pelecard’s BATCH API via WCF — without a local client DLL.
WSDL Endpoint for Service Reference:
Add a service reference in Visual Studio using the following WSDL:
https://batch.pelecard.biz:334/?singleWsdl
Secure SSL Communication Configuration
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name=”netTcpEP”>
<security mode=”Transport”>
<transport clientCredentialType=”None” proxyCredentialType=”None” realm=”” />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address=”https://batch.pelecard.biz:334/”
binding=”basicHttpBinding”
bindingConfiguration=”netTcpEP”
contract=”ServiceReference1.IGateWay”
name=”netTcpEP” />
</client>
</system.serviceModel>
⚠ The actual names and parameter classes may vary slightly depending on Visual Studio version and namespace.
static void UploadFile() {
GateWayClient GW = new GateWayClient();
string requestId = "";
UploadFileParameters parameters = new UploadFileParameters {
Terminal = "XXXXXXX", // Terminal number
UserName = "XXXXXX", // Username
Password = "XXXXXX", // Password
TokenPrefix = "tk578", // Token ID used in INTIN, field B
Utf8 = true // Optional: true if the file uses UTF-8 encoding
};
// Ensure TLS 1.2 is used for secure communication
System.Net.ServicePointManager.SecurityProtocol =
System.Net.SecurityProtocolType.Tls12;
using (FileStream stream = new FileStream(@"C:\pelecard\batch\input1.txt",
FileMode.Open, FileAccess.Read))
{
string result = GW.UploadFile(parameters, stream, out requestId);
Console.WriteLine($"Result: {result}, Request ID: {requestId}");
}
}
static void CheckStatus()
{
GateWayClient GW = new GateWayClient();
int status = GW.GetStatus("DJB53XNA2XA6P1K"); // Request ID returned from UploadFile
Console.WriteLine($"Status Code: {status}");
}
Status Codes:
| Code | Meaning |
| 1 | File received successfully |
| 2 | Billing in progress |
| 3 | Billing completed |
| 6 | Failed due to an error – contact support |
| 510 | Request does not exist |
| 597,<message> | General error with details |
static void DownloadFile()
{
GateWayClient GW = new GateWayClient();
string saveAsFullName = @"C:\pelecard\batch\result_examp.txt";
Stream receiverStream;
ResultDetails res = GW.DownloadFile(
"XXXXXX", // Terminal
"ADIBAFVALGC2YYR", // Request ID
"XXXXXX", // Username
"XXXXXX", // Password
out receiverStream
);
if (res.RequestStatus == 3 && receiverStream != null) // Billing is complete
{
const int bufferLen = 65000;
byte[] buffer = new byte[bufferLen];
int count;
using (MemoryStream memoryStream = new MemoryStream())
{
while ((count = receiverStream.Read(buffer, 0, bufferLen)) > 0)
{
memoryStream.Write(buffer, 0, count);
}
receiverStream.Close();
receiverStream.Dispose();
using (FileStream file = new FileStream(saveAsFullName, FileMode.Create, FileAccess.Write))
{
memoryStream.WriteTo(file);
}
}
Console.WriteLine("Download completed.");
}
else
{
Console.WriteLine("File not ready or download failed.");
}
}
✅ Summary
| Task | Method | Output |
| Upload file | UploadFile() | resultCode, requestId |
| Check status | GetStatus() | Status code (1–6, 510, 597) |
| Download result | DownloadFile() | Result file written to disk |
Automated Batch Billing – Client-Side File Agent
The solution provides automation for sending batch (batch) billing files from the client side.
Input/output file management is similar to the Belclient interface.
Installation
The client must configure two shared folders for file exchange between the billing system and the automation service (called Agent File).
Service parameters and configurations can be managed via the configuration interface:
exe.config_autograbber.
Full Transaction File Workflow:
Additional Notes:
CSV Billing Results – Structure
The billing results can be downloaded in CSV format through Pelecard’s Reports System.
CSV File Fields (in order):
Added Link to IntIn-IntOt Guide Below:
IntIn-IntOt