Stripe integration Uncaught (in promise) IntegrationError: fetchClientSecret failed with error "JSON.parse: unexpected character at line 1 column 1 of the JSON data"

Right now I am trying to integrate Stripe into my webpage.
I followed everything from this tutorial: Using Stripe Embedded Checkout.

These are my settings:
error3

And these are the errors I am getting when trying to load the embedded checkout on the frontend page:

This is, what I get sent as a status from stripe (though it is a code 200):
error2

I don't know what to do anymore.
I even checked the data storage in the browser already if something may have malformed, but it was to no avail.
The priceid from stripe is saved in the "price" value and the quantity of the items is saved in the "quantity" value for each item.

I don't know what to do anymore.

For everyone getting this error.

DO THE FOLLOWING:

  1. Check if your data store is correctly formed! Differentiate in this menu between "WHICH" and "UPDATE" when you follow this tutorial: Wappler Documentation - Using Stripe Embedded Checkout and especially this one, when it comes to setting up multiple products: Wappler Documentation - Getting Started with Stripe Integration in Wappler
    correct2

AND MAKE SURE TO DEACTIVATE CSRF-TOKENS ON NODEJS OR DEACTIVATE IT IN THE SETTINGS FOR THE API ACTION YOU ARE USING!

  1. If you get the following error:

a) Check the server logs for errors!
My issue was that the embedded type of the checkout doesnt accept a success url or cancel url.

b) Another Solution: Check if your server action even still exists. Because of the CSRF bug, when deactivating CSRF again, the stripe server action can somehow transform.

1 Like

Yes just the return url. I see you have paypal as an option, when I tried it a while back, it didn't work. Is there something in your stripe dashboard you had to integrate with a paypal account somewhere?

I am running a test environment right now, so no. I don't know how it would behave in production though.

It appears it needs to be activated in the stripe dashboard. Some payment methods also require domain verification, but unfortunately, paypal doesn't appear in my dashboard.

Oh. For me it does appear in the dashboard. Maybe write to the stripe support?