#jacopo-connect

1 messages · Page 1 of 1 (latest)

dusk zodiac
#

@echo canopy you'd pass on_behalf_of on the backend ,when creating the SetupIntent object

#

you can't do it in the frontend with stripe.js (since the customer could maliciously change it then)

echo canopy
#

thanks for the answer, but there's something I don't get..

my flow is:

  1. I create the customer by PHP backend using "stripe_account" as header in PHP Stripe SDK. This is created in the connected account stripe.
  2. I create the setup intent the very same way, and I see in logs that the setup_intent is created in the connected account stripe. I passed the on_behalf_to as well.
  3. When I confirm the card setup, I see that the request arrives in the Stripe main account, not in the connected, it doesn't matter what I set before.
    Is there something wrong in this flow?
dusk zodiac
#

I don't really follow, since if you are doing Direct Charges(creating the SetupIntent and Customer on the connected account using the stripe_account header) you wouldn't be using on_behalf_of, it's not relevant(it's only for Destination charges where you don't use stripe_account.

echo canopy
#

ok, i'll try to see if i did something wrong in the flow, but, yeah, forgot to set the stripe-account in frontend, thanks!

#

thank you very much

#

i was using on_behalf_of instead of this, I agree, I don't need it

dusk zodiac
#

yep, it's not needed in this case

#

if you use stripe-account, the payments and so on are already implicitly 'on behalf of' the connected account

echo canopy
#

it worked! thanks!