sharetribe / web-template

Sharetribe Web Template - starting point to create a client app to your marketplace
Other
31 stars 136 forks source link

Change business URL for Stripe's onboarding #430

Closed Gnito closed 3 months ago

Gnito commented 3 months ago

Stripe's onboarding needs a business URL for each seller, but the profile page can be too empty for the provider at the time they are creating their first listing. (It can just show "Hi, I'm John".)

The profile page does not even have a listing at the time, because provider needs to have valid Stripe Connect account before a listing can be published (i.e. before it's bookable for customers).

To remedy the situation, this PR redirects Stripe's crawler to the landing page of the marketplace (with HTTP status 302).

The reason, why we didn't just send LandingPage URL, is that it gives the possibility to improve the ProfilePage later. E.g. when there's more content on the profile page, it's possible to consider by-passing this redirection. This way Stripe gets user-specific URL, which they can inspect later on.

Anyway, there's not enough information atm. about how much and what kind of content Stripe's evaluation algorithm needs. Although, LandingPage seems to satisfy it.

Future: we are also going to add support for private marketplaces, which means that Stripe won't be able to access profile page at all. This is another scenario, where redirection to LandingPage makes sense.