Best answer

Stripe + Mailchimp customer.subscription.deleted is null

  • 13 March 2020
  • 4 replies
  • 102 views

Userlevel 1

Hello,

Trying to set up at Zap with a filter, but it doesn’t work properly. 

This is what I want to do:

When Stripe customer.subscription.deleted is equal to null, Add Subscriber to Tag in Mailchimp.

 

My steps

  1. Stripe: Add event
  1. Stripe Event: customer.subscriotion.deleted
  2. Filter: Only do this when customer.subscription.deleted contains null

In my filter I can’t see option for customer.subscription.deleted. So that’s the issue..

 

Hope that I can get help with this :)

 

//Mathilda

 

icon

Best answer by Danvers 25 March 2020, 13:14

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

4 replies

Userlevel 7
Badge +12

Hi @MathildaBonnevier Thanks for your question!

If you use the Stripe New Event trigger and set the event to customer.subscription.deleted then the Zap will only trigger when a subscription is deleted. That means that there wont be a field customer.subscription.deleted field, because every item that triggers the Zap will be a deletion. 

Could I ask for some more detail about what you’re trying to do with the Zap? We may be able to find a trigger that will do what you need 🙂

Userlevel 1

Hello,

 

So I want to trigger a Mailchimp email to customers where Stripe automatically cancelled the subscription. This can be due to for example: lost card, insufficient funds, do not honor, etc. We have activated Smart Retries in Stripe where Stripe emails the customer after every attempt, up to 4 times: “We had a problem billing your credit card”.

After the 4th retry, Stripe automatically cancels their subscription. And we want to inform those customers that their subscription has been cancelled.

What would be the correct trigger to use for the above? 

-> I don’t want to trigger an email where the customer by own action has cancelled a subscription. 

 

This is what Stripe says:

You can see that a subscription was canceled automatically—as opposed to by your request—if the customer.subscription.deleted event’s request property is null. 

 

Thanks!

Userlevel 7
Badge +12

@MathildaBonnevier Thanks for the extra detail - I can see what you’re trying to do now. 

 

If you use the New Event Trigger and select the event ‘customer.subscription.deleted’ then the Zap will only trigger when the customer.subscription.deleted field isn’t null. So we need to find a new trigger. 

 

The first thing that I would do is make sure that your Zap is using the ‘New Event’ trigger and not ‘New Event (Legacy)’ as the ‘legacy’ means that it’s an older version of the trigger. 

Then we need to think about if there’s another event that we can use. I can see that there is a ‘Charge.failed’ option, I wonder if there is any information in that trigger that would allow you to see whether it was the final try (and therefore the subscription was cancelled). If you set up that as the trigger, what fields can you see? Would any help you to identify whether it’s the last time Stripe tried?

Userlevel 7
Badge +8

Hi @MathildaBonnevier ,

Circling back to see if you were able to get your Zap squared away using the above tips from Danvers!

If you are still running into any issues, please let us know- happy to help!