Soap API v1.2


Retrieves the status of a batch specified by its BatchRefNum.


This method will check on the status of any batch within the merchant console. Enter the BatchRefNum (a unique batch reference number assigned by the gateway) into the search field and the method will return the status of the requested batch.

To pull the status of the currently open batch (which has not yet passed to the gateway), use 0 for the the BatchRefNum.

See also searchBatches, closeBatch, getBatchTransactions


BatchStatus getBatchStatus ( ueSecurityToken Token, integer BatchRefNum )


Type Name Description
ueSecurityToken Token Merchant security token: used to identify merchant and validate transaction.
integer BatchRefNum A unique batch reference number assigned by the gateway.

Return Value

BatchStatus This method returns a BatchStatus object which includes information about the requested batch including BatchRefNum (if assigned), batch sequence, status (open, closing, or closed) dates and times when the batch was opened and closed, sales count, credit count, total settled amount and other pertinent details.



For directions on how to set up the WSDL link, create “$token” and “$client”, go to PHP Soap How-to.

try {
  $Result=$client->getBatchStatus($token, $BatchRefNum);  
catch (SoapFault $e) { 
  echo "get Batch Upload status failed :" .$e->getMessage(); 


This example uses the USAePay Java library. For directions on how to install the library and create the token/client objects, go to either the Java JAX-RPC Howto or the Java JAX-WS Howto.

try {
  //Set BatchNum to the Batch Reference Number of the batch 
  //you want to retrieve.  0 is always the current batch
  BigInteger BatchNum = new BigInteger("0");
  BatchStatus batchstat = new BatchStatus();
  batchstat = client.getBatchStatus(token, BigInteger.ZERO);
} catch (Exception e) {
    System.out.println("Soap Exception: " + e.getMessage());


<?xml version="1.0" encoding="UTF-8"?> 
<SOAP-ENV:Envelope xmlns:SOAP-ENV="" 
xmlns:ns1="urn:usaepay" xmlns:xsd="" 
<Token xsi:type="ns1:ueSecurityToken"> 
<ClientIP xsi:type="xsd:string"></ClientIP> 
<PinHash xsi:type="ns1:ueHash"> 
<HashValue xsi:type="xsd:string">950f8fabf33653800dd71723a89154acaef9458f</HashValue> 
<Seed xsi:type="xsd:string">11937812191206985820</Seed> 
<Type xsi:type="xsd:string">sha1</Type> 
<SourceKey xsi:type="xsd:string">HB4P7C4K2w2ZCQQQXRqrxDj6agrS2NIT</SourceKey> 
<BatchRefNum xsi:type="xsd:integer">0</BatchRefNum> 

Change History

Version Change
1.2 Renamed BatchNum Parameter to BatchRefNum
1.1 Soap 1.1 Release
developer/soap/methods/getbatchstatus.txt · Last modified: 2009/09/08 12:38 by charlie

Page Tools