Connecting Gravity Forms to Stripe – Article
Contact us at support@worshiptimes.org or submit a support ticket so that we can activate the Stripe add-on for you.
Once activated:
-
Connect the website to Stripe (this only needs done once):
- From your website dashboard, hover over Forms and click on Settings
- Click on Stripe
- Switch the Mode to live and click on the button Connect with Stripe – follow the onscreen instructions
- Follow the instructions here to enable Webhooks on Stripe and adding the necessary information into the Stripe settings area on the website – https://docs.gravityforms.com/downloading-installing-the-stripe-add-on/#h-webhooks
- You can leave the payment collection field set to Stripe Elements
- Save Settings
- (It is also helpful to set up a test key as well for future troubleshooting, but to do so you, must follow these instructions exactly – https://docs.gravityforms.com/connecting-to-stripe-in-live-or-test-mode/#h-connect-to-a-test-account – then switch back to Live once you are done).
-
Create a form and add it to a page (this will need done for any new form you create that collects payment):
- On your website, go to Forms
- Click on Add New
- Give it a title, something like Donate
- Add the fields for the information you’d like to connect:
- Minimally you should collect Name, Email, and Address
- Go to Pricing fields and add a Product field
- Edit the field label
- Edit the Field Type as needed:
- Single Product is good for registration
- Radio Buttons are good if there are multiple options
- User Defined Price is excellent for donations
- Make the field required
- In Pricing fields, also add a Stripe field
- Enable additional payment methods
- Save Form
- Hover over Settings and click on Form Settings
- Make any adjustments specific to your form and your website
- Under Form Options (near the bottom of the page), Enable Anti-Spam Honeypot
- Save Settings
- Click on Confirmations
- Hover over Default Confirmation and click on Edit
- Change the verbiage as needed
- Save Confirmation
- Click on Stripe
- Add New
- Select Products & Services as the Transaction Type
- Map the fields
- Save
- Go to Pages
- Add New
- Give it a title, like Donate
- Click on Add Form
- Select the form from the dropdown list
- Insert Form
- Publish/Update the page
- For Divi users, you can enable the Divi builder at this point
- Test, test, test!
- Fill out the form with an active credit card to make sure it’s working correctly. Upon submitting, you should immediately see the confirmation message for the form. On the back-end of the website, you should see an entry, and you should receive an admin notification if you have one set up. In Stripe, you should see a successful transaction.
- If you do NOT see a confirmation message upon submitting, and instead see a blank form (even if you’ve received a Stripe transaction), please reach out to us at support@worshiptimes.org with the URL of the page where the form resides so that we can exclude the page from cache.
Troubleshooting:
- Check to make sure your API on Stripe is up-to-date:
- Go into your dashboard at Stripe under the Workbench for the Overview – https://dashboard.stripe.com/workbench/overview
- You’ll see a section for API Versions and the option for ‘Upgrade’ – click on Upgrade
- Review the pop-up that will give you details about what you currently have installed and what is available to upgrade to
- Click Upgrade and it will take care of upgrading your Default Webhook API for Stripe
- Create new webhooks using the new API and add new signing secrets to the website
- Create new webhooks:
- Log in to your Stripe account Workbench – https://dashboard.stripe.com/workbench/overview – and create a webhook endpoint.
- Under “Select events”, select the latest API version.
- Select the checkbox for “Select all events” and click “Continue.”
- Enter the URL in the “Endpoint URL” field: https://[yourdomain]/?callback=gravityformsstripe
- Click the “Create destination” button to save the webhook.
- Under “Destination Details,” click “Reveal” by “Signing Secret”.
- Copy the signing secret and paste it into the “Live Signing Secret” Gravity Forms settings field.
- Turn off reCAPTCHA just on the form collecting payment – this can be found in the individual form’s settings, under reCAPTCHA
