diff --git a/packages/sync-engine/src/supabase/edge-functions/stripe-webhook.ts b/packages/sync-engine/src/supabase/edge-functions/stripe-webhook.ts index abae828d..ff5dc2a1 100644 --- a/packages/sync-engine/src/supabase/edge-functions/stripe-webhook.ts +++ b/packages/sync-engine/src/supabase/edge-functions/stripe-webhook.ts @@ -26,8 +26,9 @@ Deno.serve(async (req) => { }) try { - const rawBody = new Uint8Array(await req.arrayBuffer()) - await stripeSync.webhook.processWebhook(rawBody, sig) + const rawBody = await req.arrayBuffer() + const bodyString = new TextDecoder().decode(rawBody) + await stripeSync.webhook.processWebhook(bodyString, sig) return new Response(JSON.stringify({ received: true }), { status: 200, headers: { 'Content-Type': 'application/json' },