Karim Ahmed
Explore posts from serversCDCloudflare Developers
•Created by Karim Ahmed on 7/11/2024 in #workers-help
Issue Integrating Stripe with Cloudflare Workers: Script will never generate a response
I’m encountering an issue while integrating Stripe into my Workers project. Everything works perfectly in my local environment, where I can create Stripe checkout sessions and access the billing portal through an API endpoint that returns the URL for Stripe checkout. However, upon deployment to Cloudflare, sometimes I receive an internal server error with the message that the script never generates a response and sometimes it just works.
I’ve tried using both the Stripe SDK for Node.js and direct API calls, but both approaches result in the same error.
Here are the code snippets I’ve used:
Direct API Call:
Stripe SDK
The same issue occurs when creating a checkout session.
Has anyone faced a similar issue or have any ideas on how to resolve this? Any help would be greatly appreciated!
4 replies