#bmark_connect-payments

1 messages ¡ Page 1 of 1 (latest)

hallow dockBOT
#

👋 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. Thank you for your patience!

⏱️ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime! If this thread is closed and you have another question you'll need to start a new thread.

🔗 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/1213229722100699136

📝 Have more to share? You can add more detail below, including code, screenshots, videos, etc.

woeful tundraBOT
bright steeple
#

What api keys are you referring to? You shouldn't ever have to store connect account api keys

modest orbit
#

I meant the stripe account key, the ones that start with acct_...

bright steeple
#

Oh you can just store that in your database

#

Up to you on the specifics

modest orbit
#

If the merchant connects, disconnects, then reconnects with another account, is there a best practice on what to do in this case in terms of storing the account key?

bright steeple
#

No that's entirely up to you

modest orbit
#

We also shouldn't be disabling the merchant's payments capabilities as a whole if they disconnect with us right?

bright steeple
#

Correct

#

These are standard accounts I'm assuming?

modest orbit
#

Yes

bright steeple
#

Yeah they may want to use account in the future. I wouldn't disable anything

modest orbit
#

Another question -- If they disconnect with us via our dashboard, we'll still appear on their "Connected Applications" section? and they'll have to manually go in there and disconnect themselves?

#

also adding @ashen dew here

bright steeple
#

Not sure what your dashboard code does

#

So I can't answer that

#

But if you use the api to disconnect in stripe then your platform shouldn't show up there

modest orbit
#

Ok, do you have any idea if there's a best practice there or it's really up to us?

#

I've seen other ecommerce platforms just leave the connection there and let the merchant manually remove it from the "Connected Application" page on Stripe

bright steeple
#

Yeah completely up to you

#

Depends on if you want to disconnect them completely or not

modest orbit
#

Is there an advantage to doing one way or another?

bright steeple
#

Only if you need to maintain the connection in Stripe for some reason (you need access for some purpose)

modest orbit
#

Another question:

What happens if a merchant wants to conenct, disconnect, then reconnect same account. i.e.

Step 1: Merchant connects with their Stripe: acct_A. Our app stores the acct_A in our db. Our app is connected to merchant account on Stripe.

Step 2: Merchant disconnects their Stripe account acct_A on our app only. Our app removes acct_A in our db, but we retain a connection in merchant's Stripe account in the background?

Step 3: Merchant reconnects their Stripe account with acct_A . The only way to get the same Stripe API key back is to have the merchant manually input their API key into settings???

bright steeple
#

You could do it that way if you want

#

But also why not just keep a record in your database of the past connection

#

With a boolean connected=true/false

ashen dew
# bright steeple But also why not just keep a record in your database of the past connection

I believe this is the way we want to move forward, although we want to understand if there are any caveats with this (or alternative implementations).

Doing this seems to be the easiest way to re-enable our payments (which talks to Stripe Connect and creates payment links), otherwise if we did delete the connected account id there doesn't seem to be any way in the API to get the account back.

  • i.e. Stripe::Account.list returns the list of connected accounts, but on our side we won't have any field that is able to map to the Stripe account (since we've deleted the connected account id)

The only times we would want to remove the connected account id from our app is if:

  1. The merchant no longer wishes to use our service, then we can disconnect the integration between our app and Stripe Connect
  2. The merchant wants to start over with a new Stripe Connect account, so we would either replace the existing connect account id or allow multiple connected account ids (if we were to support multiple Stripe accounts for a single merchant which is not currently the case)
#

On another note, if we were to ever remove the Connected account from the parent account (belonging to our app), we will lose access to platform controls regardless if the merchant decides to re-connect or not.

So there's no reason for us to disconnect the Stripe account, and instead we should be doing a soft delete/disconnect of their payments (with the boolean connected you suggested above) if they want to put their payments on pause (the alternative to this would be to have the merchant go into their Stripe dashboard UI and pause payments themselves, which would be equivalent to us doing the soft delete/disconnect of their payments on our app).

^Is this correct?

bright steeple
#

Yeah but this is all up to you to code. If the connect account is still connected to your platform in stripe, it's possible for payments to continue

#

So you'd need to code out functionality to stop them

woeful tundraBOT
ashen dew
#

Yeah we need to allow merchants to choose if they want to make payments or pause payments.

