Integration and Documentation

Full Documentation

The Developer Library contains documentation, examples, source code and controls
for integrating our gateway into your software.


Transaction API

The basic protocol for connecting to the gateway. Can be used either directly via a form or transparently via a CGI running on the merchant’s own webserver.

PHP Library

A simple class that provides an easy-to-use object-oriented interface to the USAePay gateway. Compatible with PHP4 or PHP5. Requires CuRL or PHP SSL Streams support.

Java Library

A complete Java implementation of the SOAP Interface. Include Jax-WS and
Jax-RPC versions.

Coldfusion Library

Provides a tag for use in Coldfusion Scripts.

Ruby Library

Easy to use Ruby interface for running server to server processing.

Advanced SOAP API

In addition to processing transactions, the SOAP interface may be used to pull reports, control batches, store customer data and automate reseller functionality.


A .NET class that allows developers to process cards via .NET applications. Includes easier to use wrappers to some SOAP Interface functions.

COM Object v2.0

An updated COM Object that can be used with any programming language that supports COM, including C and ASP.

JavaScript Code

Client-side JavaScript which works with USAePay.

Perl Library

A third party CPAN module that’s part of the Business::OnlinePayment framework.

Sample Code

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

         try {
		 	'AccountHolder' => 'Tester Jones',
         		'Details' => array(
         			'Description' => 'Example Transaction',
         			'Amount' => '4.00',
         			'Invoice' => '44539'
         		'CreditCardData' => array(
         			'CardNumber' => '4444555566667779',
         			'CardExpiration' => '0909',
         			'AvsStreet' => '1234 Main Street',
         			'AvsZip' => '99281',
         			'CardCode' => '999'
         	$res=$client->runSale($token, $Request);
         catch (SoapFault $e)  {
         	echo $client->__getLastRequest();
         	echo $client->__getLastResponse();
         	die("QuickSale 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 {
  			TransactionRequestObject params = new TransactionRequestObject();
  			// set card holder name
    				params.setAccountHolder("Test Joe");
    				// populate transaction details
    				TransactionDetail details = new TransactionDetail();
     					details.setDescription("My Test Sale");
    				// populate credit card data
    				CreditCardData ccdata = new CreditCardData();
  			// Create request object
  			RunSale request = new RunSale();
  			// Create response object
  			TransactionResponse response;
  			// run sale
  			response = client.runSale(token, params);
  			System.out.println("Result: " + response.getResult());
		} catch (Exception e) {
    				System.out.println("Soap Exception: " + e.getMessage());

For directions on how to set up the WSDL link, create “token” and “client”, go to 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 transaction As usaepay.TransactionRequestObject = New usaepay.TransactionRequestObject
                transaction.CreditCardData = New usaepay.CreditCardData
                transaction.CreditCardData.CardNumber = "4444555566667779"
                transaction.CreditCardData.CardExpiration = "0913"
                transaction.CreditCardData.CardCode = "999"
                transaction.Details = New usaepay.TransactionDetail
                transaction.Details.Amount = 9.02
                transaction.Details.AmountSpecified = True
                transaction.Details.Invoice = "434534"
                transaction.Details.Description = "Example transaction"
                Dim response As usaepay.TransactionResponse
                response = client.runSale(token, transaction)
                If response.ResultCode = "A" Then
                    MsgBox("Transaction Approved, Reference Number: " & response.RefNum & vbLf _
                                & "AVS Result: " & response.AvsResult)
                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.TransactionRequestObject tran = new usaepay.TransactionRequestObject();
                    tran.Details = new usaepay.TransactionDetail();
                    tran.Details.Amount = 1.00;
                    tran.Details.AmountSpecified = true;
                    tran.Details.Invoice = "1234";
                    tran.Details.Description = "Example Transaction";
                    tran.CreditCardData = new usaepay.CreditCardData();
                    tran.CreditCardData.CardNumber = "4444555566667779";
                    tran.CreditCardData.CardExpiration = "1212";
                    usaepay.TransactionResponse response = new usaepay.TransactionResponse();
                        response = client.runTransaction(token, tran);
                        if (response.ResultCode == "A")
                            MessageBox.Show(string.Concat("Transaction Approved, RefNum: ",
                            MessageBox.Show(string.Concat("Transaction Failed: ",
                    catch (Exception err)

        Tester Jones
        1234 Main Street
4 Example Transaction 44539



ePayment Form

The ePayment Form allows a merchant to send the customer to USAePay for the collection of secure payment information. This eliminates the need for individual merchants to maintain their own SSL certificates. To implement the payment form, the merchant’s website needs to redirect the customer to a specially formatted URL, display a form that will post to the USA ePay site, or display a button that’s connected to the form. Before creating the URL/form/button please see the sources section in order to setup the source key within the USAePay Merchant Console. You will need the source key to connect to the gateway.

Shopping Carts

USAePay offers a full list of compatible shopping carts.

POS Systems

USAePay maintains a list of known compatible POS/ERP Systems. Emulation

We highly recommend that you rewrite your application to use our gateway APIs. In some cases, this is impossible, and we offer another approach – gateway emulation.


We can emulate your gateway request and response calls without you having to change your code. Minimal modification will be required such as changing the processing URL and authentication.


Learn more about USAePay’s Emulator.

Customer Vault

CMS Customer Vault

Security for any merchant is of paramount importance. Customers put enormous trust in a merchant whenever they use online payment services of any kind. With the proper procedures and protocols in place, the convenience of online transactions can continue to entice customers to go to you. One of the methods we use to keep information secure, while providing a smooth transaction method, is called the Customer Vault.


So, What Exactly Is the Customer Vault?


Customer Vault securely stores customers’ sensitive information, so you don’t have to.


  • This allows you the ability to use recurring billing without obtaining a customer’s payment information every time you wish to make a transaction with them.
  • This information is protected in a secure, encrypted state. When you need to issue a charge, the system uses a “key” so that the information is not seen, but transactions can be arranged anyway–limiting your exposure to identity theft and related problems.
  • The information is stored outside of your own system, protecting you from unnecessary risk, as well as applicable regulatory requirements that must be met when storing this type of information.

Recurring Billing

CMS Recurring Billing

Using the Customer Vault, merchants have the ability to arrange repeat billing according to their particular specifications. You’ll have the ability to arrange billing, setting your own amounts, frequency and duration. The system does the rest for you.

Real-Time Online Reporting

CMS Online Reporting

Time is money. Many business owners could easily say they would like more of both. With speed in mind, our online reporting system has been set up to provide you with a level of detail expected of someone who is very cost-conscious and organized, but also wants something user-friendly and adaptable.


What Does the Online Reporting System Actually Tell Me?
  • Transactions
  • Batches
  • Deposit orders sent to your bank
  • Returns
  • Voided Transactions
  • Cancellations