Skip to main content
Lost payments are lost revenue — and slow investigation compounds the problem. This automation listens for Stripe failed-payment alerts in Slack, uses the Stripe MCP to pull the full customer and payment context, checks for known issues (expired cards, 3DS challenges, fraud flags), and posts a recommended action — refund, retry, reach out — directly in the support thread.

Use this template

Open Stripe Failed Payment Investigation in Devin and create the automation with the default configuration. You can customize it before saving.

What this automation does

The Stripe MCP gives Devin read access to Stripe’s customer, charge, and dispute APIs. Combined with Slack as the trigger surface, this template turns your failed-payment channel into a self-investigating queue — support and finance teams get context-rich recommendations instead of raw webhook payloads.

How it works

Trigger: Slack eventmessage
  • Event: slack:message
    • Conditions:
      • channel eq #payments-alerts
What Devin does: Starts a session with full event context, executes the prompt below, and (optionally) notifies you on failure.

Prerequisites

Example prompt

The template ships with this prompt. You can edit it after clicking Use template, or leave it as-is.

Setting it up

  1. Open Automations → Templates in Devin.
  2. Click Stripe Failed Payment Investigation. The create page opens with this template pre-filled.
  3. Connect any required integrations and install MCP servers if you haven’t already.
  4. Replace any placeholder values in the trigger conditions (for example, swap your-org/your-repo for your actual repo).
  5. Review the prompt and adjust it for your team’s language, conventions, and guardrails.
  6. Click Create automation.
Most automation templates include suggested ACU and invocation limits to bound cost during early rollout. Keep them as-is until you’re confident in the automation’s behavior, then raise them to fit your workload.

When to use this template

  • E-commerce and SaaS companies with non-trivial failed-payment volume
  • Finance and billing teams without a dedicated payments engineer
  • Reducing customer churn from recoverable payment failures
  • Speeding up dispute and chargeback investigations

Customization ideas

  • Filter by payment amount, customer segment, or error code
  • Add automatic retry logic for transient failures
  • Integrate with your CRM for enterprise-customer-specific handling
  • Escalate to Slack DMs for high-value customers

See also