Run a transaction using payment data stored in the customer database.
Processes a new transaction using the payment details stored for the customer. This is a one time charge and does not use or affect the recurring billing values, such as amount and description, that have been stored for the customer. The transaction result will be tied to the customer and will be visible in the customer's billing history. The customer does not need to have recurring billing enabled for this method to be used.
See also addCustomer, addCustomerPaymentMethod
| Type | Name | Description |
| ueSecurityToken | Token | Merchant security token: used to identify merchant and validate transaction. |
| integer | CustNum | Customer Reference number assigned by the gateway |
| integer | PaymentMethodID | ID of payment method to use for transaction. Send 0 to use default method |
| CustomerTransactionRequest | Parameters | Transaction amount, invoice number, etc. |
| TransactionResponse | Returns all applicable transaction results including transaction reference number, batch number, transaction result (approved, declined, error), result code, authorization code, AVS result, CVV2 result, Verified by Visa or SecureCode Mastercard results, and converted currency amount and rate. |
For directions on how to set up the WSDL link, create “$token” and “$client”, go to PHP Soap How-to.
<?php
try {
$Parameters=array(
'Command'=>'Sale',
'Details'=>array(
'Invoice' => rand(),
'PONum' => '',
'OrderID' => '',
'Description' => 'Sample Credit Card Sale',
'Amount'=>'1.50' )
);
$CustNum='123456';
$PayMethod='0';
$res=$client->runCustomerTransaction($token, $CustNum, $PayMethod, $Parameters);
print_r($res);
}
catch (SoapFault $e) {
echo $client->__getLastRequest();
echo $client->__getLastResponse();
die("runCustomerTransaction failed :" .$e->getMessage());
}
?>
Dim custnum As String
custnum = "103125"
Dim paymentMethodID As String
paymentMethodID = "39"
Dim tran As usaepay.CustomerTransactionRequest = New usaepay.CustomerTransactionRequest
tran.Details = New usaepay.TransactionDetail
tran.Details.Invoice = "123456"
tran.Details.Description = "Sample Credit Card Sale"
tran.Details.Amount = 1.05
tran.Details.AmountSpecified = True
Dim response As usaepay.TransactionResponse
response = New usaepay.TransactionResponse
response = client.runCustomerTransaction(token, custnum, paymentMethodID, tran)
MessageBox.Show(String.Concat(response.Result))
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.
string custNum = "89147";
string paymentMethodID = "19";
usaepay.CustomerTransactionRequest tran = new usaepay.CustomerTransactionRequest();
tran.Details = new usaepay.TransactionDetail();
tran.Details.Invoice = "123456";
tran.Details.Description = "Sample Credit Card Sale";
tran.Details.Amount = 1.05;
tran.Details.AmountSpecified = true;
usaepay.TransactionResponse response = new usaepay.TransactionResponse();
try
{
response = client.runCustomerTransaction(token, custNum, paymentMethodID, tran);
MessageBox.Show(string.Concat(response.Result));
}
catch (Exception err)
{
MessageBox.Show(err.Message);
}
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:usaepay" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:runCustomerTransaction>
<Token xsi:type="ns1:ueSecurityToken">
<ClientIP xsi:type="xsd:string">192.168.0.1</ClientIP>
<PinHash xsi:type="ns1:ueHash">
<HashValue xsi:type="xsd:string">11ac55b0a0b59f8f028dbf85bc32266fa973dd0e</HashValue>
<Seed xsi:type="xsd:string">12678150211876663375</Seed>
<Type xsi:type="xsd:string">sha1</Type>
</PinHash>
<SourceKey xsi:type="xsd:string">HB4P7C4K2w2ZCQQQXRqrxDj6agrS2NIT</SourceKey>
</Token>
<CustNum xsi:type="xsd:integer">12345</CustNum>
<PaymentMethodID xsi:type="xsd:integer">0</PaymentMethodID>
<Parameters xsi:type="ns1:CustomerTransactionRequest">
<Command xsi:type="xsd:string">Sale</Command>
<Details xsi:type="ns1:TransactionDetail">
<Amount xsi:type="xsd:double">29</Amount>
<Description xsi:type="xsd:string">Example Transaction</Description>
<Invoice xsi:type="xsd:string">123456789</Invoice>
</Details>
</Parameters>
</ns1:runCustomerTransaction>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
| Version | Change |
| 1.3 | Dropped the Details arg and switched to Parameters arg, Remove Command arg |
| 1.2 | Modify Details property to use CustomerTransactionsDetails |
| 1.1 | Soap 1.1 Release (no changes) |