I’m fairly new to Stripe, having used it on only one project before KiaMiller.com, but Kia was frustrated with PayPal, in part because she needed to accept payments from people in several different countries. I don’t think I’ve ever heard a bad thing about Stripe from anyone in the WordPress community, so it was the obvious choice for credit card processing. (I’ve had some clients who already had merchant accounts through Authorize.net, but there’s no reason to go to them rather than Stripe if you don’t need an offline payment system.)
Although there is a WooCommerce store on Kia’s site, right now it only has two products, and both of those are actually external products, available through Amazon rather than by direct purchase. I installed Stripe for WooCommerce but didn’t do anything to configure it except to fill in the Stripe API keys.
Why Gravity + (More) Stripe?
On her old site, Kia Miller collected information from applicants to her yoga teacher training by means of a Google Docs form. Once she had approved the application, she had to send a PayPal invoice. This was a tedious manual process and not everyone can or wants to create a PayPal account. (And if you have a PayPal account but want to just pay with a card, it’s by no means intuitive.) What we needed to do was collect card information at the time the application was submitted, but only charge the card if the application was approved. And of course we couldn’t store anyone’s card numbers on Kia’s site—that’s a lawsuit waiting to happen.
I already knew I wanted to use Gravity Forms for the teacher training applications. It’s my go-to forms plugin. I have used the free version of Ninja Forms on sites that only need simple contact forms, and I think it’s a good plugin, but I love Gravity Forms.
And I already knew that there was a Stripe integration for Gravity Forms, produced as part of the Gravity Forms developer package. What I didn’t know was how to get Stripe to store the card information but not charge the card.
It took several different phrasings of my search terms and some plain old slogging, but I discovered Gravity Forms + (More) Stripe from GravityPlusPro, a.k.a. Naomi C. Bush. Gravity Forms + (More) Stripe is the pro add-on for the free Gravity Forms + Stripe plugin. It provides a number of features that the free version doesn’t, and saving cards is one of them. After making sure that the plugin would do everything we needed, I bought a copy for Kia. (It’s $49, incidentally.) I read the documentation and set everything up on the dev site. Then I created my forms and added the credit card field, and set up the Stripe rules with “Save Card Only” selected under “Alternate Payment Options.”
We tested the form and it worked fine. A few weeks later we took the site live—and ran into problems.
It turns out there are a lot of settings you need to update when you move from the dev site to the live site and switch from test mode to live mode.
What You Need to Check
- Has your Stripe account been activated? The client usually needs to do this, because Stripe wants things like your Social Security Number in order to activate the account.
- Have you updated the webhooks in your Stripe account? I still had the webhooks from the dev site, which no longer existed. (If you aren’t changing URLs, you won’t need to worry about this one.)
- Have you switched from “test” to “live” in your global Stripe settings for Gravity Forms? This is under “Settings” in the Gravity Forms menu, right above the API keys.
- Have you switched the toggle on the Forms page from “test” to “live”? This is the one I overlooked. All the other Stripe settings were either in the individual form settings or in the main Gravity Forms settings. I don’t think I’d even looked that far to the right on the Forms page when checking the form settings.
Because I overlooked that, I kept getting error messages that said “Your card was declined. Your request was in test mode, but used a non test card. For a list of valid test cards, visit: https://stripe.com/docs/testing.” I checked absolutely everything else but this page, and kept getting this error.
Fortunately the plugin developer, Naomi, was able to help me out. She asked for a screenshot of that page, and when I went to make it, I saw the settings I’d overlooked. Once I fixed that, the form worked perfectly, submitting my card information to Stripe—but not charging the card.
Since I not only wanted to give Naomi credit for being amazingly helpful but thought that others might possibly run into this problem, I’ve written this post to provide a checklist for going live on a site that uses Gravity Forms + (More) Stripe.
Note that this information is in the documentation, but I’d forgotten I’d read it and even forgotten I had the documentation—these migraines I get pretty much erase everything in my brain.
If you need to use Stripe with Gravity Forms, I highly recommend the Gravity Forms + (More) Stripe plugin.