Stripe is a wonderful tool to manage complex products as it’s been created for that specific purpose: to allow mass-scale projects to collect payments. Stripe has been created with developers in mind and made it easy to integrate their solution to any other app. So you’re probably using Stripe as your payment gateway.
I set up a couple of Zaps to be notified when our users upgrade, downgrade or purchase a subscription for the first time. This was possible with Zapier, the Stripe and Slack integrations as well as Zapier actions. It could have been possible to do it just using Stripe’s webhooks as well, but I prefer using Zapier to filter out the actions we don’t want to be notified about, like free plan purchases.
Here’s the step-by-step to post a Slack channel message when a new customer has purchased a premium plan:
Create a Zap with the Stripe integration and “New Event in Stripe” trigger. The event type should be “New Customer Subscription Singup”. Fetch dummy data to test your Zap.
Add a “Filter by Zapier” action and filter out the following:
a. data.object.items.data.plan.id
does not exactly match your free plan price id
b. data.object.cancel_at_period_end
is equal to false
c. data.object.status
is equal to active
Add a “Send Channel Message in Slack” action to a specific #sales channel.
Hello! We have a new customer {customer.name} from {customer.address.country}. They purchased a {data.object.items data.plan.nickname} plan.
Add links to your admin dashboard using <linktoyourdashboard.com| text you want to show>
Here’s the step-by-step to post a Slack channel message when a customer has upgraded to a premium plan:
Create a Zap with the Stripe integration and “New Event in Stripe” trigger. The event type should be “Subscription Updated”. Fetch dummy data to test your Zap.
Add a “Filter by Zapier” action and filter out the following:
a. type
exactly matches customer.subscription.updated
b. data.object.items.data.plan.id
does not contain your free plan price id
c. data.previous_attributes.items.data.plan
exists.
To answer our most pressing question, I added a date/time formatter to this Zap, to better know the time it took for that user to upgrade. As you have all the necessary information on the Stripe payload, it looks something like this:
a. Transform field set to Compare Dates
to have the duration between the two dates.
b. Values field’s start date set to data.previous_attributes.billing_cycle_anchor
c. Values field’s end date set to data.object.current_period_start
d. Both date formats are written in UNIX timestamps, so the format in Zapier is X
.
Add a “Send Channel Message in Slack” action to your previously created #sales channel.
Hello! We have a customer who upgraded {customer.name} from {customer.address.country}. They upgraded to a {data.object.items data.plan.nickname} plan after being on the {data.previous_attributes.items.data.nickname} plan for {output_days} days.
Add links to your admin dashboard using <linktoyourdashboard.com| text you want to show>
Here’s the step-by-step to post a Slack channel message when a user downgrades their subscription:
Create a Zap with the Stripe integration and “New Event in Stripe” trigger. The event type should be “Subscription Updated”. Fetch dummy data to test your Zap.
Add a “Filter by Zapier” action and filter out the following:
a. data.object.cancel_at_period_end
is true
b. data.object.items.data.plan.id
does not contain your free plan price id
To know the time our user spent on our app before downgrading, I added a data formatter action. As you have all the necessary information on the Stripe payload, it looks something like this:
a. Transform field set to Compare Dates
to have the duration between the two dates.
b. Values field’s start date set to data.object.created
c. Values field’s end date set to data.object.canceled_at
d. Both date formats are written in UNIX timestamps, so the format in Zapier is X
.
Add a “Send Channel Message in Slack” action to a specific #sales channel.
Oh no :cry:, {customer.name} has decided to cancel their {data.object.items data.plan.nickname} plan at the end of the month, after using {productname} for {output_days} days.
Add links to your admin dashboard using <linktoyourdashboard.com| text you want to show>
Are you bummed they downgraded and want to win this customer back or at least hear their story? Send them an email!
a. Set up a Zapier Delay action with the value you want so the email is not sent straight after the cancellation.
b. Create a Send an email action with the software of your choice. I’m using MailerSend to send a template-based email to that user.
There you go, with those three Zaps, you’re setting up a very useful #sales Slack channel so your whole team can celebrate and reflect on users’ purchasing behavior!
Learn more about Stripe’s growth strategy
Display all your JSON’s secrets with this handy tool: Jsonvisio.com