Automattic / woocommerce-payments

Accept payments via credit card. Manage transactions within WordPress.
https://wordpress.org/plugins/woocommerce-payments/
Other
173 stars 69 forks source link

Allow merchants to reset the onboarding progress when onboarding is not completed #3468

Closed dechov closed 10 months ago

dechov commented 2 years ago

Unlike with the prior (OAuth) onboarding flow, the current ("Account Links") flow creates an account at the start of onboarding, and cannot be restarted by re-entering the flow (following the recommendation in this doc).

We've seen a number of reports of the merchant needing to return to an earlier point in the KYC flow (to change country or business type, for instance). We've also seem reports of merchants getting emails from Stripe due to not completing the flow, and asking for the account to be deleted.

We could solve both cases simply by allowing the merchant to delete their existing account, perhaps in some post-onboarding cases as well (see https://github.com/Automattic/woocommerce-payments/issues/2459) but particularly when the onboarding isn't complete, which would restore the prior ability to start the onboarding anew.

Here is one proposed way of presenting this action, though it's wide open to design review:

reset-account-mockup

Since a) the button should only show up when there is an existing account, b) the server doesn't currently return any indication for accounts that haven't completed onboarding, and c) it's likely not possible to return such a (non-empty) indication from GET /accounts in a backwards-compatible way, we'll just have to decide on some way to encode the not-fully-onboarded state in the server response and have it depend on a plugin version check.

An alternative design that doesn't need this information could be simpler to implement – for instance, a less prominent action (in WooCommerce » Status » Tools?) that just resets the account whether it's already reset or not – but would be less discoverable.

h/t @ricardo for raising this in p1638242085417400-slack-C01BZUL57SQ – some discussion ongoing in that thread.

daquinons commented 11 months ago

Trying to move the idea forward here paJDYF-bmj-p2

daquinons commented 11 months ago

Design image

vladolaru commented 10 months ago

For the sake of clarity on requirements:

  1. Client-side: Links/buttons for reset will be shown if:
    • onboarding has been started (there is an account created)
    • onboarding hasn't been finished (details_submitted:false)
    • the account is live (for test accounts, we have other routes to switch from test to live)
      1. Client-side: Provide general info on error and instruct the merchant to reach out to HEs (probably via a text/label next to the button/link.
      2. Server-side:
        • Flag the WPCOM blog ID (via meta) that its WCPay account was reset (with timestamp)
        • Throttle resets per WPCOM blog (using the timestamp above) to at least once per 30 minutes.
        • Do not leak the reason why an account can't be reset to the client, only generic error/success.
daquinons commented 10 months ago

Adding into "Server-side" as well: