Help me fix a syntax error implementing Stripe elements with a Firebase cloud function

Job ID: 32216085

Budget: $10 – $30 USD

I'm attempting to implement a basic Stripe elements form on my web app using Firebase cloud functions as the back-end. On StackOverflow, someone described the solution to the problem I am having, but I've been unable to fix it.

Here is a description of the problem and the solution.

https://stackoverflow.com/questions/70138413/unable-to-call-firebase-cloud-function-from-client-side-with-fetch

If you're able to correct the function for me, please bid the amount you can help for.
Related categories: JavaScript Google Firebase