updated Nov 18, 2024

To increase sales, create an event registration forms that offer the option of installment payments rather than just a 1 time payment.

A client of mine wanted to streamline his retreat registration system. These retreat events can be over $1,000, and letting people pay in thirds plus a small fee increases the number of people who are able to attend. Installment payments is the way to go. BNPL (buy now, pay later) has become more and more common with payment processors like Afterpay integrating into many processors like Square. These SASS options cost a lot more, like 6% of a total sale, and so for a small business running with thin margins, I wanted to find a more “native” way to deal with this.

We use the Stripe payments extension for Gravity Forms. It allows for the setting up of a recurring payment (as a subscription), rather than just a one off. As you can see here, you can have multiple Stripe feeds for a single (with payment) form.

Currently, the Stripe API doesn’t allow you to set the total number of recurrences of a payment when creating the subscription, as they presume a “subscription” is valid until it is manually cancelled. It IS possible however to cancel the subscription via the gform_post_add_subscription_payment hook which runs after a payment is recorded. Gravity Forms provides a code snippet to get you started.*

However, the subscription feed is going to set up the recurring amount as whatever the total appears at the bottom of the registration/payment form. So we need a way to reduce the order total by a third (since the payment plan is for 3x).

In order to accomplish this, there are a couple of extra premium plug-ins that can help. GP Conditional Pricing from Gravitywiz gives us the option to adjust the cost of our products in the cart, based on certain conditions. Specifically, we want to adjust the prices based on whether a user checks the “yes, pay over 3 payments” field. Because my client wants to charge an additional fee for this service, this conditional field that is checked is technically a product.

Here’s the specific form field we’re basing our condition on

You also need to set up a different Stripe feed for the installment payment option (subscription), which only activates when the installment payment option is selected. To avoid double charges, you need to set up the original “products and services” feed to also only process conditionally. Otherwise, you will double bill the customer on their first charge.


So for customers who choose to pay all at once, their display looks like:

but if they click yes, then the price of the product option is reduced, $49/3 is added to the total and a conditional note is displayed that the total is the recurring total.

Stripe has the option to charge an upfront setup fee, which you can configure on the Strip feed settings page, but I thought it was better to build this into the recurring payment amount.

Glitches

After some plugin/theme updates I noticed the price wasn’t changing as it should when a user selected the “pay in 3 installments” checkbox as it used to. As it turned out, I needed to disable the option for “Remove Query Strings from Static Resources” from the Speed Optimizer (by SiteGround) plugin .

Fix Stripe subscription renewal failures by whitelisting

The subscriptions were getting set up correctly within Stripe. But then upon renewal, the draft invoice was created but wasn’t automatically charged as it should. This drove me crazy, since there were not any errors in the logs available in the Stripe dashboard about Webhooks not going through correctly.

I contacted Gravity Forms tech support, but they were unable to help me. All they said was:

“Gravity Forms doesn’t have any involvement after sending the request to start the subscription. Stripe does send webhooks to your site but they are only used to update the entry with the subscription status (active, cancelled etc). and to add notes when they report capturing the payments.”

Basic WP debugging 101 says to eliminate all variables, so I disabled all the other plug-ins, deactivated Cloudflare and went to dinner. After some time the test subscriptions for which the draft invoices previously failed finally did auto charge. My best guess was that the iThemes Security plug-in was blocking some webhook events.

So I found the full list of Stripe IP addresses that webhook notifications may come from, and added those to the iThemes Authorized Hosts list under Security>Configure>Global Setitngs>Authorized Hosts

After re-enabling the iThemes Security plugin and whitelisting the Stripe webhook IP addresses, I’m happy to say it worked.

Alternative payment gateways with built-in buy-now/pay-later systems

There are also different payment gateways you can sign up for that offer this type of installment payments built into their system. Most times they just take a higher % of the total sale, so while it may be technically easier, it may not be as profitable depending on how many products you’re selling. I haven’t personally used any of these.

If you are able to modify the Form Total so that represents the proper fraction of the cart total, the Gravity Form PayPal Checkout plugin gives you the option to set the transaction as a subscription in which you can designate at that time how many times you want it to charge, in contrast to Stripe’s subscription set up in which it’s possible to designate the end date of the subscription, but you have to use custom functions and code to accomplish that.

If you choose one of those, you’re going to want to pay close attention to How Stripe chooses which Payment Methods to show.


Notes:

*there’s also a plugin that accomplishes the same as the code snippet, but I didn’t find it to work at this point, since it’s 5 years since it was last updated. https://wordpress.org/plugins/installments-for-stripe-gf/

Leave a Reply

Your email address will not be published. Required fields are marked *

Post comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.