#tyleredmonds_80533_67177

1 messages ยท Page 1 of 1 (latest)

warm escarpBOT
pastel delta
#

hi there!

gritty marlin
#

req_guEtMudIjVyVdW

pastel delta
#

what are you trying to do exactly by setting application_fee_amount: "0"?

gritty marlin
#

it's just 0 for testing

#

I can change that if needed.

pastel delta
#

if you want to split payments between your platform account and your connected account, then you should use Direct Charge (by setting the Stripe-Account header) or Destination Charge (by setting the destination parameter).

gritty marlin
#

So those 2 fields existing on PaymentIntentData shouldn't be used togetehr?

pastel delta
#

which 2 fields?

gritty marlin
#

Why are they part of the same object? What's the use case where you would use those 2?

#
.setOnBehalfOf(connectedAccountId)```
#

A Checkout Session accepts a payment intent data object that allows you to set Application Fee Amount and On Behalf Of but you're telling me I need to not use a Checkout Session and need to use a Direct Charge instead?

#

If I use

RequestOptions options = RequestOptions.builder()
    .setStripeAccount(connectedAccountId)
    .build();

This works to take payment on that accounts behalf. But then my webhooks don't fire because the payment comes through with a different Stripe Account Id.

warm escarpBOT
gritty marlin
#

So that's setting the StripeAccountHeader I'm assuming. But my result webhooks don't fire if that's set.

pastel delta
#

is your question "what's the use of on_behalf_of"?

#

first you decide if you want to do a Direct Charge or Destination Charge. then if you choose Destination Charge, then you can change the settlement merchant if needed with on_behalf_of

gritty marlin
#

and this can all still be used in a checkout session?

pastel delta
#

what do you mean by "all"? yes you can do Direct Charges and Destination Charges with Checkout Session.

gritty marlin
#

Ok awesome.

#

But now, if I do a direct charge, and change the Stripe Account Header, the webhooks dont' fire.

#

because it's a different stripe account triggering the payment.

pastel delta
#

the webhook does fire, but it's on the connected account now! to listen to event on connected accounts, you need a Connect webhook endpoint

gritty marlin
#

๐Ÿ‘

#

thanks for dealing with me!

#

that should give me all the direction I need. I'll keep plugging away.

pastel delta
#

happy to help ๐Ÿ™‚