Because we do not "own" the checkout experience (we embed a Stripe-managed widget), we don't actually know if the checkout was successful. (The user could have been been charged, and is good to go. Or maybe they hit cancel, etc.)
The behavior of the Stripe page is that when it is "finished" (via success or not), it will redirect the user to a fixed URL.
Today, that is the "welcome page". Stripe redirects the user to something like:
.../welcome?checkout-session-id=xxxxxxx
When the welcome page loads, we then read that session ID, and make an API call to the backend. Which we then pass to Stripe to find out the result of the checkout flow. (e.g. did the user actually complete their purchase? What was the billing cycle, or seat count, etc.)
Once the backend returns that information, today, we just show one of several static messages:
[success]
"Get Started with Cody"
[error]
"There was an error processing your request. Please refresh the page"
[indeterminate]
"It looks like the checkout session is still processing. Please refresh the page."
So if we just had three different "banners" on the dashboard page that would work. (There isn't much in the way of additional information available to show the user.)
This issue is marked as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed automatically in 5 days.
From Chris Smith:
Because we do not "own" the checkout experience (we embed a Stripe-managed widget), we don't actually know if the checkout was successful. (The user could have been been charged, and is good to go. Or maybe they hit cancel, etc.)
The behavior of the Stripe page is that when it is "finished" (via success or not), it will redirect the user to a fixed URL.
Today, that is the "welcome page". Stripe redirects the user to something like:
.../welcome?checkout-session-id=xxxxxxx
When the welcome page loads, we then read that session ID, and make an API call to the backend. Which we then pass to Stripe to find out the result of the checkout flow. (e.g. did the user actually complete their purchase? What was the billing cycle, or seat count, etc.)
Once the backend returns that information, today, we just show one of several static messages:
[success] "Get Started with Cody"
[error] "There was an error processing your request. Please refresh the page"
[indeterminate] "It looks like the checkout session is still processing. Please refresh the page."
So if we just had three different "banners" on the dashboard page that would work. (There isn't much in the way of additional information available to show the user.)