Add new response if request contains account id (#2629)
Co-authored-by: Omar López <zomars@me.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>pull/2674/head
parent
e76fafdccf
commit
c4dbab2637
|
@ -174,6 +174,10 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
|||
|
||||
const event = stripe.webhooks.constructEvent(payload, sig, process.env.STRIPE_WEBHOOK_SECRET);
|
||||
|
||||
if (event.account) {
|
||||
throw new HttpCode({ statusCode: 202, message: "Incoming connected account" });
|
||||
}
|
||||
|
||||
const handler = webhookHandlers[event.type];
|
||||
if (handler) {
|
||||
await handler(event);
|
||||
|
|
Loading…
Reference in New Issue