Stripe payment alerts with Trigv push notifications
Send Trigv push notifications for Stripe payments, invoices, subscriptions, and failed charges. Use Zapier for a no-code setup, or send verified Stripe webhooks from your own backend.
Best uses
Failed payments
Alert immediately when a card fails, a renewal does not collect, or revenue needs attention.
New revenue
Send high-signal notifications for successful Checkout sessions, invoices, and payment intents.
Subscription changes
Track cancellations, trial conversions, upgrades, and other customer lifecycle events.
Choose an integration path
| Path | Use it when |
|---|---|
| Zapier | You want Stripe payment alerts without writing webhook code. |
| Custom webhook | You already have an app or serverless function that can verify Stripe signatures. |
Recommended Stripe events
checkout.session.completedfor completed Stripe Checkout purchases.payment_intent.succeededfor captured payments.payment_intent.payment_failedfor failed card payments.invoice.paidfor paid subscription invoices.customer.subscription.deletedfor cancellations.
Webhook setup
- Create a webhook endpoint in the Stripe Dashboard and select the events you want to monitor.
- Copy the Stripe signing secret and store it in your server environment.
- Verify the Stripe signature before sending anything to Trigv.
- POST a concise payment notification to the Trigv event API.
Node.js example
This example sends a Trigv alert when a Stripe payment fails.
Code
import Stripe from "stripe";
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY);
export async function handleStripeWebhook(req, res) {
const signature = req.headers["stripe-signature"];
const event = stripe.webhooks.constructEvent(
req.rawBody,
signature,
process.env.STRIPE_WEBHOOK_SECRET
);
if (event.type === "payment_intent.payment_failed") {
const payment = event.data.object;
await fetch("https://api.trigv.com/api/v1/events", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.TRIGV_API_KEY}`,
},
body: JSON.stringify({
channel: "payments",
title: "Stripe payment failed",
description: payment.last_payment_error?.message || "Check Stripe",
level: "error",
event_type: "stripe.payment.failed",
url: `https://dashboard.stripe.com/payments/${payment.id}`,
}),
});
}
res.json({ received: true });
} Troubleshooting
| Issue | Fix |
|---|---|
| Webhook retries | Return HTTP 200 quickly after verifying and enqueueing work. |
| Invalid signature | Use the exact signing secret for the Stripe endpoint and mode you are testing. |
| No Trigv push | Check the Trigv API key, channel subscription, and webhook logs. |