Soap API v1.6


Run a sale based on the credit card details of a previous transaction.


This method allows you to run a new transaction using the payment data from a previous transaction. Simply pass the reference number ($RefNum) of the previous transaction and the gateway will automatically transfer the credit card or electronic check (ACH) information for use in the new transaction. Some credit card information, such as the card code and magnetic strip cannot be stored. This may cause the new transaction to come in at a higher rate than the original.

See also runTransaction, runSale, voidTransaction, runCredit


TransactionResponse runQuickSale ( ueSecurityToken Token, integer RefNum, TransactionDetail Details, boolean AuthOnly )


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.
TransactionDetail Details Request transaction details, including transaction amount, invoice number, customer ID, PO number, and other transaction specific data.
boolean AuthOnly If true, the transaction will be authorized, but not be submitted for settlement.

Return Value

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


The following exceptions (errors) are applicable to this method.

Code Message Advice
20002Invalid Security Token. Supplied security token is invalid.
10105Unable to find original transaction. The specified transaction RefNum did not match a eligible transaction or the transaction belongs to a different merchant.
10136Original transaction not approved. QuickSale only allowed for transactions that were approved



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

try {
    "Description"=>"Test Transaction",
  print_r($client->runQuickSale($token,$refnum, $details, true));
catch(SoapFault $e) {    
  echo $e->getMessage();
  echo "\n\nRequest: " . $client->__getLastRequest();
  echo "\n\nResponse: " . $client->__getLastResponse();


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

try {
  //Set RefNum to the transaction refference number
  //you want to run a quick sale on
  BigInteger RefNum = new BigInteger("123456789");
  //populate transaction details
  TransactionDetail details = new TransactionDetail();
  // Create response object
  TransactionResponse response;
  response = client.runQuickSale(token, RefNum, details, false);
  System.out.println("Response: " + response.getResult());
  System.out.println("RefNum: " + response.getRefNum());
} catch (Exception e) {
    System.out.println("Soap Exception: " + e.getMessage());


For directions on how to set up the WSDL link and create the “token” and “client” variables, go to the Visual Basic .Net Soap How-to.

   Dim client As usaepay.usaepayService = New usaepay.usaepayService
        Dim token As usaepay.ueSecurityToken
        token = Me.CreateToken("714SSUxv1uohng2XkMJ7kLpETsu58G66", "1234")
        Dim refnum As Integer
        Dim details As usaepay.TransactionDetail = New usaepay.TransactionDetail
        Dim authonly As Boolean
        refnum = "46990567"
        details.Amount = "34.50"
        details.AmountSpecified = True
        details.Description = "Example QuickSale"
        details.Invoice = "123456"
        authonly = False
        Dim response As usaepay.TransactionResponse
        response = client.runQuickSale(token, refnum, details, authonly)
        If response.ResultCode = "A" Then
            MsgBox("Transaction Approved, Refernce Number: " & response.RefNum)
        ElseIf response.ResultCode = "D" Then
            MsgBox("Transaction Declined, Reason: " & response.Error)
            MsgBox("Transaction Error, Reason: " & response.Error)
        End If


For directions on how to set up the WSDL link and create the “token” and “client” variables, go to the C Sharp .Net Soap How-to.

usaepay.TransactionDetail details = new usaepay.TransactionDetail();
            string refnum;
            bool authonly;
            refnum = "46973415";
            authonly = false;
            details.Amount = 34.50;
            details.AmountSpecified = true;
            details.Description = "Example QuickSale";
            details.Invoice = "123456";
            usaepay.TransactionResponse response = new usaepay.TransactionResponse();
                response = client.runQuickSale(token, refnum, details, authonly);
                if (response.ResultCode == "A")
                    MessageBox.Show(string.Concat("Transaction Approved, RefNum: ",
                    MessageBox.Show(string.Concat("Transaction Failed: ",
            catch (Exception err)



<?xml version="1.0" encoding="UTF-8"?> 
   <SOAP-ENV:Envelope xmlns:SOAP-ENV="" xmlns:ns1="urn:usaepay"
   xmlns:xsd="" xmlns:xsi=""
            <Token xsi:type="ns1:ueSecurityToken">
               <ClientIP xsi:type="xsd:string"></ClientIP>
               <PinHash xsi:type="ns1:ueHash">
                  <HashValue xsi:type="xsd:string">c453ae7c15f208e6e30e81f9c9882ff9c0fa36d7</HashValue>
                  <Seed xsi:type="xsd:string">11794238107-test</Seed>
                  <Type xsi:type="xsd:string">sha1</Type>
               <SourceKey xsi:type="xsd:string">_B4P7C4K2w2ZCQQQXRqrxDj6agrS2NIT</SourceKey>
            <RefNum xsi:type="xsd:integer">102161632</RefNum>
            <Details xsi:type="ns1:TransactionDetail">
               <Amount xsi:type="xsd:double">22</Amount>
               <Clerk xsi:type="xsd:string">John Doe</Clerk>
               <Currency xsi:type="xsd:string">0</Currency>
               <Description xsi:type="xsd:string">Example Transaction</Description>
               <Discount xsi:type="xsd:double">10</Discount>
               <Invoice xsi:type="xsd:string">44539</Invoice>
               <OrderID xsi:type="xsd:string">12345</OrderID>
               <PONum xsi:type="xsd:string">54321</PONum>
               <Shipping xsi:type="xsd:double">2</Shipping>
               <Subtotal xsi:type="xsd:double">12</Subtotal>
               <Table xsi:type="xsd:string">1</Table>
               <Tax xsi:type="xsd:double">10</Tax>
               <Terminal xsi:type="xsd:string">15</Terminal>
               <Tip xsi:type="xsd:double">8</Tip>
            <AuthOnly xsi:type="xsd:boolean">false</AuthOnly>


<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="" xmlns:ns1="urn:usaepay"
 xmlns:xsi="" xmlns:xsd=""
      <runQuickSaleReturn xsi:type="ns1:TransactionResponse">
        <AcsUrl xsi:nil="true" />
        <AuthAmount xsi:type="xsd:double">22</AuthAmount>
        <AuthCode xsi:type="xsd:string">056852</AuthCode>
        <AvsResult xsi:type="xsd:string">Address: Match &amp; 5 Digit Zip: Match</AvsResult>
        <AvsResultCode xsi:type="xsd:string">YYY</AvsResultCode>
        <BatchNum xsi:type="xsd:integer">198205</BatchNum>
        <BatchRefNum xsi:type="xsd:integer">198205</BatchRefNum>
        <CardCodeResult xsi:type="xsd:string">Match</CardCodeResult>
        <CardCodeResultCode xsi:type="xsd:string">M</CardCodeResultCode>
        <CardLevelResult xsi:type="xsd:string">Visa Traditional</CardLevelResult>
        <CardLevelResultCode xsi:type="xsd:string">A</CardLevelResultCode>
        <ConversionRate xsi:type="xsd:double">0</ConversionRate>
        <ConvertedAmount xsi:type="xsd:double">0</ConvertedAmount>
        <ConvertedAmountCurrency xsi:nil="true" />
        <CustNum xsi:type="xsd:integer">0</CustNum>
        <Error xsi:type="xsd:string">Approved</Error>
        <ErrorCode xsi:type="xsd:integer">0</ErrorCode>
        <isDuplicate xsi:type="xsd:boolean">false</isDuplicate>
        <Payload xsi:nil="true" />
        <RefNum xsi:type="xsd:integer">102162016</RefNum>
        <Result xsi:type="xsd:string">Approved</Result>
        <ResultCode xsi:type="xsd:string">A</ResultCode>
        <Status xsi:type="xsd:string">Pending</Status>
        <StatusCode xsi:type="xsd:string">P</StatusCode>
        <VpasResultCode xsi:type="xsd:string"></VpasResultCode>

Change History

Version Change
1.1 Method added prior to soap-1.1
developer/soap-1.6/methods/runquicksale.txt · Last modified: 2015/11/18 10:29 by yaya

Page Tools