Hello,
I'm re-posting from a different email as it looks like my response didn't get to the list earlier sorry. I'll combine a reply to both questions together. You might get my earlier answers later today which might be confusing!
When you upgrade stripe-java to a new major version, it's important to go through the changelog [1] and the migration guide(s) [2] associated with those new versions. This will list all the important breaking changes that you need to deal with as you upgrade.
If you look at the migration guide for 22.* [3], you can see that the `Charges` property was replaced with the `LatestCharge` property that is the id `ch_123` of the most recent Charge on the PaymentIntent. This is related to the API version 2022-11-15 that introduced multiple breaking changes [4] including this one.
It's not possible to get the Charge's BalanceTransaction id directly anymore as we only return a string by default. What you can do is use our Expand feature [5] though which lets you turn that Charge id into the full Charge object when you retrieve the PaymentIntent. If you are not familiar with that feature I recommend watching this video [6] which covers it in detail.
Since you are jumping multiple major versions at once, they each have their own set of breaking changes. For your second question the change is related to the API version 2022-08-01 where one of the breaking changes [7] says this:
A PaymentIntent is no longer created during Checkout Session creation in payment mode. Instead, a PaymentIntent will be created when the Session is confirmed.
So you won't get a PaymentIntent id on creation anymore. What you can do is use `payment_intent_data[metadata]` parameter [8] to pass your own custom id for example to help with reconciliation.
I hope this solves your problem but if you have any other question please reach out to our support team for 1:1 help at
https://support.stripe.com/contactBest,
Remi
[1]
https://github.com/stripe/stripe-java/blob/master/CHANGELOG.md [2]
https://github.com/stripe/stripe-java/wiki/[3]
https://github.com/stripe/stripe-java/wiki/Migration-guide-for-v22[4]
https://docs.stripe.com/upgrades#2022-11-15[5]
https://stripe.com/docs/expand[6]
https://www.youtube.com/watch?v=m8Vj_CEWyQc[7]
https://docs.stripe.com/upgrades#2022-08-01[8]
https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-payment_intent_data-metadata