#dnewel_best-practices
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1303049878942777434
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
@sleek dagger I don't fully grasp your question I'm sorry. Looks like you are already deep talking about this with support and were told "things"
sorry, not a lot of space to give full context ๐ yes, we've reached out to support, but because the recipient isn't in the same country and me, i can't just hand them the keys to my account. Migrations team isn't able to move connected accounts from one Connect account to another Connect account, so i'm left with trying to figure out how to essentially get all new and future users onto the new account and let the old ones churn out over time...
I have a wordpress plugin that uses Stripe Connect that i need to pass on to someone else
Usually what you do is transfer ownership of the Stripe account that owns the "platform" to its new owners. Like selling a company
ah lol okay now there's the big issue
yup ๐
There isn't really any way other than create a new account and onboard the new users on the new account. I'm assuming support already told you all of this in details so I'm trying to figure out what you need help with sorry
yeah, what i'm trying to figure out is what do i need to do to try and handle both accounts at the same time. i'm assuming i "just" need to change the key that's used to connect to stripe, but i was hoping someone else had gone through this before and had an idea of how to safely identify customer account and map them to the right connect account. esp if they were to e.g. clear the stripe connection in the plugin and re-do the connect setup (which i'm hoping we could use to try and get some users to move)
I don't get the question again. It's like 2 completely separate questions mixed together
You are a Connect platform, you have your own Stripe account and API keys.
You have connected accounts such as acct_1234 and acct_ABC and you know who those are.
What's the problem framed the way I'm explaining things?
i'm assuming i "just" need to change the key that's used to connect to stripe
for example that sentence confuses me a bit. You're using Stripe Connect as a product but also say the API keys are used to "connect"
sorry, just got on a call. i'll come back in a bit and will formulate this better
all good though we help in real time here so your thread might be closed by then but you can open a new one if so
ok. i'm back. because it's a wordpress plugin and i can't fully control where the code runs, all requests to Stripe passes through a "middleware" like server that i'm running. It receives the request (e.g. create payment_intent) along with the merchant's account (acc_1234), turns around and asks Stripe the same thing using my connect secret key and the information it gets from the plugin. The response will be sent back to the plugin after that.
The problem is how to change the current setup so that e.g. acc_1234 continues to use my Connect account (A), but any new account, e.g acc_ABC, will use the other connect account (B).
we just came of with something that we think might work though. If we were to setup a new middleware server that uses Connect account B, we could release a new version of the plugin that uses the new server. Old versions of the plugin would continue to use the old server (connected to A) but new users would end up being connected with B.
this does mean a breaking change for the plugin, and users will need to disconnect and reconnect their stripe account, but it feels like the simplest option
Aren't you transferring ownership of the server and all of its code? You have a server that gets hit and says "acct_1234 wants a PaymentIntent". You know who acct_1234 is, you know it's connected to your original version of the plugin. Later when acct_ABCDE connects to the new platform you will know they are on the new platform
true, but it currently has no state. I could give it a hard coded list of "these are the old accounts; send them to Connect account A" but that would be an issue if the plugin user disconnects and reconnects again as they'd still end up on connect account A, right?
i figured cloning the server would make it simpler, as it could also update the url of the middleware which would force people to reconnect
So you get any kind of attacker sending whatever object id to you and you do no authentication or verification?
So you have no clear list of all your connected accounts, what state they are in, if any is risk rejected or disabled or if requirements are needed? You just make an API request, if it fails it fails?
basically, yes
Damn ๐
well if it were me I'd start tracking those for new users at the very least.
๐ it's a proxy service, and you guys do a great job at making sure no one does stupid stuff ๐คทโโ๏ธ
it's been on my list for some time to keep better track (outside of logs) but just haven't gotten to it
do you think there are other options if we keep track of the users? in my mind most ideas fall down when i think about merchants disconnecting and reconnecting...
yeah but what "fall down" is mostly because we're spitballing and rushing. If you sit down and sketch this out carefully it should just work.
I don't really get the "disconnecting and reconnecting" part at all right now.
For anyone to be connected to one of your Connect platforms, your own code has to make the connection happen which means you know exactly who is connecting and to which platform
right, "disconnecting and reconnecting" means that the merchant can remove any stripe configuration from their plugin and go through the connect flow again, without me knowing it.
i guess i could build out a hook that calls the middleware to make it aware of the change...and the next time to plugin wants to connect it gets the new connect account (B) instead of the old (A).
and rushing yeah...i'm trying to get rid of it because i don't have any more spare time to work on it ๐ i think i have two viable options now at least; i'll chat with the recipient to see what they want to do and how much they can do on their own
thanks @verbal cypress !
go through the connect flow again, without me knowing it.
but that's impossible. Your own code/server has to make a specific API request to connect that account to your platform. You absolutely would know about it (assuming you log/store data). Your own code does this
well...right not it just clears the local setup and tries again. there's been some whacky issues that was solved that way ๐คทโโ๏ธ but yeah, assuming the middleware server was aware of accounts etc., it would be possible to keep track of these things. That's my option two right now; make it store data and keep track of things
That's what I would do instead of having a breaking plugin update which would segment all your users over time
You can also use the List Accounts API https://docs.stripe.com/api/accounts/list to find all accounts you're currently connected to, store this in a database with the info that they are connected to the old platform, etc.
gotcha. i was thinking a csv export from the dashboard, but the API would work too, esp. if accounts disconnects from us and just remove the plugin (in that case we wouldn't know they'd left). The integration is fairly minor right now as it was a bit of an experiment; i'd hoped it would get more traction than it did, and would get back to it once that happened ๐คทโโ๏ธ
in that case we wouldn't know they'd left
so you don't listen to Events from connected accounts with a Connect WebhookEndpoint either? ๐
nope ๐ it's a really thing layer right now
Gotcha, that makes things much harder than what a normal plugin would have done. And makes selling it a bit stranger to me if you don't sell the existing user base
I have to run but @rain pendant can answer more questions if you have any!
Summary: They are a plugin using Stripe Connect and OAuth. They are selling their business to another company that is based in a different country so that company can't take the platform account over. They will need to create a brand new platform account and onboard new users on it (and reonboard older users on it too)
The plugin calls their server to make requests but the server stores nothing (no list of account ids, requirements, when they were onboarded, etc.).
Thanks for the summary, and @sleek dagger what aspect of that are you still looking for advice on?
thanks @verbal cypress ! i'm trying to sell the existing user base ๐ but it's not easy in this case
๐ @rain pendant i think i'm good for now. I'll see what the recipient is up for in terms of solutions, but at least i have two approaches that would work. The ideal solution would have been to "simply" disconnect the connected accounts from my stripe account, and reconnect them to the recipient account, but that doesn't seem to be possible yet ๐คทโโ๏ธ