While working on an app that connects with Stripe Accounts, I ran into an issue. If an account already exists for a given email, I can't create a new one. Stripe throws an error.
But how do I connect to that existing account? I can't find anything anywhere to do so.
For clarity, the failing code is:
Stripe::Acount.create(managed: false, email: 'Foo@UserEmail.address')
I'm creating a Stripe::Account
object, not a Stripe::Customer
object. The above code throws an exception if the email already exists on Stripe's API, but does not provide me with any information to connect with it.
My concern is if a user who already has a Stripe account attempts to join the site, how do I link them up.