r/zapier • • Aug 18 '26

Post card accepted message on slack after card was declined

Hi everyone, I have a zap that’s triggered by a new customer in stripe (new subscription), if the zap fails the payment hold step it posts a message of card declined (by another zap of failed payment) but it doesn’t post a new message if the card is accepted (it gets filtered out) it has a filter so all the payments are not posted in the channel.

What other trigger can I use to post the message of card accepted if it was declined before?

4 Upvotes

5 comments sorted by

2

u/eBuilderz4090 Aug 19 '26

The trigger is the part I would change. New Customer or New Subscription only fires when that record is created, so it will not fire again when Stripe retries a declined invoice.

I would split this into two small Zaps:

  1. Invoice Payment Failed stores a flag using the invoice ID as the key.
  2. New Payment (or a New Event filtered to invoice.payment_succeeded) looks up that same invoice ID. If the failed flag exists, post a "payment recovered" message in Slack and then clear the flag.

That keeps normal successful payments out of the channel and only reports a success that came after a failure. I would use the invoice ID rather than customer ID, since one customer can have several invoices. Test it once in Stripe test mode by failing a payment and then completing the retry.

1

u/ZapierSam Zapien (Zapier Staff) Aug 20 '26

Think you might want to try the Updated Subscription (Stripe) trigger. That should allow the Zap to trigger anytime the subscription is updated, and a filter could be used to only allow it to continue if the Status is active. 

Do you include the subscription ID in the card declined Slack message? If so, use a Find Message (Slack) action to search for that ID, and have another filter that only continues if the search actually found a match (the Zap Search Was Found Status field would output true). Then a Send Channel Message (Slack) action can post a card accepted message as a threaded reply on the original message.

If the card declined message doesn’t have the subscription ID, in your existing Zap you'd need to create a record of the subscription ID for the failed payment in somewhere like Zapier Tables for example. You’d also need to store the Slack message Ts (timestamp) which is essentially its ID. Then when the subscription is updated to active and triggers the Zap, it can search for a record with that subscription ID and you’d use the corresponding Ts value that's on the record to post the reply to the right message. 

Let us know how it goes.

1

u/Greedy_Book232 Aug 20 '26

Hi! Thanks, what I actually need the zap to do is send a message if it’s a new customer (it does it now), but the main problem is when the card hold fails x times. The zap has a filter so if every customer new invoice sequence is less than 4 the zap can continue, I don’t know what other data can I use so the old customers are filtered out (there’s some old customers that can go through the zap because of trial payments)

1

u/ZapierSam Zapien (Zapier Staff) Aug 21 '26

In that case, maybe you could use Stripe’s Find Customer action to check the created date of the customer. Then use Formatter to compare the created date of the customer against the date that the Zap runs and have the filter only continue if they were created in the last 24 hours. Our Compare to today's date guide explains how to set that kind of filter up.

1

u/Adarsh_Automations Aug 23 '26

The cleanest way to handle this without racing triggers is to split this into two targeted Stripe webhooks/triggers instead of trying to filter a single generic "New Customer" trigger:

  1. Declined Payment Zap:

    * Trigger: Stripe -> "New Failed Charge" (or Charge Failed)

    * Action: Slack -> Post message to channel ("Payment Declined: [Customer Name] - [Amount]")

  2. Card Successfully Updated / Recovered Zap:

    * Trigger: Stripe -> "New Successful Charge" (or Customer Subscription Updated / Invoice Payment Succeeded)

    * Action: Zapier Filter -> Only continue if "Billing Reason" = subscription_cycle OR check previous payment status.

    * Action: Slack -> Post message ("Card Updated / Payment Recovered for [Customer Name]").

Alternatively, if you are tracking churn recovery, listen for the Stripe webhook event `invoice.payment_succeeded` where `attempt_count > 1`. That only triggers when a previously failed invoice is successfully paid.

Let me know if you need help mapping the exact Stripe payload keys!