GetFTMiniStatement
- Method
SlimCD.Reports.GetBatchHistory2Purpose
Get the batch totals for a particular site/date range, returning a standard format for all processors .Description
GetBatchHistory returns records representing data for each batch within the specified date range. Each record represents a batch of transactions, and contains a unique Batch ID that can be provided to GetClosedBatchTransactions to retrieve the actual transactions in that batch.Business Rules
Argument List
Name Required Usage GetFTMiniStatementRequest Required Object containing properties for the request timeout Optional Integer wait time, in seconds, before timeout response is generated callback* Optional Function to call upon completion of asynchronous request *for JavaScript only
GetFTMiniStatement Request Fields
Field Name Type Length Required Description Username string 20 require Username or API Access Credential that accesses web service. SiteID integer 10 optional Assigned by the Slim CD administrator. StartDate EndDate 1 Passwords are required except when the username is set to an API Access Credential, in which case it should be passed in as an empty string.
2 If an API Access Credential is only authorized for a single sites, passing in the default siteid value of zero will close the currently open batch for that single site.
3 If the API Access Credential is authorized for multiple sites, the SiteID must be specified to indicate which batch to close.
3 If the username is set to a clientid or username other than an API Access Credential, you must specify a non-zero siteidto indicate which batch to close.
5 The batchnumber should always be passed as an empty string to close the open batch. Specifying a batch number will re-close an existing batch and may result in duplicate charges.
Reply Fields
reply outer tag for the reply data block response Success, FAIL, Error response code 0, 1, 2 (respective) matching the above description If successful, this will contain the single word, OK. Otherwise it will contain a description of failure or error which occurred reponseurl The Slimcd.com url which was called for this operation datablock The confirmation text returned from the server. Reply Hierarchy
- reply
- response
- responsecode
- description
- responseurl
- datablock
- Batches
- BatchRecord
- ID
- BatchDate
- MerchantID
- BatchNumber
- RecordCount
- Amount
- SalesCount
- SalesAmount
- RefundCount
- RefundAmount
- ResponseCode
- ResponseText
- ErrorCodes
- ErrorData
- BatchRecord
- Batches
Remarks
- General
- Names in name/value pairs are NOT case-sensitive
- Names inside XML tags ARE case-sensitive
- Function-Specific
- None
- reply
- Include
012<script src="https://trans.slimcd.com/soft/json/slimcd.js"></script>
Method
12345function CloseBatch(request,callback)function CloseBatch(request,timeout,callback)
Request
123request= { "username" : "RGCQGBRU", "password" : "", "siteid" : "0", "batchnumber" : "" }
Reply
1234567891011callback ( {"reply":{"response":"Success","responsecode":"0","description":"OK","responseurl":"/wswebservices/transact.asmx/CloseBatch","datablock":"Y*876624\n"}} );
Sample Code
12345678910111213141516171819<script src="https://trans.slimcd.com/soft/json/slimcd.js"></script><script>// <![CDATA[SlimCD.Transact.CloseBatch({"username": "R6UT8C6M", "siteid": "0", "password": "", "batchnumber": ""},function (reply) {if (reply.response == "Success") {alert ('Batch Closed');} else {alert('There was a problem closing the batch:\r\n' + reply.description);}});// ]]></script>
Downloads
- URL
Protocols
SOAP/XML, HTTP POST, HTTP GET
REQUEST WITH NAME/VALUE PAIRS
username=R6UT8C6M&password=&siteid=0&batchnumber=REQUEST WITH SOAP/XML Protocol Details for SOAP 1.1 and SOAP 1.2
https://trans.slimcd.com/wswebservices/transact.asmx?op=CloseBatchReply Output is in XML format if a status code of 200 is returned.
123456789<!--?xml version="1.0" encoding="utf-8" ?-->Success0OKhttps://trans.slimcd.com/wswebservices/transact.asmx/CloseBatchY*875873If the block’s tag does not indicate “Success”, the tag will contain an error description which can be displayed to the end-user
Sample Code
Remarks
JSON (based on content-type)DOWNLOAD
DOWNLOADS
ONLINE EXERCISER TOOL
Use our online exerciser tool. - URL
123https://trans.slimcd.com/soft/json/jsonscript.asp?service=CloseBatch
Protocols
HTTP POST, HTTP GET
REQUEST WITH NAME/VALUE PAIRS
123&username=RGCQGBRU&password=&siteid=&batchnumber=
REQUEST WITH JSON
123456{ “username” : "R6UT8C6M","password" : "" ,"siteid” : "","batchnumber" :"" }
Reply
1234567891011{"reply":{"response":"Success","responsecode":"0","description":"OK","responseurl":"/wswebservices/transact.asmx/CloseBatch","datablock":"Y*875863\n"}}
Reply
123