We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa8cd52 commit ab6b83bCopy full SHA for ab6b83b
src/app/api/stripe/webhook/route.ts
@@ -84,16 +84,20 @@ export async function POST(req: Request) {
84
}
85
} catch (error) {
86
console.log(error);
87
+ // We dealing with webhooks return a 200 to acknowledge receipt of the event
88
return new Response(
89
"Webhook handler failed. View your Next.js function logs.",
90
{
- status: 400,
91
+ status: 200,
92
},
93
);
94
95
} else {
96
+ console.log(`❌ Unhandled event type: ${event.type}`);
97
+
98
99
return new Response(`Unsupported event type: ${event.type}`, {
100
101
});
102
103
return new Response(JSON.stringify({ received: true }));
0 commit comments