#jacopo-connect
1 messages · Page 1 of 1 (latest)
@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)
thanks for the answer, but there's something I don't get..
my flow is:
- I create the customer by PHP backend using "stripe_account" as header in PHP Stripe SDK. This is created in the connected account stripe.
- 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.
- 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?
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.
anyway for 3, you likely did not pass Stripe-Account to stripe.js on the frontend https://stripe.com/docs/connect/authentication#adding-the-connected-account-id-to-a-client-side-application
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
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
it worked! thanks!