#ferrancabrera
1 messages · Page 1 of 1 (latest)
hi! well to be clear, stripe.webhooks.constructEvent actually works fine even if no API key was provided, since it doesn't make an API call
really?
so the object received as a request.body can be readable as a plain object right?
to answer your more general question this is what I usually do in Node
const stripe = require("stripe")(STRIPE_KEY,{apiVersion:"2023-08-16"})
const stripeUS = require("stripe")(US_ACCOUNT_KEY,{apiVersion:"2023-08-16"})
let si = await stripe.setupIntents.create({
usage:"off_session", payment_method_types:["card","sepa_debit"]
})
let si_usAccount = await stripeUS.setupIntents.create({
usage:"off_session", payment_method_types:["card","sepa_debit"]
})
not sure what you mean exactly
I would like to know with stripe instance should I use when I recieve the payment_intent.succeeded trigger
that's all
well the thing is you can't know that if you are using the same URL for multiple Stripe accounts
so don't do that, use separate URLs for each webhook endpoint. Or do things like make your webhook URL https://mysite.com/webhook?account=ACCOUNT_1