← back to NationalPaperHangers
scripts/stripe-list-webhooks.js
14 lines
#!/usr/bin/env node
const path = require('node:path');
require('dotenv').config({ path: path.resolve(__dirname, '..', '.env') });
const Stripe = require('stripe');
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, { apiVersion: '2024-10-28.acacia' });
(async () => {
const list = await stripe.webhookEndpoints.list({ limit: 100 });
console.log('total:', list.data.length);
for (const ep of list.data) {
console.log(`${ep.status.padEnd(8)} ${ep.id} → ${ep.url} (${ep.enabled_events.length} events)`);
}
})();