Adds parseEventNotificationAsync to match existing sync function#2685
Adds parseEventNotificationAsync to match existing sync function#2685xavdid merged 2 commits intostripe:masterfrom
parseEventNotificationAsync to match existing sync function#2685Conversation
|
|
1 similar comment
|
|
|
Thank you for the submission and sorry for the bug. Looks like the formatter needs to run but the PR itself looks good.
Yeah, we'll get that cleaned up on our end, no worries. |
parseEventNotificationAsync to match existing sync function
|
Which version includes this? I cant find it in my node_modules yet. I'm with v22.0.1 |
|
@fredkzk We shipped this in our latest v22.0.2 release. |
Why?
In environments like Supabase Edge Functions (Deno), Cloudflare Workers, and Vercel Edge:
constructEventAsyncdoes not supportv2.core.eventwebhooksstripe.parseEventNotificationparseEventNotificationrelies on a synchronous crypto providerThis results in the runtime error:
Since these environments only support asynchronous cryptography, there is currently no way to validate
v2.core.eventwebhooks.What?
parseEventNotificationAsyncimplementationUsage
Notes
constructEventAsync)constructEventandconstructEventAsyncSee Also