#mukul-bhardwaj_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1352217840303734844
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
๐
Could you please share a webhook endpoint Id and an eventId that you were expecting it on your webhook nedpoint
Please share Stripe Object Ids
What action are you making in order to generate this event ?
account = await stripe.accounts.create({
type: 'express',
country: 'US',
email: dbUser.email,
capabilities: {
transfers: { requested: true },
},
}); }
const onboarding = await stripe.accountLinks.create({
account: dbUser.stripeCustomerId,
type: 'account_onboarding',
refresh_url: 'https://example.com/reauth',
return_url: 'https://example.com/return',
});
There is no update action from these api calls
it generate a link url to update kyc documents
Yes but the account.update will be generated at the end of the onboarding
yes i also awaiting this to fire but it does not trigger
Try making an update via the API bfore starting the onboarding:
https://docs.stripe.com/api/accounts/update
ok testing
Hi there ๐ jumping in as my teammate needs to step away soon. Do you see account.update Events getting generated, but they just aren't being sent to your endpoint? If so, can you share the ID of one of those Events? That ID should have a evt_ prefix.
one more important thing i forget to tell that after completing the kyc verification which is generted through this method await stripe.accountLinks.create() event are not even visible in my stripe dashboard
Is that your Platform's Stripe Dashboard? If so, they aren't expected to show there, I'm pretty sure.
yes
Are you able to share the ID of a Connected Account that you're testing with?
this is how why web hook is set
That endpoint isn't listening for Events from your Connected Accounts, it's listening for Events from your Platform account.
If you want to listen to Events from your Connected Accounts, you need to create a new webhook endpoint that is configured to do so.
This option if you're creating those through the dashboard:
Or by setting connect to true if you're creating them via the API:
https://docs.stripe.com/api/webhook_endpoints/create#create_webhook_endpoint-connect
like this?
Yup
ok can i use same end point here ??
Yes
ok i am just testing thanks
Any time!
hi now event start triggering but it shows this but this is a
export async function handlePaymentRedirect(
req: Request,
res: Response,
next: NextFunction,
) {
const sig = req.headers['stripe-signature'];
const rawBody = req.body;
try {
if (!sig) {
return res.status(400).send('Missing Stripe signature');
}
const event: Stripe.Event = Stripe.webhooks.constructEvent(
rawBody,
sig,
process.env.ENDPOINT_SECRET,
);
console.log('webhook invoked', event.type);
await paymentQueue.add('payment-processing', event, {
attempts: 4,
backoff: {
type: 'fixed',
delay: 30000,
},
});
res.json('received');
} catch (err) {
next(err);
}
} this is the same controller that is using by other webhook event and this route that is associated with this controller have raw type router.post(
'/webhook',
express.raw({ type: 'application/json' }),
ReservationAuthRoute.handlePaymentRedirect,
);
Did you swap the signing secret used by your event handling code? Since each webhook endpoint generates their own unique signing secret that has to be used to verify signatures generated for Events sent to that webhook endpoint.
no i didnt swap
That's likely the problem then, but let us know if updating your ENDPOINT_SECRET environment variable doesn't resolve the issue.
thanks a lot it works