If you’re like me and frustrated by the additional invoice fees Stripe charges or having to pay for a SaaS just to send a few invoices a month, then this might be worth looking into.
A couple of months ago I was in this very situation. So I decided to eliminate this problem and save myself some money.
Looking into the software I already pay for and use on the regular, I decided to see what I could do with Gravity Forms.
I knew this wouldn’t be possible with just Gravity Forms, so I mapped out my ideal solution, and then realized that Gravity Wiz offered almost everything I needed to take Gravity Forms to the next level to build my own invoicing system.
Video Walkthrough
This is not a tutorial on how to build out the system, but a walkthrough of how I built it. But if you’re interested in a tutorial (more likely a course) of step-by-step details on how you can build this, please leave a comment below.
Software Stack
This is a list of all the tools used to build this system. Not all of these things are required, for example, you don’t have to use GenerateBlocks, that’s just my preferred builder.
Gravity Forms
This is a required plugin. Gravity Form is the foundation of the whole system. Used to generate the invoices, collect payment, create the emails, and create the databases for all data.
User Registration Add-On
This add-on is only necessary if you want to create user accounts, giving your clients the ability to log in and access their open and paid invoices.
Stripe Add-On
You do not have to use Stripe, but you will need a payment add-on, Stripe is just my primary payment gateway, so I almost always use it. Plus it gives you a lot of additional payment methods like Apple Pay, Google Pay, etc.
GP Populate Anything
This is absolutely required, this plugin handles most of the magic this invoicing system performs. It’s used to pull data from the client and product form entries into the invoice generation form.
GP Entry Blocks
Required. This add-on is used to display the entry details on the front end. You could also use GravityView for this, but I figured I was using so many Gravity Wiz add-ons already, I might as well just keep it all on the family.
GP Easy Passthrough
This add-on makes it possible to send a unique URL to the client so that when they return to pay their invoice, all the invoice details are automatically populated in the form.
GP Notification Scheduler
This add-on is only necessary if you want to schedule reminder emails for unpaid invoices or have an option to schedule the invoice to be sent on a later date when it is generated.
GP Read Only
You can use a code snippet to make your fields read only, but this plugin makes it so much easier. In my system, this is used on the payment form so that the client can not change any of the form data. The only field they can interact with is the payment field.
GP Unique ID
This is used for generating a unique invoice number and client ID. I did not use this add-on because I was thinking about the long-term use of my system and its potential of becoming a SaaS product. But if you’re building this for yourself, skip the custom code and use this add-on instead.
Gravity PDF
When an invoice is generated and paid, this plugin creates a PDF version and attaches it to the notifications. Great for those clients that want things on paper (yes they still exist) and for payment receipts.
Advanced Custom Fields
This is used to add additional fields to the user profile, which I use for the billing company to add their info (i.e. name, email, phone, etc). There is also a group of fields I use for the billing admin to set the parameters for the invoice number and client ID that is auto generated.
This data is also used throughout my system via custom merge tags. I pull the data into the notification settings, the email message, the PDF, and the client portal.
Gravity SMTP
This was a must because I wanted to ensure emails were being sent, and this plugin is absolutely stellar. I’m personally using Brevo for the SMTP service.
Brevo
SendGrid use to be my go to, but the first time trying Brevo was like meeting my soul mate. No joke this service is so easy to setup and integrate that I will never use anything else. Pluse I can easily track, deliver, opens, and clicks.
Side note, I’m considering building a plugin that will pull this date from Bervo and display it in my WordPress dashboard so that I don’t have to log into both systems.
Block Visibility
This is not necessarily required, but I use it to control the blocks shown on the page. I use this to dynamically show and hide the different blocks on a page. For example, when I click the button to add a new client, product, or invoice, a form is displayed on the page, this is a hidden block. I chose to do this instead of creating multiple pages.
Content Control
This is only needed if you want to control which pages are available to different user roles. For me, the admins see a different navigation menu than the client when logged in. There are a number of these types of plugins available, but when I found this one a couple of years ago, I have used it exclusively for any membership site I build.
Other Stuff – The Code
For my system, I built a bunch of custom functionality so there is a bit of custom code. Below is a list of the features that required custom code.
Email Templates
This is simply HTML and CSS, but incorporated with the different merge tags. I did this to have consistency between the invoice display on the site and the PDF.
PDF Templates
Adds a professional look to the invoice and there is one for the initial invoice and one for the “paid” invoice which serves as a receipt. The design is also consistent with all other invoice displays.
Invoice Number
This was a personal preference, as mentioned, you could simply use the Unique ID add-on. But this code allows me to control my own invoice peramaters.
Client ID
This is also possible with the Unique ID add-on but I wanted more control over the parameters.
Login Screen
I wanted to eliminate any confusion for the client, making it easy for them to get logged in. There is also a scrip that will redirect the user to a specific page based on their user role.
Updated Invoice Status
When the invoice is paid, it will use the invoice ID to search for and update a hidden field in the invoice entry with the “Paid” status. I can then display the status in the client Entry Block display to show which invoices are paid and unpaid.
Resend Notification
This adds the functionality for resending the initial notification from the front end instead of having to log in and use the resend feature in the Gravity Forms entry details.
Custom Merge Tags
This code is magical. It generates a bunch of custom merge tags for the billing company information so that I can dynamically populate it throughout different parts of the system.
Custom User Roles
I created a custom role for the client and the billing admin so that I can control the level of access they have to the WP Admin. I also use this to control the redirect when they login.
Saving HTML Fields
With this code I can save the HTML fields to the entry when the invoice is created.
Fetch the Logo
Because I wanted to make this system usable for different businesses, this code will fetch the company logo from the media library and dynamically add it to the invoice for notifications, PDFs, and on the site. All you have to do is title the image the same as your company name.
Change From Email
This was necessary to prevent issues with deliverability. Again, I was thinking about the potential of using this as a SaaS so I needed to be able to set a FROM email in the notifications, but have that email changed based on the subdomain and the company.
Dynamically Populate Company Info
This will grab the company info from the user profile and dynamically populate an HTML field in the form so that when the invoice is displayed to the client when they return to pay it shows the correct billing company info in the invoice header.
I Want This!
If you’re interested in a tutorial or course on how to build this, I’d be willing to create that if I get enough interest, but it won’t be free. The time and effort it will take to create the course will mean I need to charge for it.
Option 1: Course / Membership (with fee)
If you’re open to paying for a how-to course or a monthly membership where I release multiple mini courses on how to build different apps with Gravity Forms, let me know in the comments and I’ll do it.
If you can’t wait that long and the outline in this post isn’t enough for you to be able to build it on your own, you can hire me to build it for you. Since I already have the blueprint it wouldn’t be that expensive.
Option 2: Done For You (with fee)
If this option sounds good, drop me a note in the comments or use the live chat to connect so we can get your build scheduled. You will need to purchase your own licenses for Gravity Forms and Gravity Perks.
The Wrap Up
This Gravity Forms invoicing system was a blast to build, but it has also been a great solution for my company. It’s easy to use and easy for the client to pay.
Honestly I think I’ve only scratched the surface of what is possible with this system.
Quick shout out to the Wizards at Gravity Wiz for awesome roundup of functional add-ons they build for the community.