Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate free connector program enrollment with backend before showing success/error UI notifications #22302

Closed
ambirdsall opened this issue Feb 2, 2023 · 0 comments · Fixed by #22289
Assignees
Labels
airbyte-cloud area/frontend Related to the Airbyte webapp autoteam team/compose type/bug Something isn't working

Comments

@ambirdsall
Copy link
Contributor

After a user goes through the Stripe checkout page, Stripe simultaneously redirects them to the successUrl we provide and sends a request to a webhook of ours. For a small number of users, this webhook is not successfully processed, preventing us from recognizing them as enrolled and billing accordingly; we should not show any confirmation UI until we have verified with the Airbyte cloud backend that the webhook has been processed correctly. The initial implementation didn't account for this, and triggered the confirmation UI as soon as the user navigated to the successUrl; this needs to be updated. Lots of context in this slack thread.

So:

  • when a user navigates to a page whose render invokes useFreeConnectorProgram() with the fcpEnrollmentSuccess query param, start polling the FCP program info endpoint
  • if polled return value ever says hasPaymentAccountSaved is true, stop polling, hide enrollment banners, and show success UI
  • if some timeout is reached, show an error popup instead

One weakness of this approach: it cannot detect errors in a scenario where users try to update the payment account of record for a workspace. We don't currently have any UI to manage payment accounts, but we'll need it: it's a table stakes feature for actually doing any billing via the saved payment accounts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
airbyte-cloud area/frontend Related to the Airbyte webapp autoteam team/compose type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants