Stripe and payment link

Hello @Gabry2887,

Just to clarify, is the issue that you are unable to redirect the user to a Stripe Checkout Session at another URL?

Or that you are not able to access the email from the form in Retool to add into the database?

I just checked the Stripe API docs and it appears that if you want to open up a Stripe-hosted payment page (i.e., a Stripe Checkout session), you use the endpoint

POST /v1/checkout/sessions

This endpoint of the API creates a Checkout Session, which includes a url field. Redirecting the user to this URL takes them to the Stripe-hosted payment page. The URL will be in the Stripe server's Response and look something like this in the JSON

{
  ...
  "url": "https://checkout.stripe.com/pay/cs_test_..."
}

So on button click in the form, you would fire this query, get the response and then redirect the user to this checkout page. I would guess that once the payment is completed, the API would return some kind of success response.

Then once you get that payment conformation, you can add the email from form1.data.email to your database with a post request.

Is the issue that you need to pass form data to the Stripe page? It appears that the Stripe API also has a Payments Intents API that is able to complete transactions directly from a JSON payload. Which you could create via a Retool Query and passing in the data from the form component!