#fubaibai-webhook-java
1 messages · Page 1 of 1 (latest)
hello
There's no reason to use the client_secret in this call. So you should remove it.
client_secret is used for client-side calls with your Publishable API key
When I remove it i'm getting No such payment_intent
that's normal
I assume you use Connect + Direct charges?
Do you have a PaymentIntent id I can look at?
Basically I'm want to retrieve total fees like it's display on the dashboard :
Yea ofc
PaymentIntent id : pi_3LSOaL4KhXji62pO0TgG3vaQ
Yes you are using Checkout + Direct Charges https://stripe.com/docs/connect/direct-charges
so the PaymentIntent is on a connected account. It doesn't exist on your own platform account.
So you have to be specific when you retrieve the PaymentIntent and tell us on which account it is by using the Stripe-Account header as documented here: https://stripe.com/docs/connect/authentication#authentication-via-the-stripe-account-header
RequestOptions.builder()
.setStripeAccount("acct_123")
.build();
``` and then pass that `requestOptions`
```final PaymentIntent fullPaymentIntent =
PaymentIntent.retrieve(paymentIntent.getId(), params, requestOptions);
Amazing!
basically you need to always be clear about which account you make a call on. If it's your own account you do nothing, if it's a connected account you do the Stripe-Account header via RequestOptions
Ok, I will print that on my wall thx !
🙂