Confirm Payment Amount Before Submit

We have a form where the user inputs the amount of the invoice they are submitting payment for with credit card. Payments are taken via Stripe.

I would like to set this up so that the user confirms their payment amount before submitting form. I’m thinking that this could either be a case where the user inputs the payment twice using two different fields.

Or this could be a required field where the that some how requires the user to confirm that they are about to pay X dollars.

Not sure how to go about this or what the cleanest approach is?

I know that there is a plugin and a way to create a second page that confirms the info that is about to be submitted. I saw this here, but I’m wanting to keep this to one page and just confirm the amount field.

Hi @jordydme - is the visitor entering the amount themselves into a user defined price field, and you want them to do that twice, just to be sure? Or are you calculating the price for them, and you want them to type that in, so that they acknowledge the amount is correct? Or something else?

They enter the amount based on an invoice they were sent. I already came up with a solution yesterday, but I’m curious as to what you recommend?

Hello. I came up with a couple ideas. One was to have a number field in the form, with the calculation enabled, and subtract one field from the other. Only Show the submit button when the calculated number field is 0. The other method is using the gform_field_validation filter:

What did you come up with?