Currently have a web app hosted on github pages.
I want to use firebase functions + stripe to handle payments.
I have most things set up and now am calling the method stripe.redirectToCheckout({ sessionId })
However, on a successful payment, I want to update the database but I don't see an option add a callback. It only redirects me to a success/failure page. Im thinking of maybe redirecting back to the webapp but with some queryParams. Then check if query param is there on page load, update DB. But that seems incorrect and people could just then navigate to the specific URL to be added into the database.
How do I achieve what I am trying to do?