This is an old revision of the document!

Soap API v1.2


Capture a queued transaction.


Move an authorized transaction into the current batch for settlement. It is possible to capture an amount other than the one originally authorized, however, you must follow the guidelines established by the merchant service bank. Capturing a higher or lower dollar amount could result in additional penalties and fees.

Most banks typically allow no more than 10 days to pass between the authorization/capture and settlement of a transaction.

If you do not wish to capture a previously authorized transaction, you may void the original authorization rather than capturing a 0 dollar amount, or simply allow the captured transaction to time out.

See also runTransaction, runQuickSale, voidTransaction, runCredit, runSale, runAuthOnly, getTransactionStatus


TransactionResponse captureTransaction ( ueSecurityToken Token, integer RefNum, Amount )


Type Name Description
ueSecurityToken Token Merchant security token: used to identify merchant and validate transaction.
integer RefNum Unique transaction reference number assigned by the gateway.
double Amount Capture Amount if different from authorization

Return Value

TransactionResponse Returns a TransactionResponse object containing the results of the transaction and all relevant data.



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

try { 
//Initial Authorization
    'AccountHolder' => 'Tester Jones', 
    'Command' => 'authonly', 
    'Details' => array( 
      'Description' => 'Example Transaction', 
      'Amount' => '4.00', 
      'Invoice' => '44539' 
    'CreditCardData' => array( 
      'CardNumber' => '4444555566667779', 
      'CardExpiration' => '0909', 
      'AvsStreet' => '1234 Main Street', 
      'AvsZip' => '99281', 
      'CardCode' => '999' 
  $temp=$client->runTransaction($token, $Request); 
//Capturing the authorization
  $res=$client->captureTransaction($token,$temp->RefNum,$amount );  
catch (SoapFault $e) { 
  echo $client->__getLastRequest(); 
  echo $client->__getLastResponse(); 
  die("Capture Transaction failed :" .$e->getMessage()); 


    Dim client As usaepay.usaepayService = New usaepay.usaepayService
    Dim token As usaepay.ueSecurityToken
    token = Me.CreateToken("982lz9VsLm87MA54Sv8E582h8OZMArL6", "443311")
    Dim transaction As usaepay.TransactionRequestObject = New usaepay.TransactionRequestObject
      transaction.Details = New usaepay.TransactionDetail
      transaction.Details.Amount = "9.02"
      transaction.Details.AmountSpecified = True
      transaction.Details.Invoice = "434534"
    transaction.AuthCode = "035786"
    transaction.RefNum = "46405618"
    Dim response As usaepay.TransactionResponse = New usaepay.TransactionResponse
    response = client.captureTransaction(token, transaction.RefNum, transaction.Details.Amount)
    If response.ResultCode = "A" Then
      MsgBox("Transaction Approved, Refnum: " & response.RefNum)
      MsgBox("Transaction Error, Reason: " & response.Error)
    End If


<?xml version="1.0" encoding="UTF-8"?> 
<SOAP-ENV:Envelope xmlns:SOAP-ENV="" 
xmlns:ns1="urn:usaepay" xmlns:xsd="" 
xmlns:xsi="" xmlns:SOAP-
<Token xsi:type="ns1:ueSecurityToken"> 
<ClientIP xsi:type="xsd:string"></ClientIP> 
<PinHash xsi:type="ns1:ueHash"> 
<HashValue xsi:type="xsd:string">5549461015afe2af9039eb84b6f8a5d289225652</HashValue> 
<Seed xsi:type="xsd:string">11934436591629303259</Seed> 
<Type xsi:type="xsd:string">sha1</Type> 
<SourceKey xsi:type="xsd:string">HB4P7C4K2w2ZCQQQXRqrxDj6agrS2NIT</SourceKey> 
<RefNum xsi:type="xsd:integer">1118274</RefNum> 
<Amount xsi:type="xsd:double">4</Amount> 
developer/soap/methods/capturetransaction.1250643593.txt.gz · Last modified: 2009/08/18 17:59 by charlie

Page Tools