---
title: fluentform/before_insert_payment_form
description: "## Description If the form has payment then this action will be fired before submission. You can use this to do your payment related custom tasks. ```php /* * Source Action */ do_action('fluentform/before_insert_payment_form', $insertData, $data, $form); ``` ## Usage ```php…"
url: "https://fluentforms.com/docs/fluentform_before_insert_payment_form/"
updated: "2023-07-25"
category: Action Hooks
---

# fluentform/before_insert_payment_form

## Description

If the form has payment then this action will be fired before submission. You can use this to do your payment related custom tasks.

```php
/*
* Source Action
*/
do_action('fluentform/before_insert_payment_form', $insertData, $data, $form);
```

## Usage

```php
add_action('fluentform/before_insert_payment_form', 'custom_funtion', 10, 3);

function custom_function($insertData, $data, $form)
{
   // Do your stuff here
}
```

## Parameters

- **$insertData **(array) Form response data
- **$data** (array) Input data
- **$form** (Object) [The $form Object](https://fluentforms.com/docs/form-object/)

## Source Code

This action is located in fluentform/app/Services/Form/SubmissionHandlerService.php
