Force and Regular BatchClose
The BatchClose method is used to close a currently active processing batch. It may or may not be needed depending on how your merchant account is set up. Merchants set up as Merchant-Initiated Batching will need to close their own batches. If you are set up as Time-Initiated Batching, you do not need to use this method. There are two different BatchCloseType settings you can use:
Merchant Initiated Batch Close
Force: This is the most common. If you call BatchClose with this BatchCloseType, the host batch will be closed without the user sending in any totals.
Regular: Before calling BatchClose with this BatchCloseType, you will need to know the totals of your batch. These can come from your own totals, or you can call the
BatchTotalsQuery method to get the totals you need from the host. You may want to consider calling BatchTotalsQuery first and then comparing your totals to the host totals before calling BatchClose.
Force BatchClose XML Example Request:
<BatchClose xmlns="https://transaction.elementexpress.com"> <Credentials> <AccountID>insert</AccountID> <AccountToken>insert</AccountToken> <AcceptorID>insert</AcceptorID> </Credentials> <Application> <ApplicationID>insert</ApplicationID> <ApplicationName>insert</ApplicationName> <ApplicationVersion>insert</ApplicationVersion> </Application> <Batch> <HostBatchID>1</HostBatchID> <BatchCloseType>1</BatchCloseType> </Batch> <Terminal> <TerminalID>001</TerminalID> </Terminal> </BatchClose>