This filter can be used to modify the validation message added to the credit card field when returns an error during card authorization.


The filter which would run for all feeds can be used like so:

add_filter( 'gform_authorizenet_validation_message', 'your_function_name', 10, 5 );


  • $message string

    The default error message.

  • $validation_result array

    An associative array containing the form validation result, the form object, and the number of the page where the validation error occurred.

  • $post array

    The global $_POST containing the input values posted by the browser.

  • $response object

    The response from

  • $responsetype string

    The type of response. Possible values: arb or aim.


1. Use the Response Reason Text

add_filter( 'gform_authorizenet_validation_message', function( $message, $validation_result, $post, $response, $responsetype ) {
    $message = $response->response_reason_text;

    return $message;
}, 10, 5 );


Your code snippet should be placed in the functions.php file of your active theme.

Source Code

This filter is located in GFAuthorizeNet::authorize() and GFAuthorizeNet::subscribe() in class-gf-authorizenet.php