#tyleredmonds_80533_67177
1 messages ยท Page 1 of 1 (latest)
hi there!
can you share the request ID (req_xxx)? you can find it here https://dashboard.stripe.com/test/logs
req_guEtMudIjVyVdW
what are you trying to do exactly by setting application_fee_amount: "0"?
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).
you can learn more about this here: https://stripe.com/docs/connect/charges
So those 2 fields existing on PaymentIntentData shouldn't be used togetehr?
which 2 fields?
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.
So that's setting the StripeAccountHeader I'm assuming. But my result webhooks don't fire if that's set.
is your question "what's the use of on_behalf_of"?
if so, it's explained here: https://docs.stripe.com/connect/destination-charges#settlement-merchant
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
and this can all still be used in a checkout session?
what do you mean by "all"? yes you can do Direct Charges and Destination Charges with Checkout Session.
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.
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
this is explained here: https://docs.stripe.com/connect/webhooks
๐
thanks for dealing with me!
that should give me all the direction I need. I'll keep plugging away.
happy to help ๐