@modest orbit It seems like we just need to determine how easy it is for them to do it between these options (or maybe others if I'm missing anything):

  • Option 1:

    • Merchant clicks "disconnect payments" button
    • Our app redirects the merchant to Stripe Connect dashboard, and they must pause their payments themselves.
    • Stripe API handles any prevention of payments.
    • Our app may or may not handle the prevention of this, and "could" let Stripe handle this
  • Option 2:

    • Merchant clicks "disconnect payments" button
    • Merchant is no longer able to create a payment via our app (however, is able to create payment links manually via the Stripe Connect dashboard)

Option 1 is the more "full" solution, but will be a more complex UX because the merchant needs to disable payments themselves.
Option 2 is the "minimal" solution, which handles what we need (disabling payments in our app) - and the merchant can feel free to create a payment link manually via Stripe UI

torn cipher
#

bmark_connect-payments

#

Option #2 is the only way you can do this, that's what I would do

#

We are working on a way to "pause" certain flows like payments or Payouts that might help but no ETA on releasing this

#

So most platforms in cases like yours they have a button to pause/activate payments and then that controls whether to collect payments for them or not

#

imagine you sell on Amazon, you don't want to delete your entire store/product catalog but you can likely tell Amazon "don't show my products for a couple of weeks" (I am wildly guessing here) and so Amazon would stop taking payments for them/showing their products

modest orbit
torn cipher
#

in your app right now

modest orbit
#

Ok, to clarify, you mean that:

  • Merchant is no longer able to accept payments from our apps
  • But they can still accept payments through their Stripe account in whatever way
torn cipher
#

yes

modest orbit
#

@torn cipher To confirm and clarify, this would be the recommended approach:

Step 1:

  • Merchant connects with their Stripe: acct_A.
  • Our app stores the acct_A in our db with enabled_for_payments = TRUE. - On Stripe, our app is connected to merchant account for acct_A

Step 2:

  • Merchant disconnects their Stripe account acct_A on our app only.
  • Our app turns acct_A in our db to enabled_for_payments = FALSE,
  • On Stripe, we retain a connection in merchant's Stripe acct_B in the background.

Step 3:

  • Merchant connects new Stripe account acct_B to our app.
  • Our app turns acct_B in our db to enabled_for_payments = TRUE.
  • On Stripe, Our app is connected to merchant account on Stripe for acct_B.
  • On Stripe we retain a connection in merchant's Stripe acct_A in the background.

Step 4:

  • Merchant disconnects their Stripe account acct_B on our app only.
  • Our app turns acct_B in our db to enabled_for_payments = FALSE,
  • On Stripe, we retain a connection in merchant's Stripe acct_B in the background.

Step 5:

  • Merchant REconnects their Stripe account acct_A on our app only. Stripe will let us know we've previously connected to this account.
  • Our app turns acct_A in our db to enabled_for_payments = TRUE,
  • On Stripe, we retain a connection in merchant's Stripe acct_A andacct_B in the background.
torn cipher
#

you lost me with that wall of text. What are acct_A and acct_B?

modest orbit
#

two different accounts

#

I guess the main question is:

after disconnecting an initial, the process for connecting a different account vs the same account again, should be the same

torn cipher
#

Yep the process will be the same

modest orbit
#

will stripe let us know that we were already connected before? since the connection still exists in the background?

torn cipher
#

I'm sorry I really struggle to follow you

#

what does that mean "the connection still exists in the background". I though you said they explicitly disconnected their account

modest orbit
#

For reconnecting existing connections, will stripe let us know that we were already connected before since the connection still exists in the background?

torn cipher
#

that's mostly the same sentence, I don't know what "the connection still exists in the background" could mean

modest orbit
#

Even if the merchant soft disconnects us on our app, the merchant will still have us as a "Connect Extensions" in the "Connect Extensions" page on Stripe here: https://dashboard.stripe.com/settings/apps

Sorry, there's a lot of connect/disconnect/reconnect going on here, apologies for the confusion

ashen dew
#

I believe what we are trying to do involves two scenarios:

Connect account, and add/disable payments (on our app)
1. Create `Stripe::AccountLink` , link to our parent account
2. Disable the payments via our app as mentioned in option 2 from [this previous message]([#1213229722100699136 message](/guild/841573134531821608/channel/1213229722100699136/))
3. Re-enable payments via our app by setting the boolean back to `true`
Connect a different account to our merchant (on our app)
1. Existing Stripe Connect account is already linked at this point
2. Create a new `Stripe::AccountLink`, link to our parent account
3. Associate the newly created connect account id to our app

This has nothing to do with disconnecting from Stripe

#

If we do not move forward with a soft delete/disable payments approach, we will have to get the admin on the Connected account to pause payments from their end (or remove their account entirely)
- Neither of these options is what we want, because:
- This creates more complexity for the merchant if they pause payments on their end
- We lose access to platform controls even if the merchant's connected account is removed, and added back to our parent account

torn cipher
#

we will have to get the admin on the Connected account to pause payments from their end
what does that mean? I'm really sorry I'm struggling to follow a lot of this

On Stripe there is no feature that lets anyone "pause payments" anywhere in any Dashboard. The only way to pause payments is to basically not accept payments in your code.

As long as you don't "disconnect" the Stripe account itself in the API (or them in the Dashboard) then there's no reason to "reconnect" anything either

ashen dew
torn cipher
#

well I had absolutely no idea this existed publicly. Wow.

ashen dew
#

As long as you don't "disconnect" the Stripe account itself in the API (or them in the Dashboard) then there's no reason to "reconnect" anything either
WRT this comment, I think the only thing that would involve "reconnecting" anything is if our app supported multiple accounts for a single merchant.

That too, however is handled on our app since the Stripe account link should have all of the merchant's accounts connected to the parent account. (and all we need to do is allow the merchant to choose which connected account id to use)

torn cipher
#

yeah I'm sorry you lost me again completely here with "account link" all merchant's" "parent account". totally lost again sorry

ashen dew
#

When we have a merchant, currently they can only have one connected Stripe account. We're using the ruby Stripe SDK which allows us to create a Stripe account, and then link to our "parent" account via an account link: https://docs.stripe.com/api/account_links (parent account belongs to us, and we have the connected accounts all being connected to our parent/original Stripe account)

torn cipher
#

Okay a few vocabulary recommendations:

  • parent account: we call this the platform account
  • account link: we say AccountLink usually and this is literally just for "onboarding" where we collect company/individual details for example. The "connected account" is already created/connected when your platform calls the Create Account API https://docs.stripe.com/api/accounts/create
ashen dew
#

Thanks @torn cipher, we (evi and I) have a bit of discussion to do and will be revisiting this topic in 2-3 hours.

Feel free to close this thread if you need to, and we can re-open another. Otherwise keeping it open for a few more hours would be ideal in case we need historical context.