Stripe + Razorpay Settlement Lag Tracker: Daily Payout Delay Alert to Slack via Pipedream
Flag gateway payout delays before your finance team discovers the cash gap.
The stack in the order it runs — data flows from the source through to where it lands.
Settlement lag is invisible until it compounds. Stripe's payout schedule shifts based on account health, dispute rates, and plan tier. Razorpay's windows vary by payment method — UPI settles T+1, cards can be T+2 or T+3. Run both gateways and these lags stack silently. By the time your finance team notices a shortfall, you've already blown vendor payment timing or payroll float assumptions.
Pipedream lets you write actual Node.js logic inline — compute expected settlement dates per transaction type, diff them against real payout timestamps, fire a conditional Slack alert only when lag exceeds your threshold. Zapier can't do the date math inline. Make can, but Pipedream's code steps are faster to iterate and cheaper at this volume.
Don't reach for a BI dashboard here. Dashboards require someone to open them. Settlement lag is time-sensitive — a payout delayed 48 hours on a Friday means no correction until Monday. A proactive Slack alert surfaces the problem when you can still act on it.
One tradeoff to know upfront: Pipedream's free tier caps at 10,000 invocations per month. Running this daily across both gateways with 500+ transactions will hit that ceiling. Upgrade to the $19/month plan or batch your API calls. Skip this whole playbook if you have a dedicated treasury or finance ops team running cash flow through a proper ERP — NetSuite, QuickBooks with bank feeds. This is for sub-50-person companies where a founder or generalist ops person is watching cash.
The stack (5)
The universal data scratchpad.
Still the fastest place to land tabular data everyone can read.
How it runs
- 1
Pull Stripe payouts via API in a scheduled Pipedream workflow
In Pipedream, create a new workflow with a Schedule trigger set to run daily at 8:00 AM local time. Add a Code step using the Stripe app's built-in auth. Call `stripe.payouts.list({ limit: 50, created: { gte: unix_timestamp_48h_ago } })` and extract `id`, `amount`, `arrival_date`, `created`, and `status` for each payout. Log any payout where `status === 'pending'` and `arrival_date` is more than 2 days from `created`.
- 2
Pull Razorpay settlements via their Settlements API
Add a second Code step in the same workflow. Hit Razorpay's REST API: `GET https://api.razorpay.com/v1/settlements` with Basic Auth using your Key ID and Secret. Filter for settlements in the last 48 hours. Extract `id`, `amount`, `created_at`, `settled_at`, and `status`. For UPI transactions, flag any `settled_at - created_at` gap exceeding 86400 seconds (1 day). For card transactions, flag gaps exceeding 259200 seconds (3 days).
- 3
Write flagged rows to Google Sheets as a running log
Add a Google Sheets step after both API pulls. Use the Sheets API to append rows to a tab named `settlement_lag_log`. Columns: `date`, `gateway`, `transaction_id`, `amount`, `expected_settlement_date`, `actual_or_projected_date`, `lag_days`, `flagged`. This gives you an audit trail you can hand to your finance team or CA at reconciliation. Use the `spreadsheets.values.append` method with `valueInputOption: RAW`.
- 4
Compute breach threshold and build the Slack payload
Add a Code step that iterates the flagged array from both gateways. If `flagged_count > 0`, construct a Slack Block Kit message — a header block with `⚠️ Settlement Lag Alert — {date}`, then a section block per flagged item showing gateway, amount formatted as INR or USD, expected vs. actual date, and lag in days. If `flagged_count === 0`, return early and post nothing. Don't send a green all-clear every day. That's noise.
- 5
Post to a dedicated #finance-ops Slack channel
Use Pipedream's Slack app integration with a `chat.postMessage` action. Set `channel` to `#finance-ops`, not `#general`. Include `username: 'Settlement Tracker'` and `icon_emoji: ':bank:'` so the message is easy to spot on a scan. Test with a manual trigger first — Razorpay's sandbox returns mock settlement data you can use to validate the lag computation logic before going live.
- 6
Set a secondary alert for amounts above a cash-flow threshold
Add a conditional branch in the same Code step: if any single flagged payout exceeds ₹5,00,000 or $10,000 (set your own number), send a direct Slack DM to the founder or CFO using `postMessage` with their Slack user ID — not just the channel. Channel for ops awareness, DM for material amounts. That two-tier setup cuts alert fatigue while making sure high-value delays get seen immediately.
Want me to build this for you instead?
Product Audit and CTO Mode run out of this same thinking. If you’re reading this thinking “I want this, but in my product” — let’s talk.
See servicesMore like this
Google Analytics 4 + HubSpot Lifecycle Stage: Weekly Acquisition-Quality Digest to Slack via Pipedream with Claude Narrative
Stop reporting traffic numbers. Report whether the traffic you paid for last week actually became pipeline — with a one-paragraph executive summary written by Claude.
Gmail Thread Aging + Stripe Invoice Overdue: Unified AR Follow-Up Digest to Slack via Zapier
Surface overdue Stripe invoices and the exact age of your last Gmail thread with that customer — every morning at 8:30, automatically — so AR follow-up stops living in someone's head.
Outlook Calendar Load + HubSpot Deal Velocity: Weekly Ops Digest to Microsoft Teams
Every Monday at 07:30, your revenue team gets one Teams card: last week's deal pipeline movement next to each rep's actual meeting load — so you stop guessing whether low close rates are a pipeline problem or a capacity problem.