#max_docs

1 messages ยท Page 1 of 1 (latest)

proper geodeBOT
#

๐Ÿ‘‹ 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/1415423749158862979

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

lean parrot
#

Hello there

#

If you want the processing fees to be assessed on your Connected Accounts then you would use the Stripe Dashboard access with Direct Charges.

dusky flax
#

I'm honestly quite lost with all the documentation and it's very though to follow a simple thread to get to what I want ๐Ÿฅฒ

lean parrot
#

Well I'm happy to help if you have specific questions

dusky flax
#

Can I just try to walk you through what I understand of the doc and you can confirm if that would work then I can ask some follow up questions about how to migrate from my current implementation?

lean parrot
#

Sure let's start there

dusky flax
#

Alright so for context, the way it's currently implemented in my app:
Organization => OAuth connection => app saves accountId => Create payment intent with the current code

  amount: chargeFees ? totalCharge : amount,
  currency: currency || 'cad',
  application_fee_amount: application_fee_amount + stripeFee,
  on_behalf_of: accountId,
  transfer_data: {
    destination: accountId,
  },
  payment_method_types: ['card'],
  description,
  metadata,
})```
The org can choose to pass on the fees to the user or not. (they are aware the amount calculated to pass it on to the user is not gonna be perfect).
I was advised to add the stripeFee I'm calculating to `application_fee_amount`  when I reached out to support because I was paying stripe fees due to poor configuration and kept losing money on every transaction. This is a bandaid fix as I want my connected account to be paying the fees and only take off my application_fee_amount off of it.
lean parrot
#

Okay and what type of Connected Accounts are you currently working with?

dusky flax
#

I believe it's standards..? I don't create the accounts for them, they link existing accounts if they have one or create a new one if needed

lean parrot
#

Yep that would be Standard then. In which case you are in a good spot to switch to Direct Charges.

dusky flax
#

oh so I just shouldn't have gone the route of the manual paymentIntent creation

lean parrot
#

You still create PaymentIntents

#

You do everything the same except that instead of creating them on your platform account you create them directly on the Connected Accounts.

dusky flax
#

oh wait I just changed to the custom flow and it's more similar to what I'm using

lean parrot
#

Yeah Stripe Checkout is just the default tab there

dusky flax
#

right so the key difference is , { stripeAccount: '{{CONNECTED_ACCOUNT_ID}}', }

lean parrot
#

Yes

dusky flax
#

you're a lifesaver hahaha

lean parrot
#

(I assume you are confirming client-side here)

dusky flax
#

I really didn't want to have to deal with rebuilding the integration of accounts. I will have to handle creating accounts for my merchants eventually by default so they can hit the count running, but today was not hte day

lean parrot
#

Yeah no need to do that here.

dusky flax
#

ok gotcha, so if I'm understanding correctly, everything is done on behalf of the connectedAccount by initializing both the Stripe integration and the paymentIntent specifying the stripeAccount as the second parameter and it'll be linked to my account through the secret/public keys

lean parrot
#

Yep

#

And you remove transfer_data as you are no longer creating a Transfer

#

Next step is to go test this out in test mode

#

Should be quite quick to test

dusky flax
#

perfect, do I still need on_behalf_of to handle cases for cross-border merchants? assuming not as they're the ones "handling" the payments

lean parrot
#

No you do not

#

Correct, you would remove on_behalf_of for those cases as well.

#

By creating the PaymentIntent on the Connected Account it makes the Connected Account the Merchant of Record

#

(Same as what on_behalf_of was doing)

dusky flax
#

alright that makes sense

#

ok I'll take a look at my code and update that quickly to give it a shot

lean parrot
#

๐Ÿ‘

dusky flax
#

loading Stripe on my frontend I use loadStripe outside of my react component and pass it to the stripe components, at that point my paymentIntent is already created. just confirming, that still needs to initialize loadStripe with the stripeAccount?

lean parrot
#

Yes

#

Since the object exists on the Connected Account if you don't initialize as that Connected Account then you will get an error about the object not existing.

dusky flax
#

gotcha

#

alright I'll have a bit more refactoring to do then, I'll get to it, thank you so much

lean parrot
#

Sure thing

dusky flax
#

on the backend, I need to add the stripeAccount essentially everywhere that a payment intereaction my occur? confirming, retrieving, etc.

lean parrot
#

Yeah anytime you are handling any object on the Connected Account you need the Stripe Account header set.

#

Which will be pretty much always here

dusky flax
#

seems to be working! I'll deploy to production and monitor

#

would you happen to know how to delete test accounts? I have 5 different ones because I wasn't careful with the connect flow ๐Ÿ˜…

lean parrot
#

You can delete all test data but otherwise you can't.

#

Unless you log into those accounts and delete that way

#

But I assume they are just test-only accounts

dusky flax
#

yeah, but I have 5 different test-only accounts with the same name ๐Ÿ˜ญ

proper geodeBOT
lean parrot
#

Well you can either delete those names or like I said just delete all test data on the account.

#

Otherwise I'd just ignore them