Count Payments

By: Michael Clark | Asked: 08/15/2022
ForumsCategory: How-toCount Payments
Michael ClarkMichael Clark asked 2 years ago
How can I count payments? I'd like to make a view with the info from the payments section of the Formidable backend.
Bobby Clapp replied 2 years ago

Not sure what you mean. Formidable stats count can count the number of entries by any field and then filter that out further based on another field. If you have something setup that changes the value of a "status" field from something like "not paid" to "paid", you can count that like this:

[frm-stats id=25 type=count 25="paid"]

Michael ClarkMichael Clark replied 2 years ago

Thanks, Bobby. I Sorry I wasn't more clear. I'm trying to count both the number of times a field is mark paid, and also count the number of payments a Stripe subscription has been paid.

1 Answers
Best Answer
Chris AdamsChris Adams answered 2 years ago
Hi Michael,   Depends what type of payments you want to count but we set-up a 'Payment Counter' field for a client who was using Stripe Recurring payments as they wanted to see how many months a user had been a member for.   We added a hidden field to the form and then in the Stripe form action > Payment Status > Completed we selected our Payment Counter and added this:  
[frm-math] [322] + 1 [/frm-math]
  Change 322 to the payment statuus field and it will increment by 1 for each successful payment.   Hope that helps.
Michael ClarkMichael Clark replied 2 years ago

Thanks, Chris. I do indeed need to count the number of Stripe recurring payments per subscription, as well as the total number of total payments made, in general: "There have been a hundred single payments, a thousand recurring payments, and this entry has logged 10 recurring payments.."

Your solution will indeed get me pointed in the right direction.

Michael ClarkMichael Clark replied 2 years ago

Chris: I have a Payment Status field, radio button, values: Unpaid, Paid. Do you mean, if that field is field [10] then the math would be [frm-math] [10] + 1 [/frm-math]?

Chris AdamsChris Adams replied 2 years ago

Hi Michael,

Yeah so we created an extra 'Payment Counter' field (field ID 10 in this example) which is just a regular hidden (text) field and then in the Stripe form action in the 'After Payment' section we selected:

- 'Complete' in the payment status column,
- Our Payment Counter Field in the field column
- And then in the value column we entered: [frm-math] [10] + 1 [/frm-math] (where

That should be about it.

Michael ClarkMichael Clark replied 2 years ago

Hi Chris,

I've tried your suggestion and there's no count happening. Created a new form, put the Stripe integration in test mode, ran a few test transaction, all green except for the math. Nothing stirring. Nothing in the logs, either. Bummer.

Chris AdamsChris Adams replied 2 years ago

Hi Michael,

That's weird, it works ok for the site we set it up on.

I've taken a couple of screenshots (links below) of how we have it set-up:

https://fdmdigital.co.uk/wp-content/fdm-digital/images/Screenshot_2022-08-20_1.png

https://fdmdigital.co.uk/wp-content/fdm-digital/images/Screenshot_2022-08-20_2.png

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right