If you’re an indie hacker, you probably check Stripe a dozen times a day. That’s not just a time sink — it’s a habit that keeps you from deep work. Here’s how I killed it with a 50-line Python script that posts a new-revenue message to Slack every time a payment comes in.
The core idea is simple: Stripe has a webhook system, and Slack has an incoming webhook URL. You stitch them together with a small Flask app that listens for `charge.succeeded` events, formats the amount, and POSTs to Slack. No need for Zapier or a paid automation tool.
Let me walk you through the code. You’ll need a Stripe account with webhook enabled, a Slack workspace where you can create a webhook, and a server that can run a Flask app — even a $5 VPS works.
First, set up the Flask app. Here’s the bare minimum:
“`python
from flask import Flask, request
import requests
import json
app = Flask(__name__)
SLACK_WEBHOOK_URL = ‘https://hooks.slack.com/services/YOUR/TOKEN’
@app.route(‘/stripe-webhook’, methods=[‘POST’])
def handle_webhook():
event = request.json
if event[‘type’] == ‘charge.succeeded’:
charge = event[‘data’][‘object’]
amount = charge[‘amount’] / 100
currency = charge[‘currency’].upper()
customer = charge[‘billing_details’][’email’] or ‘unknown’
message = f”New payment: {currency} {amount:.2f} from {customer}”
requests.post(SLACK_WEBHOOK_URL, json={‘text’: message})
return ”, 200
if __name__ == ‘__main__’:
app.run(port=5000)
“`
That’s it. Deploy this to your server, set up a Stripe webhook to point at `https://yourdomain.com/stripe-webhook`, and you’re done. To test, make a small charge in test mode.
Why is this better than Zapier? Cost, for one. Zapier charges $20+/month for webhooks. This script costs you the server you already have (or $5/month). Also, you control the logic. You can add more fields, filter events, or post to multiple channels.
Second, latency. The webhook fires in real-time, so your Slack notification appears seconds after the payment. With Zapier, there’s often a 2-5 minute delay.
Third, it’s a learning opportunity. If you’re a founder who wants to understand basic integrations, this is a gentle intro. You can later extend it to send a summary at the end of the day.
I’ve been running this for six months. I get a ping on my phone every time someone pays, and I never open Stripe unless it’s a bigger payment. That’s hours saved each month, and I feel more in control.
If you want the full script with error handling and retry logic, I’ve packaged it as a ready-to-run script in the Kintly library. It includes a `README` and a `requirements.txt`. You can download it, follow the setup steps, and be live in 10 minutes.
Automating Stripe to Slack is just one example. Once you see how easy it is, you’ll start automating other busywork — and that’s the point of Kintly. Stop checking dashboards, start building.
