How to Build a Stripe Subscription Form
- Go to Add-Ons -> Stripe. You will see 4 api key fields here. To find your Stripe api keys, login to Stripe dashboard, go to Account Settings -> API Keys. Enter the keys.
Here, you will also find the option to choose between Live Mode and Test Mode. Test Mode allows you to use Stripe’s demo data to simulate transactions (read more).
- Now, let us make a form to place a magazine subscription online. First, let us add a simple Email field to our form.
Next, we add a Checkbox field which allows users to select the type of subscription they want.
In the Options box of our checkbox field, we enter our subscriptions in this format:
basic_plan==Basic Plan – $9.99 / month
Here, the part to the left of == is the plan ID assigned to the item, and the part to the right of == is what the user sees.
Also note the field ID of this field. In this case, it is field30
Where to find the Plan IDs?
Go to your Stripe Dashboard -> Plans:
- Lastly, we add the Stripe field. Go to Add Field -> Payments -> Stripe. Check the option Subscribe User To A Plan. Remember the field ID of the field where we entered all our plans? Type that in the Plan ID field. Also, type the field ID for our Email field in the Email column:
- That’s it. We are good to go: