Skip to main content
SubscriptionFlow Docs
Others

Set up SubscriptionFlow for Gravity Forms

Updated

SubscriptionFlow for Gravity Forms creates a customer and a subscription in SubscriptionFlow when a Gravity Forms form is submitted. This guide walks through every setting: installing the add-on, connecting your SubscriptionFlow account, and setting up a form feed, with a screenshot for each option.

Before you start

  • WordPress with Gravity Forms 2.5 or later and PHP 7.2 or later. With Gravity Forms Stripe 7, Gravity Forms must be 3.0 or later (otherwise the Stripe card field doesn't load).
  • A SubscriptionFlow account. No account yet? See plans and pricing or book a demo.
  • Your SubscriptionFlow Instance URL, Client ID and Client Secret (an OAuth client created in SubscriptionFlow)
  • Products, plans and plan prices set up in SubscriptionFlow
  • A Gravity Forms form with at least an Email field

1. Install the plugin

Upload subscriptionflow-for-gravity-forms.zip under Plugins › Add Plugin › Upload Plugin and activate it. No SubscriptionFlow account yet? Use the SubscriptionFlow pricing and Book a demo links on the plugin's row.

The activated plugin in the Plugins list

2. Connect SubscriptionFlow

Go to Forms › Settings › SubscriptionFlow. Until you connect, the page shows Not connected.

Not connected

Connection fields

Setting What to enter
Instance URL Your SubscriptionFlow address, for example https://yourcompany.subscriptionflow.com/
Client ID The Client ID of an OAuth client created in SubscriptionFlow
Client Secret The Client Secret of the same OAuth client. It is shown as dots after saving.

Click Save Settings. The box at the top changes to Connected — https://yourcompany.subscriptionflow.com/. If it shows Connection failed, the message after it gives SubscriptionFlow's reason. Check the URL and both credentials and save again.

Connected to SubscriptionFlow

Using the WooCommerce plugin too? If SubscriptionFlow Recurring Payments for WooCommerce is already connected on the same site, a Connection option appears above these fields:

  • Use the connection from SubscriptionFlow Recurring Payments for WooCommerce (default): Gravity Forms uses the same account, so you don't need to enter credentials.
  • Enter separate credentials for Gravity Forms: shows the Instance URL, Client ID and Client Secret fields so Gravity Forms can use a different account or OAuth client.

Advanced: Data Source

Data Source is the value sent as data_source on every customer, subscription and payment this add-on creates. The default is GF. Change it only if you want to tell this site's records apart in SubscriptionFlow, for example GF-Shop.

Advanced › Data Source

Saving these settings also refreshes the cached list of products and plans.

3. Create a feed

A feed tells the add-on what to send to SubscriptionFlow for one form. Open the form, go to Settings › SubscriptionFlow and click Add New. Saved feeds are listed here with their plan setup. Use the toggle to turn a feed on or off.

Form › Settings › SubscriptionFlow feed list

Feed Settings

Name (required) is for your reference only, for example Magazine subscriptions.

Feed name

4. Customer

Customer Fields

Choose the form field that holds each customer detail:

Setting Required Notes
Email Yes Email, Hidden or Single Line Text field. The add-on uses it to find an existing customer.
Name No A Name field (full name) or any text field
Phone No Phone or text field
Company (Legal Entity) No Sent as the customer's legal entity

Customer fields

Custom Customer Fields

To fill a custom field on the SubscriptionFlow customer, type the field's Key as it is in SubscriptionFlow (for example referral_source), then choose the form field under Value. Click + to add another row.

Custom customer fields

Options

  • Update the customer in SubscriptionFlow when one already exists with this email (on by default): a returning customer's details are updated instead of creating a duplicate customer. Turn it off to leave existing customers unchanged. The new subscription is still added to them.
  • Enable customer portal access for new customers (on by default): new customers can sign in to the SubscriptionFlow customer portal.

5. Billing and shipping address

Billing Address

Choose the form field for each line: Street Address, Address Line 2, City, State / Province, ZIP / Postal Code and Country. The parts of a Gravity Forms Address field are listed as Address (City) and so on, and are filled in for you when the form has one. All lines are optional.

Billing address

Shipping Address

Same as the billing address (default) copies the billing address to the shipping address.

Shipping address: same as billing

A different address shows Shipping Address Fields. Map each line the same way, for example to a second Address field on the form.

Shipping address: a different address

6. Choose the plan

Subscription Type

Create subscriptions with:

  • One product and plan for every entry: every submission gets the same plan. Use this for a form that sells one thing.
  • Plans mapped to form choices (radio buttons, drop downs or checkboxes): the visitor's choice decides the plan, for example 1 year or 2 years.

Subscription Type

Option A: One product and plan for every entry

Setting What it does
Product A product from your SubscriptionFlow account. Inactive products are marked (inactive).
Plan The plans and prices of that product, grouped by plan, for example Fig Lancaster 2 Year - USD 24.00 every 2 years. The list loads after you choose a product.
Term Length / Term Period Fill in from the plan. Change them if you need a different term. The period can be Day(s), Week(s), Month(s) or Year(s).

Choose a plan price marked every month / every year, not (one-time), so SubscriptionFlow bills the renewals.

One product and plan for every entry

Enter IDs manually (merge tags): the last choice in the Product list. It shows Product ID, Plan ID and Plan Price ID fields that take SubscriptionFlow IDs or Gravity Forms merge tags, for example {Product ID:20} for a hidden field named Product ID that holds the ID. Use it when the IDs come from the form itself.

Enter IDs manually

Option B: Plans mapped to form choices

Each plan reads like a sentence: When [form field] is [option], create [product] [plan] for [term length] [term period].

  1. Click + Add plan.
  2. Form field: a radio button, drop down or checkbox field on the form.
  3. Option: the choice that should create this plan.
  4. Product and Plan: the SubscriptionFlow product and plan price. The term fills in from the plan.
  5. Repeat for each option. Click Remove to delete a plan.

With checkboxes, each ticked option that has a plan creates its own subscription for the same customer. Each option can use any product and plan.

Plans mapped to form choices

7. Price

Price sets the unit price on the subscription:

  • Form total (default): the form's total divided by the quantity. Right for most forms with pricing fields.
  • SubscriptionFlow plan price: the price set on the plan in SubscriptionFlow.
  • Form field: shows Price Field; choose the field that holds the price.
  • Fixed amount: shows Fixed Unit Price; enter the price, for example 16.00.

When one entry creates several subscriptions (checkboxes), each subscription uses its own SubscriptionFlow plan price.

Price: Form total

Price: Form field

Price: Fixed amount

The other two settings are optional:

  • Quantity Field: a field that holds the quantity. Defaults to 1.
  • Start Date Field: a Date field for the subscription start date. Defaults to the date of the entry.

8. Payment

Who collects the first payment?

SubscriptionFlow (the form takes no payment)

This is the default. The customer and subscription are created as soon as the form is submitted, and SubscriptionFlow bills the subscription. Subscription Payment Status appears:

  • Pending: SubscriptionFlow collects the payment: SubscriptionFlow charges the first invoice.
  • Paid: the payment was taken outside SubscriptionFlow: use this when you collect the first payment another way, such as an invoice or cash.

First payment collected by SubscriptionFlow

Stripe, PayPal or another payment add-on in this form

Choose this when the form takes the first payment with a Gravity Forms payment add-on:

  • With the default Send to SubscriptionFlow setting (see below), the customer and subscription are created only after the payment add-on confirms the payment. Until then the entry has the note Waiting for the payment to complete before creating the subscription in SubscriptionFlow.
  • The payment is recorded against the subscription's first invoice and the invoice is marked Paid. SubscriptionFlow doesn't charge it again; it bills the renewals.
  • Entries that are never paid aren't sent to SubscriptionFlow, unless you choose otherwise under Send to SubscriptionFlow.
  • The payment is sent with the payment add-on's transaction ID (for Stripe, the pi_... payment ID), the amount and the payment date, with the payment type ExternalPayment and a description such as First payment paid with Stripe (pi_...) - Gravity Forms Entry #2828.

Stripe: Save the card for future recurring payments is ticked by default. When Stripe takes the first payment, it saves the card on the Stripe customer, so SubscriptionFlow can charge the renewals with it. Untick it if you don't want Stripe to save the card: Stripe then only takes the first payment. For saving the card to work:

  • SubscriptionFlow must be connected to the same Stripe account as Gravity Forms.
  • The Stripe feed's Transaction Type is Products and Services (the Card field, the Payment Element and Stripe Checkout are all supported).
  • Map Email and Name under Customer Information in the Stripe feed. The add-on makes sure Stripe always creates a customer.

Payment settings when a payment add-on takes the first payment

Send to SubscriptionFlow (version 1.1.6 and later) decides when the entry is sent:

Option When the entry is sent
Only when the payment succeeds (default) Once the payment add-on confirms the payment, usually within seconds. Always sent as Paid, with the payment recorded, so the first invoice is Paid. An entry whose payment fails is never sent.
Also when the payment doesn't go through Paid entries as above, as Paid. An entry whose payment failed or was never completed is also sent, an hour after it was submitted, as Pending with no payment recorded, so SubscriptionFlow collects it. The hour means a customer who retries the payment doesn't get two subscriptions. It isn't sent if the customer paid with a new attempt, or if the entry is in the trash or marked as spam.
Instantly when the form is submitted Straight away, without waiting for the payment.

Subscription Payment Status appears only for Instantly when the form is submitted and decides how the subscription is sent:

Option What SubscriptionFlow gets
Paid (default) Payment Status Paid and the first payment recorded, so the first invoice is Paid, also when the payment hasn't been confirmed yet or didn't go through. If the payment fails after the entry was sent, the entry gets a warning note so you can check the invoice in SubscriptionFlow.
Pending Payment Status Pending and no payment recorded, so the first invoice stays due and SubscriptionFlow collects it, even when the payment add-on was paid. The entry then gets a note to record the payment in SubscriptionFlow.

Stripe webhooks. Gravity Forms Stripe 7 marks an entry Paid only when Stripe's webhook reaches your site. Set it up under Forms › Settings › Stripe › Webhooks. If it isn't set up, the feed's Payment section shows a warning. The add-on doesn't depend on it: right after the card is confirmed, while the customer waits for the confirmation message, it asks Stripe whether the payment succeeded, marks the entry paid and sends it to SubscriptionFlow, usually within seconds. While an entry is still Processing, it asks Stripe again after 2, 5, 15, 60 and 360 minutes. Payments Stripe hasn't confirmed are never sent. You can also send it straight away with Send to SubscriptionFlow (see 11. Save and test).

9. Subscription Details

  • Auto renew (on by default): the subscription renews at the end of each term. Turn it off for a fixed-term subscription.
  • Subscription Name: the name shown in SubscriptionFlow. The default is Gravity Forms Subscription - Entry #{entry_id}. Use the {..} button to insert merge tags such as a field value.
  • Custom Subscription Fields: type the SubscriptionFlow subscription field Key (for example po_number) and choose the form field that holds its value.

Subscription details

10. Conditional Logic (optional)

Tick Enable Condition to send only some entries to SubscriptionFlow, for example only when a consent checkbox is ticked. Set the rules after Send to SubscriptionFlow if.

You don't need a condition to choose the plan; use Subscription Type and Plan Mapping instead.

Conditional logic

11. Save and test

  1. Click Save Settings. The feed appears in the list, for example 2 plans mapped to form choices under Plan.

  2. Submit the form as a visitor would.

  3. Open the entry under Forms › Entries. Within a minute a note shows SubscriptionFlow subscription … created for customer …. The entry also stores the SubscriptionFlow Customer ID and SubscriptionFlow Subscription ID, which you can add as columns in the entries list.

    Entry note

  4. Check the customer and subscription in SubscriptionFlow.

Each entry is sent only once per feed and plan, so resending an entry doesn't create a duplicate subscription.

The entry page also has a SubscriptionFlow box with the customer and subscription IDs and a Send to SubscriptionFlow button. Use it to send an entry again, for example after fixing the feed, or when the payment is still Processing: the add-on first asks Stripe whether the payment succeeded. It only creates what is still missing.

SubscriptionFlow box on the entry page with the Send to SubscriptionFlow button

Settings at a glance

Section Setting Default
Add-on settings Connection (only when the WooCommerce plugin is connected) Use the WooCommerce connection
Instance URL, Client ID, Client Secret Empty
Data Source GF
Feed Settings Name SubscriptionFlow Feed 1
Customer Email (required), Name, Phone, Company Not mapped
Custom Customer Fields None
Update the existing customer On
Enable customer portal access On
Billing Address Street, Line 2, City, State, ZIP, Country Not mapped
Shipping Address Same as billing / A different address Same as billing
Subscription Type One product and plan / Plans mapped to form choices One product and plan
Product and Plan Product, Plan, Term Length, Term Period 1 Month(s) until a plan is chosen
Plan Mapping When field is option, create product plan for term No plans
Price Form total / Plan price / Form field / Fixed amount Form total
Quantity Field, Start Date Field 1, entry date
Payment Who collects the first payment? SubscriptionFlow
Subscription Payment Status Pending
Save the card for future recurring payments (Stripe) On
Send to SubscriptionFlow (payment add-on) Only when the payment succeeds
Subscription Payment Status (with "Instantly") Paid
Subscription Details Auto renew On
Subscription Name Gravity Forms Subscription - Entry #{entry_id}
Custom Subscription Fields None
Conditional Logic Enable Condition Off

Troubleshooting

  • Connection failed: check the Instance URL (including https://), Client ID and Client Secret, then save again.
  • A new product or plan is missing from the lists: products and plans are cached for an hour. Save the add-on settings under Forms › Settings › SubscriptionFlow to refresh them.
  • "This product has no plans in SubscriptionFlow yet": add a plan and plan price to the product in SubscriptionFlow, then refresh the lists as above.
  • The entry has an error note: it gives SubscriptionFlow's reason, for example No SubscriptionFlow plan is mapped for the choices in this entry (add a plan for that option under Plan Mapping) or a plan price that isn't linked to the plan.
  • The entry says "Waiting for the payment to complete": the feed is set to wait for a payment add-on. The subscription is created when the payment is confirmed. If the form takes no payment, set Who collects the first payment? to SubscriptionFlow.
  • Stripe took the payment, but the entry stays "Processing": Stripe's webhook hasn't reached your site. Check Forms › Settings › Stripe › Webhooks (the signing secret must match the endpoint in Stripe). The add-on checks the payment with Stripe right after the card is confirmed and again within a few minutes, or click Send to SubscriptionFlow on the entry.
  • The Stripe card field is empty or says "Configuration Required": connect Stripe under Forms › Settings › Stripe. With Gravity Forms Stripe 7, update Gravity Forms to 3.0 or later.
  • The subscription is Pending in SubscriptionFlow although the customer paid: with a payment add-on, check Send to SubscriptionFlow and Subscription Payment Status in the feed's Payment section. Choose Only when the payment succeeds, or, with Instantly when the form is submitted, set Subscription Payment Status to Paid.
  • The first invoice is Overdue: when Stripe or PayPal takes the first payment, choose Stripe, PayPal or another payment add-on in this form so the payment is recorded on the first invoice.
  • Full details: turn on logging for the add-on under Forms › Settings › Logging and check the SubscriptionFlow log.
Was this article helpful?0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.