Send payment confirmation emails, invoices, and subscription notifications with Unosend and Stripe webhooks.
Everything you need to send emails from Stripe
Webhook event handling
Payment confirmation emails
Invoice notifications
Subscription updates
Receipt generation
Get up and running in minutes with this code example
// Handle Stripe webhook events
import { Unosend } from '@unosend/node';
import Stripe from 'stripe';
const unosend = new Unosend(process.env.UNOSEND_API_KEY);
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY);
async function handleWebhook(event: Stripe.Event) {
switch (event.type) {
case 'payment_intent.succeeded':
const payment = event.data.object as Stripe.PaymentIntent;
await unosend.emails.send({
from: 'billing@yourdomain.com',
to: payment.receipt_email!,
subject: 'Payment Confirmed',
html: `
<h1>Thank you for your payment!</h1>
<p>Amount: ${(payment.amount / 100).toFixed(2)}</p>
<p>Payment ID: ${payment.id}</p>
`,
});
break;
case 'invoice.paid':
const invoice = event.data.object as Stripe.Invoice;
await unosend.emails.send({
from: 'billing@yourdomain.com',
to: invoice.customer_email!,
subject: 'Invoice Paid',
html: `<p>Your invoice ${invoice.number} has been paid.</p>`,
});
break;
}
}Follow these steps to integrate Unosend with Stripe
Set up Stripe webhook endpoint
Configure webhook events (payment_intent.succeeded, invoice.paid, etc.)
Install @unosend/node and stripe packages
Handle events and send appropriate emails
Automated payment notifications
Custom branded receipts
Real-time subscription updates
Professional invoice emails
Start sending emails from Stripe in under 5 minutes. Free tier includes 5,000 emails/month.