Reduce Churn & Collect More Payments With Automation | Payment Failure Tutorial

Isaac from Opto.co shows how to automate payment failure management using Zapier, ThriveCart, and ActiveCampaign. The system tracks failures per customer, sends escalating emails, cancels subscriptions after a set number of failures, and clears the counter on successful payment. Works with any platform that supports webhooks.
Chapters
If you offer split pay for your course or you have a subscription business, you absolutely, positively have run into the issue of a payment failure. Credit card failing, you following up with people to see if they can update their information, having to remove access if they don't respond, or even worse, having to then like re-restore their access if they get back to you. There are so many manual things that have to get done, and I personally know people that even though they made more money with the split pay Or with a more regular subscription, for example, monthly versus annual, and actually stopped offering altogether because they didn't want to deal with all these manual things, not knowing that most of it can be automated. If you know what this channel is all about, you know I'll show you how, so stay tuned. If you're new to this channel, my name is Isaac from Opto.co, and we've helped over 50 companies automate more than half a million tasks using low-code tools like Zapier. And I started this YouTube channel to share the work wrapped up with you. Do and hopefully help some education and service-based businesses like yours focus on what they're good at while letting automation do the rest. In this particular video series, we're discussing the most common post-purchase automations that you may want to set up for your subscription offer, and I'm illustrating the process using ThriveCart, Kajabi, Circle, ClickUp, and ActiveCampaign as the main tools. These are essentially a checkout system, a course hosting platform, a membership, a project management, and an email marketing tool. However, the same concepts can be implemented on any platform that integrates with here that is capable of receiving or sending webhooks. So if you have other tools, I still hope this serves you, but I had to pick a tool to showcase these examples. So let me share my screen and let's get into it. All right, so here we are looking at what would be the recurrent payment failed automation. I'm gonna walk you through exactly how it works, but I should mention that this particular video I'll have to cover not only this automation but 2 others that are related and that are essentially the automations that follow this process, just so that you understand What we're aiming towards. Okay, so I'm going to explain 3 different automations. Bear with me. The first one is this one. When a recurring payment fails in ThriveCart, you can use that as a trigger. And what you're going to do, you're going to increase the counter by 1. In other words, you want to store somewhere, and you can do this with a built-in Zapier tool, that this person's payment failed for the first time. Now, you have paths available within Zapier so that you can say, if this is the first time that a payment fails, update their contact information at ActiveCampaign and add the payment failure tag. That payment failure tab will trigger an automation with ActiveCampaign where you're going to send emails to this particular customer of yours, letting them know that their payment failed and encouraging them to update their billing information. If this same zap runs again, what's going to happen is that eventually the counter will get to a number that maybe you would consider the customer already canceled to an extent. It's called Canadian cancel. It's the term I've heard when people just— they want to cancel. So just— they'll just not tell you and simply allow you to remove their access. Does not update their information. So an example would be, say, 4. If their credit card fails for the 4th time, you're going to go ahead and actually cancel their information— their subscription, sorry. And what that's going to do, that's going to trigger another Zap, which we haven't talked about, but I'm going to talk about now because it's part of this same recurring failure system. Okay? If they— if you automatically cancel, it's going to trigger this other Zap where you're essentially going to remove their access. Okay? And you're going to tag them as canceled, and you're going to remove their member tag. You may also want to label their task on a project management system as canceled so people know that this particular client or customer canceled. However, there's another option, right? If they happen to pay successfully, you're going to want to do this other thing. Essentially what you're going to do is if they pay and they had not yet— actually, this is wrong, should be lower than X. If, for example, you're using 4 as your threshold to consider them canceled, what you're going to do is you're going to have another Zap that every time someone pays, you're going to try to get the counter that relates to that person. Okay? The counter is the one that we created here in the payment failure. If you can't find it, it means this person's credit card has never failed. So you're simply going to ignore it. But if you find it, you're going to tell, okay, is this less than 4? Meaning have they had their credit card payment fail less than 4 times? In which case, you know, their access is still not removed. And you're going to go ahead and simply delete the counter so that when this Zap goes through again, it's not going to find anything here. And ignore this particular path. And then you're going to want to remove their payment failure tag so that you don't continue to email them about them updating their billing information because you already was able to charge them successfully. Okay. Lastly, if it's 4 or more, this would be in the example of someone who you were unable to charge them even after 4 attempts. So you removed their access, but now they were able to have a successful rebuild. So in this case, what you want to do is you want to make sure that you restore Access and retag them as member. Because remember, we actually walk— they went through the Zap number 3 when— where we canceled their membership. We added their cancellation tag. We removed their member tag. So we want to reverse those changes here. So at a high level, I'll recap this. I know this is intense stuff. If people fail to pay, you have a path so that the first time they fail to pay, you start emailing them and that's it. If they fail to pay X number of times, 4 times for example, then you're going to cancel the subscription and that cancellation will trigger another Zap that will remove their access. So far so good. Okay, now if they do pay, you want to, want to know if you remove their access or not. If you did remove their access, you restore the access, and if you haven't, you'll simply remove that payment failure tag and move on. Okay, I hope that's clear. We'll get into the weeds now of creating this particular step number 4, this particular automation number 4, and testing in real life. So let's get to it. All right, so we're here on Zapier dashboard where we can see the 2 workflows we've covered so far. Check out the link in the description if you want to check those recent videos out, but we're gonna go ahead and create what will be workflow number 4. We are changing the order here, but it makes sense to create this one first, and then we're gonna create number 3 tomorrow and number 5 on Thursday. So let's do workflow for payment failure. So in the triggers, you're gonna use— gonna select ThriveCart as the app. You're gonna go ahead and look for failed recurring payment failed. You can see here that it triggers both when it's a subscription and also when it's a split pay, or for example, a course of some kind or offer of some kind. Okay, I'm gonna click on continue, and here we're gonna select specific product that we want. It could be an upsell as well, but for the purposes of this video, I created a test product that we're testing. So we're going to go ahead, click continue. It's going to prompt us to test the trigger. I'm going to test it and pull up the most recent data point that it can pull up. And we're going to go ahead and continue. The second step we outlined here was the counter. Now the counter, we will have it as a storage by Zapier, which is one of the tools that we're going to use here. There's an event called increment value. And you can define a particular key. We're gonna create a key that's unique to this person and their specific invoice and their specific subscription ID that relates to what they bought. Okay? So this is what we're going to do. So we're gonna have an order ID that comes here. And have underscore, and we're gonna have the item ID. The reason why I do it that way, I'll show you in a bit. Okay? It's gonna make sense. So I'm gonna add 1, and what this is gonna do, every time this person fails to pay for this particular product, it's gonna increment this key by 1, and we will be able to reference to that key later. So let's continue. We can test it out. Let's see that it's 2 because I had tested this a little earlier, but that went through successfully. Now, as you saw in this flowchart, now we have 2 different paths depending on the number That came back to us. Okay, what we're gonna do here is gonna create paths. I'm gonna call the path A first payment failure. So this is the path we're gonna take the first time people fail to pay, or another way of saying that is with a value of the step number two that we're seeing here equals one. Then we're gonna have here nth payment failure, and for the purposes of this video, I'm gonna use equals two just so I can test quicker. Okay, you might want to use. I encourage you to use four, potentially even five, depending on how many times the payment processor tries to. Build people. As far as I know, PayPal and Stripe, try 4 to 5 times. That's— those are the numbers I would suggest. So here I'm gonna go ahead and select a value. I'm gonna say here, when the value exactly matches 1, it's when I want to go through this path. Okay, in this case it's going to tell me, oh, this would not— it would not have continued because it's 2. But that's okay, we can still build this particular path. And what we're going to do here is going to create or update the ActiveCampaign contact. Remember, we want to add the tag So that we can start encouraging this particular customer to update their billing information. We're going to click on create or update contact as the event, select the particular ActiveCampaign account. We're going to select clients as lists. And here we're going to select the email address of the particular person that just failed to pay. Okay. Then here on tag, I'm going to get this tag right here and Event payment failure update info series. And I click on continue. I'm going to skip this test because we're going to test this on real life in the real world. And something else you want to do at this point is to make sure we have the ActiveCampaign automation in place so that when that tag is added, the subsequent emails go through. I'm going to show you real quick how that looks like so you can replicate that for yourself. So as you can see here, this is the example of the automation that's relevant for workflows number 4 and 5. We're building 4 right now. And when this person is tagged with this. When a contact gets tagged with this event payment failure update info series, we're going to send in an email. You can have a series of emails here, just adding waiting periods and other emails. What we're going to have at the bottom is that if this tag doesn't exist anymore, that is if we remove it, we're going to end this automation. And this will come in handy a little later as you're going to see. So let's build the second path. The second path will be when this particular number is not 1 anymore. So we've tried multiple attempts to charge As I said earlier, I would encourage you to use 4 or 5. For the purposes of this video, I'm gonna use 2. Okay, I'm gonna go ahead and test that and continue. And what I'm gonna do here, it's I'm going to automatically cancel their subscription. Okay, so gonna put ThriveCart. In ThriveCart, you're gonna see an API request event. Okay, you're gonna click on that. And what we're gonna do here is we're gonna find the relevant URL and HTTP method related canceling a subscription. And you're gonna See why earlier we used subscription ID, item ID, and order ID because it comes handy here. So we're gonna open up that API documentation, and we're gonna look for cancel a subscription. On cancel a subscription, you'll notice well three things. We have the URL right here. We have in big cap letter the fact that it's a post. So we already have two of the important parameters we need. Okay? And here you see in the body, you'll have the order ID, which is something we talked about earlier, and the subscription ID. Okay? So I'll just have to add order_id. Actually copy paste it. Just make sure we don't any typos mistakes. And here we're gonna look for those values right here. The item, the subscription ID, it's actually the item ID. Something I had to figure out by myself. I just saved you that time right there. I'm not gonna test this right now because we're gonna test it in real life. Hey guys, sorry to interrupt here. I just found out that actually The ID is not the right number. There is a subscription ID, but unfortunately, Thraka doesn't give you that on the trigger of the recurring payments canceled. Instead, you have to find it yourself, and here's how you go about doing it. In the first step, you're gonna go ahead, select the API request data, and you're gonna get all the transactions that are with bills. What this is going to allow you to do is that the first transaction in this list will be the transaction that just failed. That's the only thing you need to add here and you're going to get a list of all the transactions that are rebills. And the first one will be the one that failed that relates to the product in question. You'll notice that there's a subscription ID that unfortunately that number is not available on the data that Zapier gives you. And that's the actual number. So I'm going to go ahead from there. I pick formatter utilities. I choose the first value from a list. I give it that list of subscription IDs, and only then I'm able to create a webhook. In this case, POST with the same URL we had discussed, with the same data we had discussed, which is the order ID that it is available in that first step, but the subscription ID that I will be taking now from that last step. And here, since I did a webhook rather than the native API request, I do have to ask some authorization. They use better authorization. And just if you haven't done that in the past, just know that you have to add the word better space and then your API key in an authorization header. And your API key is easily found going to your ThriveCart account, going to settings, going to API and webhooks, clicking here on view settings. And here you're able to create your API key. You would create whatever it is that you have to create and you will go ahead and copy that that into this. And I just ran that through and it went through successfully. Just keep in mind that small little detail that you may want to change if you want to implement this automation as is. And I use a debit card that I just withdraw all the funds from. You know, you have to do crazy things for YouTube time. So this is what this particular workflow will look like. What I've done is I actually subscribed myself to a daily subscription of $1. So what we're going to do is I'm going to simply— let me show you that I actually did Just to make sure that you can see. And what we're going to do, let me pause this real quick. Okay, so as you can see, I have a daily subscription, $1 a day. And this person bought on the 27th, this simulated person, and also bought again today or paid again today. And that rebill went through successfully. I just withdrew all the funds for that account. And as I said, and tomorrow this system is going to try again. When it tries again, this particular workflow should trigger and we're going to see if it goes through successfully. So I'll see you tomorrow. I am back. This is the next day. And as you can see, here's the failed rebuild. This particular person's broke. They have no money in this account. Either credit card failed or whatever it might be, it failed and we were unable to charge them. And if I look at the step history, we can see that every step ran successfully. We had now a key that's unique to them that's telling us how many times their payment has failed. And we can see that the path that ran was the one about the first payment failure in which we tag them with this particular event. So that ran successfully. What I'm going to do now is I'm going to wait for the second rebill. And based on what we set up, that rebill will cancel the membership automatically. And as we discussed, once that cancels the membership automatically, that's going to trigger another Zap, which I'm going to discuss in the next video. So stay tuned for that. Make sure to comment that below if you have any questions. And yeah, I'll see you in the next one. Thank you.
More from Isaac

This Boring AI Automation Could Save Your Accounting Firm 40 hours (But most ignore it)

How to Build AI Systems With Claude (So Your Accounting Firm Runs Without You)









