This filter can be used to modify the authorization amount before it is sent to


The filter which would run for all ‘product and services’ type feeds can be used like so:

add_filter( 'gform_authorizenet_amount_pre_authorize', 'your_function_name', 10, 6 );


  • $auth_amount float

    The authorization amount. Defaults to value of $config[‘amount’].

  • $transaction object

    The transaction object.

  • $form_data Form Data

    An associative array containing the form title, billing address, payment amount, setup fee amount, line items created using the submitted pricing field values and any discounts from coupons.

  • $config Authorize Net Config

    The feed which is currently being processed.

  • $form Form Object

    The form which is currently being processed.

  • $entry Entry Object

    The entry which is currently being processed. Since version 2.1.8.


The following example shows how you can override the authorization amount.

add_filter( 'gform_authorizenet_amount_pre_authorize', 'change_amount', 10, 4 );
function change_amount( $auth_amount, $transaction, $form_data, $config, $form ) {
if ( $form['id'] == 10 ) {
$auth_amount = 1;

return $auth_amount;


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

Source Code

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