Soap API v1.2


Retrieve a specific customer payment method for a given CustNum.


This method allows you to retrieve a specific payment method stored for a particular customer.

This method requires the use of the CustNum, a unique customer number assigned by the gateway. If you have lost or cannot remember the customer's CustNum, use the searchCustomers method to find the correct CustNum.

You must also specify the MethodID for the desired Payment Method. This MethodID is assigned by the gateway and returned by addCustomerPaymentMethod. You can also obtain the methodid from the MethodID property of the PaymentMethod object. This is returned by either getCustomer or getCustomerPaymentMethods.

See also getCustomer and getCustomerPaymentMethods


PaymentMethod getCustomerPaymentMethod ( ueSecurityToken Token, integer CustNum, integer MethodID )


Type Name Description
ueSecurityToken Token Merchant security token: used to identify merchant and validate transaction.
integer CustNum Unique customer ID number assigned by the gateway.
integer MethodID Unique payment method ID assigned by the gateway.

Return Value

PaymentMethod Returns a PaymentMethod object



For directions on how to set up the WSDL link, create “$token” and “$client” please see the SOAP PHP Howto.

try { 
   $custnum = '532'; 
   $methodid = '1234';
   $paymethod = $client->getCustomerPaymentMethod($token,$custnum,$methodid); 
   echo $paymethod->MethodName . "\n";
} 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 either the Java JAX-RPC Howto or the Java JAX-WS Howto.

try {
  //Set custnum to the Customer Number of customer you 
  //want to retrieve a payment method from.
  BigInteger custnum = new BigInteger("12345678");
  //Set PayID to the Payment Method ID of the 
  //Payment Method you want to retrieve.
  BigInteger PayID = new BigInteger("654321");
  PaymentMethod PayMethod = new PaymentMethod();
  PayMethod = client.getCustomerPaymentMethod(token, custnum, PayID);
} catch (Exception e) {
    System.out.println("Soap Exception: " + e.getMessage());


Dim CustNum As String
        CustNum = "115163"
        Dim MethodID As String
        MethodID = "72"
        Dim Method As usaepay.PaymentMethod = New usaepay.PaymentMethod
        Method = client.getCustomerPaymentMethod(token, CustNum, MethodID)


string CustNum = "105619";
            string MethodID = "42";
            usaepay.PaymentMethod Method = new usaepay.PaymentMethod();
                Method = client.getCustomerPaymentMethod(token, CustNum, MethodID);
            catch (Exception err)

Change History

Version Change
1.2 The getPaymentMethod method was added in release 1.2
developer/soap-1.2/methods/getcustomerpaymentmethod.txt · Last modified: 2010/10/20 11:45 by irina

Page Tools