Check or ACH (Automated Clearing House) transactions may be processed through the PayTrace API. Customer billing information may be referenced to an existing customer profile or key entered through the PayTrace API.
Please note that the PayTrace Secure Checkout page may be used to process check sales and holds/authorizations for those developers who wish to use PayTrace Secure Checkout as a means for their customers to provide their billing information.
- Any check may be processed through the PayTrace API as a test by setting the “TEST” attribute to “Y”. Test checks return standardized responses in the same format as live checks, but funds will not actually be transferred.
Processing a sale through the PayTrace API may be accomplished by providing a new customer’s key entered checking account information or the customer ID of an existing customer.
Process Check Sale Request
Required Name Value Pairs
UN, PSWD, TERMS, METHOD, CHECKTYPE, AMOUNT, DDA, TR
Process Check Sale to Customer ID/Token Request
Required Name Value Pairs
UN, PSWD, TERMS, METHOD, CHECKTYPE, AMOUNT, CUSTID
Optional Name Value Pairs For Any Process Check Sale
BNAME, BADDRESS, BADDRESS2, BCITY, BSTATE, BZIP, BCOUNTRY, SNAME, SADDRESS, SADDRESS2, SCITY, SCOUNTY, SSTATE, SZIP, SCOUNTRY, EMAIL, INVOICE, DESCRIPTION, TAX, CUSTREF, DISCRETIONARY DATA
Sample Process Check Sale Request
‘format the request string to process a sale for $1.00 strRequest = “UN~demo123|PSWD~demo123|TERMS~Y|METHOD~ProcessCheck|” strRequest = strRequest & “CHECKTYPE~Sale|DDA~123456|TR~325070760|” strRequest = strRequest & “AMOUNT~1.00| BADDRESS~1234|BZIP~83852|INVOICE~8888|” strResponse = SendPayTraceAPIRequest(strRequest) ‘defined in Referencing the API Page
Returned Name Value Pairs
Responses elicited from a ProcessCheck request and a CheckType of sale will always return either one or more error messages or a set of responses. Successful responses will always include: RESPONSE, CHECKIDENTIFIER
Please note that following values will be returned when a check is processed through a real-time check processor: RESPONSE, CHECKIDENTIFIER, ACHCODE, ACHMSG
Example of Parsing a Sale Check 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 strCheckID 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)) = " CHECKIDENTIFIER" Then strCheckID = arrPair(1) End If next Else StrError = StrError & “The response from the PayTrace API was invalid." End if If StrError <> “” then MsgBox “Check transaction was not successful per the following error: ” & StrError Else MsgBox “Check transaction was successful: ” & strResponseMessage End if