Failed Transaction Response Validation
Last updated
Last updated
Your browser will receive a response from the Clearent Transaction Processing Portal containing an error message for a failed or unsuccessful transaction.
Error message: "We were unable to process your payment. Please verify your card details and try again or contact us to complete your order."
Note: An error message can also be configured with different text. For more information, see .
The Hosted Payment Page application looks for a callback function named ClearentOnError
for a failed or unsuccessful transaction. When you call the ClearentOnError
function, your browser will receive the raw and signed response from the server, as well as a JSON object representation of the raw response.
You can see the following sample code that contains the raw and JSON-formatted response, as well as an error message and transaction ID, using the browser’s Developer Console.
See the following ways to validate the response for a failed or unsuccessful transaction:
Using an error message: The response object with an error message that is intentionally vague to prevent scammers from using the service to test cards and security codes.
Using the Virtual Terminal: You can search for the transaction ID manually to validate the failed transaction details.
Note: The response does not include transaction information for transactions not attempted due to an invalid or expired public key or an unrecoverable server error.
Important: An error message is generic and shown to the cardholders for security purposes. In case you have questions about any error, log the exchange ID
from the received failed response and send it to Clearent.
Example: "ID-5ba9fd2f10ea-59988-1441133412260-0-1343"