Stripe Checkout Not Working After Deploying on Cloudflare

I am deploying a simple next JS application with a client side stripe checkout redirect. In test mode, everything was working fine, however, when I deployed to Cloudflare, I get a 405 error when I try to initiate the Stripe checkout. I double checked that I swapped out my test API keys for live keys correctly. Are there any basic Cloudflare configurations that I am missing in order for Stripe redirect to work? Again, everything is working locally which makes me believe Cloudflare is blocking something.

If this is being done on the client, can you see in the console why the error is there? It’s most likely a cross-origin issue. Do you have the security header managed transform enabled on Cloudflare?

@sjr ^

What does the browser console show about the 405 error? You do have the security headers in that screenshot.

It just says net::ERR_ABORTED 405 (Method Not Allowed)

Do we have to make a custom rule to allow stripe IP addresses?

…and that’s a call from the browser to Stripe? If so, Cloudflare is not involved in that request so I’m still thinking it’s a cross-origin issue. Compare the headers between when using Cloudflare and when not using it.

I just don’t understand why the identical configuration is working on other deployment platforms