Skip to content

Testing the Gravity Forms Stripe Add-On Before Going Live

How to test Gravity Forms Stripe payments without charging a real card, from Test and Sandbox mode to test card numbers.

Chris Eggleston 3 min read

Before a payment form goes live, you want to know it actually works. The good news: you never need to charge your own credit card to find out. In this tutorial I’ll show you how to test the Gravity Forms Stripe Add-On safely, using Stripe’s test environment and test cards.

A lot of people try to test in live mode with a tiny amount, like 10 cents, and get an error. That’s because Stripe has a minimum charge of $0.50 USD (or the equivalent in your currency) to cover processing fees. Testing properly avoids that problem completely.

What You’ll Need

  • Gravity Forms with the Stripe Add-On (included with the Pro and Elite licenses)
  • A Stripe account (test mode is built into every Stripe account)
  • A form with a Product field (or a Total field) and a Stripe feed

Step 1: Switch the Stripe Add-On to Test Mode

Go to Forms → Settings → Stripe. Under Stripe Account, the Mode setting has three options:

  • Live: real payments with real cards.
  • Test: uses your Stripe account’s test mode. No real money moves.
  • Sandbox: an isolated test environment separate from your main Stripe account. It’s handy when a team is testing and you don’t want to mix that data with your account’s regular test data.
Gravity Forms Stripe settings showing the Live, Test and Sandbox mode options
Forms → Settings → Stripe, connected in Test mode.

Choose Test (or Sandbox), then click Connect with Stripe and follow the prompts. When you’re back, you’ll see a green “Connected to Stripe” label.

Next, scroll down to the Webhooks section and add the test signing secret. Webhooks are how Stripe tells Gravity Forms about payment updates, so the entry’s payment status stays accurate. Test and live mode each have their own webhook and signing secret, so you’ll set this up again when you go live.

Step 2: Use the Right Test Cards

In test mode, Stripe won’t accept real card numbers. Use Stripe’s test cards instead, with any future expiry date, any 3-digit CVC and any postal code:

Card numberWhat it tests
4242 4242 4242 4242A successful Visa payment
4000 0025 0000 3155A card that asks for 3D Secure authentication
4000 0000 0000 9995A decline for insufficient funds
4000 0000 0000 0002A generic card decline

Run at least one successful payment and one declined payment, so you know your form handles both. Stripe’s testing documentation lists many more cards if you need a specific scenario.

Step 3: Run Two Kinds of Tests

I recommend testing twice:

  1. From the form preview. Click Preview in the form editor and submit a test payment. This confirms the form, the pricing fields and the Stripe feed are set up correctly.
  2. From the page your visitors will use. Embed the form on its real page and submit from there, ideally in a private browser window. This catches problems the preview can’t, like theme or caching conflicts and JavaScript errors from other plugins.

Step 4: Check the Results

After each test, confirm three things:

  • The entry: open it under Forms → Entries. The payment status should be Paid (or Failed for the decline tests), and the transaction ID should be filled in.
  • Stripe: in your Stripe dashboard (with test mode on), the payment should appear under Payments.
  • Notifications: if you send receipts or admin emails, make sure they arrived and show the right amounts.

If you’re testing subscriptions, check that the subscription appears under Customers in Stripe with the right price and billing interval.

Step 5: Go Live

Once everything checks out, go back to Forms → Settings → Stripe, switch the Mode to Live and connect your live account. Then set up the live webhook signing secret. If you’re cautious, run one small real payment above the $0.50 minimum and refund it from the entry.

Troubleshooting

  • “Amount must be at least $0.50”: your total is below Stripe’s minimum. Raise the test amount.
  • “PaymentIntent status: is invalid”: usually also a minimum-amount problem. See this article.
  • Entry stays “Processing”: the webhook isn’t reaching your site. Check the signing secret for the mode you’re in.
  • Real card declined in test mode: that’s expected. Test mode only accepts test cards.

Need More Help?

If you still need help, use the chat or leave a comment below and we’ll get back to you.

Comments

Ask a question or leave a comment

Your email is never shown. For help with a specific form, share what you expected and what happened instead.