diff --git a/website/server/libs/stripePayments.js b/website/server/libs/stripePayments.js index 476c2d6e7f..a5ac73ae8b 100644 --- a/website/server/libs/stripePayments.js +++ b/website/server/libs/stripePayments.js @@ -286,11 +286,8 @@ api.handleWebhooks = async function handleWebhooks (options, stripeInc) { let stripeApi = stripe; if (stripeInc) stripeApi = stripeInc; - const eventJSON = JSON.parse(requestBody); - console.log(eventJSON); - // Verify the event by fetching it from Stripe - const event = await stripeApi.events.retrieve(eventJSON.id); + const event = await stripeApi.events.retrieve(requestBody.id); console.log(event); switch (event.type) {