Batch out and query Open batch

Batches Controller

Get open batch

get

Gets your current open batch on the gateway.

Header parameters
api-keyanyRequired

apiKeyValue

Body
refund-countstringOptional

Number of refunds in the batch

refund-totalstringOptional

total dollar amount of refunds in the batch

sales-countstringOptional

Number of sales/auths in batch

sales-totalstringOptional

Total dollar amount of sales in the batch

net-amountstringOptional

Total dollar amount in the batch

total-countstringOptional

Total number of transactions in the batch

confirmation-codestringOptional

on a settled batch the confirmation code

settledstringOptional

date and time of settled transactions

statusstringOptional

Batch status (OPEN,PENDING). A PENDING status is returned when the Batch is still considered OPEN but currently being processed.

Responses
200
Success
get
GET //rest/v2/batches/open HTTP/1.1
Host: gateway-sb.clearent.net
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 188

"refund-count='text'&refund-total='text'&sales-count='text'&sales-total='text'&net-amount='text'&total-count='text'&confirmation-code='text'&settled='text'&status='text'"
<?xml version="1.0"?>
<object>
	<batch>
		<confirmation-code>00039999</confirmation-code>
		<confirmation_code>text</confirmation_code>
		<date-opened>11113333</date-opened>
		<id>text</id>
		<merchant-id>000000101202</merchant-id>
		<net-amount>8800.00</net-amount>
		<net_amount>text</net_amount>
		<refund-count>2</refund-count>
		<refund-total>200.00</refund-total>
		<refund_count>text</refund_count>
		<refund_total>text</refund_total>
		<sales-count>32</sales-count>
		<sales-total>9000.00</sales-total>
		<sales_count>text</sales_count>
		<sales_total>text</sales_total>
		<settled>text</settled>
		<status>text</status>
		<switch-batch-id>text</switch-batch-id>
		<terminal-id>11113333</terminal-id>
		<terminal-name>Station 1</terminal-name>
		<total-count>34</total-count>
		<total_count>text</total_count>
	</batch>
	<payloadType>text</payloadType>
</object>

Close open batch

put

Open batches can be closed via the API, or they can be auto-closed according to gateway and/or merchant account settings.

Header parameters
api-keyanyRequired

apiKeyValue

Body
lastBatchClosedRequiredInResponsebooleanOptional
software-typestringOptional
Responses
200
Success
put
PUT //rest/v2/batches/open HTTP/1.1
Host: gateway-sb.clearent.net
Content-Type: application/xml
Accept: */*
Content-Length: 65

"<?xml version=1.0?>
<lastBatchClosedRequiredInResponse>true</lastBatchClosedRequiredInResponse>
<software-type>text</software-type>
"
<?xml version="1.0"?>
<object>
	<batch>
		<confirmation-code>00039999</confirmation-code>
		<confirmation_code>text</confirmation_code>
		<date-opened>11113333</date-opened>
		<id>text</id>
		<merchant-id>000000101202</merchant-id>
		<net-amount>8800.00</net-amount>
		<net_amount>text</net_amount>
		<refund-count>2</refund-count>
		<refund-total>200.00</refund-total>
		<refund_count>text</refund_count>
		<refund_total>text</refund_total>
		<sales-count>32</sales-count>
		<sales-total>9000.00</sales-total>
		<sales_count>text</sales_count>
		<sales_total>text</sales_total>
		<settled>text</settled>
		<status>text</status>
		<switch-batch-id>text</switch-batch-id>
		<terminal-id>11113333</terminal-id>
		<terminal-name>Station 1</terminal-name>
		<total-count>34</total-count>
		<total_count>text</total_count>
	</batch>
	<payloadType>text</payloadType>
</object>

Was this helpful?