Soap API v1.4


Delete a payment method from an existing customer.


This method removes a stored payment method from a customer's record.

Each customer record may contain multiple payment methods. (Exception: see Beta6 note below.) This option allows you to remove expired or unused payment methods from your customer's records.

New payment methods may be added by using addCustomerPaymentMethod.

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.

Please Note: Beta6 supports only one payment method for each customer. This means that if you delete a payment method from a customer's account without adding a new method, the customer will be left with no existing payment methods.

See also runCustomerTransaction, enableCustomer, disableCustomer, deleteCustomer, searchCustomerID, getCustomer, searchCustomers, getCustomerHistory, addCustomer, addCustomerPaymentMethod, updateCustomer, quickUpdateCustomer


boolean deleteCustomerPaymentMethod ( ueSecurityToken Token, Custnum, integer PaymentMethodID )


Type Name Description
ueSecurityToken Token Merchant security token: used to identify merchant and validate transaction.
integer Custnum No description available.
integer PaymentMethodID The ID of the payment method to be deleted.

Return Value

boolean Returns confirmation of payment method deletion only if successful. If deletion fails, an exception will be thrown.



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

try { 
  //Set CustNum for the Customer that you
  //want to delete a payment method from
  //Set PayID for the Payment Method ID
  //that you want to delete
  // Delete the payment method
  $Result=$client->deleteCustomerPaymentMethod($token, $CustNum, $PayID);	
} catch(Exception $e) { 
  echo 'Error: ' . $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 {
  //Set CustNum for the Customer that you
  //want to delete a payment method from
  BigInteger custnum = new BigInteger("12345678");
  //Set PayID for the Payment Method ID
  //that you want to delete
  BigInteger PayID = new BigInteger("7654321");
  boolean Result = client.deleteCustomerPaymentMethod(token, CustNum, PayID);
} catch (Exception e) {
    System.out.println("Soap Exception: " + e.getMessage());


Dim CustNum As String
        CustNum = "103125"
        Dim PaymentID As String
        PaymentID = "41"
        Dim response As Boolean
        response = client.deleteCustomerPaymentMethod(token, CustNum, PaymentID)


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 = "89792";
            string PaymentID = "21";
           Boolean response;
                response = client.deleteCustomerPaymentMethod(token, CustNum, PaymentID);
            catch (Exception err)

Change History

Version Change
1.1 Method added prior to soap-1.1
developer/soap-1.4/methods/deletecustomerpaymentmethod.txt · Last modified: 2010/09/09 12:03 by irina

Page Tools