API Delete Customer Profile

The PayTrace API provides an interface for customer profiles to be created, updated, and deleted. Since the customer billing information is saved on the PayTrace secured servers and accessed by authenticated users at any time, your software does not need to store sensitive information on your server or the client computer.

Delete Customer Request

Required Name Value Pairs


Optional Name Value Pairs For Delete Customer Request

Since the customer profile is being deleted, no optional name / value pairs are applicable for delete customer requests.

Sample Delete Customer Request

‘format the request string to delete customer ID johndoe
strRequest = “UN~demo123|PSWD~demo123|TERMS~Y|METHOD~DeleteCustomer|”
strRequest = strRequest & “CUSTID~johndoe|”

strResponse = SendPayTraceAPIRequest(strRequest) ‘defined in Referencing the API Page

Request Response

Returned Name Value Pairs


Example of Parsing a Delete Customer Response

‘declare tools to loop through the response and store the current name / value pair
Dim arrResponse() as String
Dim arrPair() as String
Dim Counter as Integer

‘declare the tools to store the values of the appropriate responses
Dim strError As String
Dim strResponseMessage As String
Dim strCustomerID As String

‘check to make sure the response was not empty/invalid
if strResponse <> “” and inStr(strResponse,”|”) > 0 and inStr(strResponse,”~”) > 0 then
    arrResponse = split(strResponse, “|”) ‘split the response into an array of name/value pairs

    for Counter = 0 to uBound(arrResponse)-1
        arrPair = split(arrResponse(Counter), “~”)
        If UCase(arrPair(0)) = "ERROR" Then
            StrError = strError & arrPair(1)
        ElseIf UCase(arrPair(0)) = "RESPONSE" Then
            strResponseMessage = arrPair(1)
        ElseIf UCase(arrPair(0)) = "CUSTOMERID" Then
            strCustomerID = arrPair(1)
        End If 
    StrError = StrError  & “The response from the PayTrace API was invalid."
End if 

If StrError <> “” then
    MsgBox “Customer was not successful per the following error: ” & StrError
    MsgBox “Customer was successful: ” & strResponseMessage    
End if