Integrate Stripe Coupon Code with Formidable

By: Jack Evangelides | Asked: 10/13/2023
ForumsCategory: General questionsIntegrate Stripe Coupon Code with Formidable
Jack EvangelidesJack Evangelides asked 10 months ago

Hi All,   I have created a custom coupon code on my Stripe account, with a fixed % discount and a coupon name. Is it possible to integrate this into my formidable forms. So if a user enters the coupon code in my Formidable payment form it will apply the discount I setup. Assuming I will need to create an API call or something for this?   Kind Regards    Jack

Victor Font replied 10 months ago

I think you need to explain your process more fully. You are creating a Stripe coupon. And you want Formidable Forms to somehow capture the coupon code and do what with it?

Capturing data is what Formidable does well, but you have to explain how Formidable fits in your process? What is your process and ultimate business goal for achieving this process? You mention "API call", what makes you think an API call is necessary?

Not having all the answers to effectively encourage one software design another, requires a complete picture of the process flow. Here are a few diagnostic questions I have:

1. At what point in your process do your users learn about the Stripe coupon code?
2. By what means are users notified?
3. How do users know to use your Formidable Form to purchase your product or service?
4. How does your marketing base reach your website?

Depending on your marketing strategy, you can handle the entire transaction workflow through query string parameters. API calls are a bit drastic in my opinion as an initial solution. I'm not saying it's the wrong thing, but if it's not necessary to add the overhead of yet another round trip to a server, you need to explore the easiest way first.

You didn't mention if you're using the Formidable Pro Stripe add-on or the Formidable Free version. It really shouldn't matter because the process is the same, if your using Formidable connected to Stripe. If you're sending emails or providing links to your target audience, include the Stripe coupon code as a query string parameter appended to what ever CTA (call to action) they click on.

Assuming the click through destination is a Formidable Form, use the [get param] as the default value in a hidden field. You've now captured the Stripe coupon code in Formidable and you can apply it to the transaction.

Here's the link to the Formidable KnowledgeBase for [get param]: https://formidableforms.com/knowledgebase/using-dynamic-default-values-in-fields/#kb-get-a-parameter-from-the-url

Jack EvangelidesJack Evangelides replied 10 months ago

Hi,
Thank you for your reply.

I am using Formidable Pro Stripe Add-On.

My process is that I have created a registration form that allows users to register with a 1 or 2 year membership.
I am using the product field to handle the different memberships and the total field to display the total price.

I have integrated with Stripe and I want to create a solution where I can use the coupon code that is setup on Stripe (not formidable).

When a user clicks on the "discounted" membership package, as you mentioned, they will go to the registration form.
I understand I can pass values with [get param] I have this setup to pre-select the membership package (ie. if a user selects the button "1 year membership" or "2 year membership".

But, if my coupon code has been created on the Stripe interface, how will the integrate with the formidable forms registration process. That is my main question.

Let's say I have a coupon called "save20" which gives 20% off. This coupon has been created on my Stripe account.
I would like to apply this to my registration form on which every product the user selects (either 1 year membership or 2 year membership)

I hope the additional information helps.

Michael ClarkMichael Clark replied 9 months ago

I'd agree with Vctor and also say that from personal experience, I start with a Formidable Form process when integrating with *any* third party system. In this case' I'd probably make a flow FF where I'd create coupon codes for Stripe and create the custom API calls to handle the Stripe handshake, handoff, and responses, if i needed the codes to be Stripe native. If not, I'd just build a simple coupon code generator in FF and make whatever lookups/dynamic fields, etc., and use conditionals and calcs in the form as needed.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right