This topic was automatically generated from Slack. You can find the original thread here.
Hi everyone**, I’m running into an issue with a Pipedream workflow that should return JSON but keeps returning HTML instead.**
Here’s what I’m doing:
• I’m receiving a form submission via webhook (email + password)
• Then I generate a UUID in a code step and pass it along
• I save the record to Airtable
• Then I call Stripe to create a Checkout Session via custom_request1, passing the UUID into metadata[uuid]
• Finally, in the Return_Checkout_stripe_link step, I want to return the Checkout URL in JSON like this:
Stripe session is being created successfully But the response still returns HTML (like <p><b>Success!</b></p>) — which crashes my frontend with a SyntaxError: Unexpected token '<' when trying to await response.json() on the redirect page.
Is there something I’m missing in the way I’ve configured the final return step? How do I make sure the webhook sends clean JSON back to my frontend?
Hey , unfortunately Pipedream doesn’t have control over your Wordpress elementor, hence, we do not now why it is failing with that error, and we can not resolve it on Pipedream side.
I would recommend you to manually test your workflow to see if the webhook returns valid JSON with the valud stripe checkout_url
I understand that, the webhook does not return valid JSON with the url. That is ultimately the problem. Pipedream isn’t sending the format required, only html it appears.
I really appreciate this, I edited my body in the http return to meet yours with my own values… the webhook is still failing. I thank you for trying to help me with this.