← back to NationalPaperHangers
snapshot: 2 file(s) changed, +1 new, ~1 modified
d8b8e58b9dd58e084518a806a86b7b9af92846c8 · 2026-05-13 08:57:57 -0700 · Steve
Files touched
M .gitignoreA scripts/stripe-events-binary.js
Diff
commit d8b8e58b9dd58e084518a806a86b7b9af92846c8
Author: Steve <steve@designerwallcoverings.com>
Date: Wed May 13 08:57:57 2026 -0700
snapshot: 2 file(s) changed, +1 new, ~1 modified
---
.gitignore | 1 +
scripts/stripe-events-binary.js | 17 +++++++++++++++++
2 files changed, 18 insertions(+)
diff --git a/.gitignore b/.gitignore
index 2947e6a..c57eeb2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,3 +12,4 @@ uploads/
# Standing-rule additions (2026-05-07)
build/
.next/
+.deploy.conf
diff --git a/scripts/stripe-events-binary.js b/scripts/stripe-events-binary.js
new file mode 100644
index 0000000..0957952
--- /dev/null
+++ b/scripts/stripe-events-binary.js
@@ -0,0 +1,17 @@
+const path=require('node:path');require('dotenv').config({path:path.resolve(__dirname,'..','.env')});
+const Stripe=require('stripe');const s=new Stripe(process.env.STRIPE_SECRET_KEY,{apiVersion:'2024-10-28.acacia'});
+const url='https://nationalpaperhangers.com/webhooks/stripe';
+const events=['payment_intent.succeeded','payment_intent.payment_failed','payment_intent.canceled','checkout.session.completed','customer.subscription.created','customer.subscription.updated','customer.subscription.deleted','invoice.payment_succeeded','invoice.payment_failed','account.updated'];
+(async()=>{
+ for(let n=1;n<=events.length;n++){
+ const sub=events.slice(0,n);
+ try{
+ const ep=await s.webhookEndpoints.create({url,enabled_events:sub});
+ console.log(`OK n=${n}`,sub[n-1],'→',ep.id);
+ await s.webhookEndpoints.del(ep.id);
+ }catch(e){
+ console.log(`FAIL n=${n}`,sub[n-1],'→',e.message.slice(0,150));
+ break;
+ }
+ }
+})();
← 6346a38 wia-bb: log session-minutes to cost-tracker via shared helpe
·
back to NationalPaperHangers
·
claimLimiter: widen to 100/hr in non-prod so back-to-back e2 0cf8dae →