Dynamic monthly payment form. Price based on paid in full date

I need to create a subscription form using Stripe as the paygate. The monthly cost of this subscription/payment needs to be modified based on 1) the date the subscription is being created and 2) the deadline for paid in full. Here is the scenario. I need to create a form for customers to start their payments for paying for a cruise. The deadline to be paid in full is (fictional) 05/01/2026. The cruise full cost is (fictional) $1000. So, if a customer were to start their payments on 10/15/2024 with $100 down, that would leave $900 and 20 months of payments or $45 a month. However, if a customer were to start their payments on 02/13/2025 with $100 down, that would leave $900 and 15 months, or $60 a month.
Is there a way I can automagically make this happen? Or do I have to manually go in on the 1st of every month and change the options?
Thanks!

Hi Derek,

You can build this using GP Date Time Calculator and our Rounding by Increments snippet.

The basic setup would would work like this:

  1. Populate the current date into a Date field using the {date_mdy} merge tag.
  2. Set the paid in full due date in another Date field via “Default Value”.
  3. Calculate the number of payments in a Number field by subtracting the due date from the current date.
  4. Use the Rounding by Increments snippet to round up the number of months if there’s any remainder in the calculation.
  5. Use a calculation in a Product field to calculate the payment based on the number of months returned.

Here’s how that looks on the frontend:

CleanShot 2024-09-12 at 14.35.52

For collecting the payments with Stripe, you would set up a subscription and map the fields accordingly.

Do note that the GF Stripe Add-on doesn’t let you set a specific number of recurring payments in a subscription. You could use this snippet as a starting point to set the cancellation date.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.