I'm using a Stripe webhook to listen for events after a successful purchase (checkout). After the purchase is complete, I need to trigger a POST request.
Here’s how the flow works:
On the front-end, I have a form that collects the necessary data (which will be sent via the POST request).
I pass this data as metadata in the Stripe webhook event.
Inside the webhook handler, I process this metadata, buffer the data (in base64 format), and send it to an S3 bucket.
However, Stripe is throwing an error claiming that the body of the request is too large due to the base64 encoding.
How can I send all the form information to Stripe Webhook without having this body size limit error?
Any suggestions on solving this flow would be greatly appreciated!