Fortunately over the past couple of years we’ve seen the growth of services like Zapier and IfTTT(If This Then That) that connect web services together giving them the ability to send data back and forth. After investigating a few I decided to use Zapier to solve the problem for our sites. You can do this to a more limited extent with IFTTT, but it’s Stripe integration is not a robust as Zapier.
Zapier is a fremium service meaning it has a free option and more extensive paid levels. The free version will work fine for the solution I describe here. But Zapier has so many integrations and powerful features you may find other uses the justify one of the paid levels. We’re using the free version for our purposes here and it’s working perfectly fine.
For a little background, Zapier links services together by creating “Zaps.” A Zap consists of a Trigger and an Action…something programmers work with every day. In our case here the Trigger is when a member’s credit card is declined (for a variety of reasons). The Action is an automatic email that notifies the member that their card has been declined. Optionally you can choose to receive a copy of the notice.
Once you become accustomed to the user interface creating a new Zap is pretty fast. The most tedious part I experienced was inserting the member-specific fields into the email text. Stripe has dozens of fields in each event record (member name, email address, payment amount and many other items we don’t need) that it’s difficult to find the right one. However each list has a search box where you can enter the field name or a keyword to narrow down the list. I’ve provided the filed names from the items in my example message so you won’t have to find them yourself.
Also, in the example I used the built-in email sending function in Zapier. In reality I used a Gmail account for our sites. It’s a good idea to create a free gmail account for your membership site for situations just like this and to lock up the name so others can’t take it.
Sign up for a free Zapier account.
They have a premium version which you would only need if you have over 100 transactions per month.
Scroll down to get to the free account option.
Free Account Option
Here it is.
Sign up with the email address you use to communicate with your members.
Zapier uses this email address when you use it’s send email function.
Dashboard – Choose “Make a Zap” in the top menu
First choose a trigger
Select Stripe from the list
Zap is integrated with many services so it’s faster to type “Stripe” in the search box
Select a “trigger” within Zap.
Use the dropdown box to make your choice.
Select “New Event” from the list
Now select your action using “Choose and Action” on the right
Select an email service
I used the search box here to narrow down the selections to email services. In this example I’ll use Zap’s built-in email sender. It’s rather limited but it’s one anyone can use. But keep in mind it will send messages from the email address you used when you created the account.
Note: I created my Zaps using Gmail. It’s a good idea to create a free Gmail account using your membership site as the prefix. This can be handy for situations like this and it prevents others from grabbing your name. For example if your membership site is called Herb Gardening Basics then create a gmail account “firstname.lastname@example.org”
Choose your action
In the case of the Email app, you have only one option – Send Outbound Email
Here’s what it looks like so far.
Connect your Stripe account to Zapier
You only have to do this once. There are a few steps here, but it’s pretty simple.
Add your Stripe API key
You can keep the account name or change it. I just left it the same.
You’ll need to get the API key from your Stripe account. It won’t hurt, I promise. Just follow along.
Go to acount settings
Click the little dropdown box next to your name on the top right-hand side of the screen
Choose “Account Settings”
Select API Keys
Copy the Live Secret Key
Now copy the Live Secret Key. Yours won’t be blurry like mine.
Go back to Srtipe 1. Paste your API key in the “API Key” box 2. Then click “Continue.”
Select your Stripe account
If you have only one, this is a non-issue
We’re just moving down a page from top to bottom. This is step two of that process.
Select your email account
Again if you only have one just click Continue and keep going
Choose your trigger
Stripe has dozens of triggers to choose from in our case we will use charge.failed.
To avoid scrolling through a long list type”charge.failed” in the search box.
Here it is. Just click on it.
Narrow your trigger down to a specific membership level.
If you plan to send the same notice to everyone with a declined card regardless of membership level (or if you only have one) then you can skip this step and go to “Create Your Email Message” several steps below.
But if you plan to send multiple versions of your notice then you’ll need to create one Zap for each. The free account only allows five Zaps. After that you need a premium account. My advice – keep it simple at first.
From the Field dropdown choose “Customer Subscription Plan ID”
This is a very long long list so save yourself some time and use the “Search Choices” box at the top of the list to find the right selection.
From the Condition dropdown choose “(Text) Exactly matches
Now go back to Stripe and get your plan ID
The ID for your subscription plan is likely the “SKU” (also referred to at the Product ID” WishList Member assigned to your subscription plan when it was created. But it doesn’t have to be. For our purposes here we need the ID that was used when the plan was created in Stripe. To be safe go back and see.
In the Stripe Dashboard choose “Plans.”
Choose your plan
Copy Plan ID
Just copy it here.
Go back to Zapier and paste it here
Then click “Continue”
Create Your Email Message
This is where your creativity and marketing prowess come into play. Use this for to create a very simple message. The subject line is most important.
Those little buttons that say “Insert fields” will insert key fields from the member’s Stripe record to customize the message. I have an example here for you. We’ll start at the top and work our way down. The trickest part is choosing the insert fields from a long unordered list. Use the search box to make it go fast and use the field names in my example as your search terms.
Add your member’s email address
Click “Insert fields “the type “Customer Email” in the searh box and chose it from the list.
Add a good Subject line
The one here is just an example.
Write (or paste) your message.
This box is plain text but will send html if you add it. For example purposes I just used plain text. For the link back to your subscription management page it’s bes to use an html link (anchor tag). BTW, if you use Gmail instead of the built-in Zapier email sender then it will automatically convert a web address into a live link.
You don’t have to add a salutation with the member’s first name, but it’s a nice touch.
Once again, save yourself some time and use the search box by entering a keyword. For example here I wanted to add the member’s first name so I entered the word “first” in the searh box and it returend the “Customer Active Card First Name” field.
Example of completed message
The orange boxes contatin the field names that you can use to quickly find the right fields to insert into the message. Anytime you want to inser one just place your cursor where you want it to appear anc click the “Insert fields” button.
Say whatever is important to your business, but keep it simple and give them a link back to your site to update their credit card.
In another post I’ll show you how to setup the Subscription Magagement page (you can call it whaterver you like).
Complete the email message setup
Here are the remainder of the fields to complete. It’s like any other email setup.
1. Add the name you want to appear in the From line of the email message…Hint: your name
2. Reply to address – This is optional – put an address here if you want to use a different “reply to” address.
3. BCC – If you want to be alerted each time a credit card is declined add your email address here. Please note that credit cards are declined frequently only to be approved the second or third time. This means on a large site you can receive lots of these messages.
Test your Zap
Choose one or all tests
Zapier will send you a test message by pulling live data from your Stripe account. Give it a try and click
Continue when your’e satisfied.
Give it a name and activate your Zap
You will probably tweak your message a bit at first. But when it’s ready give it a name and click “Turn Zap on.”
Do This Before You Spend Another Nickel on Your Membership Site
Whether you’re planning a new membership site or updating an existing one it’s vital to know if you have a good market, what that market needs and whether they’re willing to pay for it.
Our free Understand Your Market guide and action plan removes the guess work and shows you how to find what your target market needs and what they’re looking for.