#leor_java-sdk-api-version

1 messages ยท Page 1 of 1 (latest)

gleaming pondBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1436061637445554277

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

tawdry laurel
#

screen show showing the charge json is in the payload

molten pelican
#

hello! fyi the server is a little busy atm but i will get back to you asap

tawdry laurel
#

ok

#

also, this code was working which was last tested several years ago with an older version of the events api (2022)

molten pelican
#

hi! sorry for the delay, looking at this now

tawdry laurel
#

ok

molten pelican
#

can you take a look at that real quick and let me know if it helps?

tawdry laurel
#

but I upgaded to the latest java library. Which version of library do I need to work with webhooks 2025-10-29.clover version?

#

hello?

molten pelican
#

hi! sorry, still juggling a few threads

tawdry laurel
#

ok

molten pelican
#

hmmm yeah i think that is the right version

tawdry laurel
#

ok

molten pelican
#

just as a sanity check can you try adding a check for Stripe.API_VERSION in your code?

tawdry laurel
#

yeah I can't do it very quickly because I cannot access discord from my work pc, I am on my personal pc. Can you give me a few minutes? It takes a while to recompile the large project. I'll be back in a few.

molten pelican
#

yeah no worries!

#

i would also add a check for event.getApiVersion() (we can see this on our end too but it might be nice to just add it in while you're at it)

tawdry laurel
#

OK I did the api and it shows 2025-10-29.clover. Let me add the api version brb

gleaming pondBOT
tawdry laurel
#

ok the event version and the api version are the same -2025-10-29.clover.

umbral barn
#

Hi ๐Ÿ‘‹

My colleague needed to go so I'm stepping in. Can you share the event ID?

tawdry laurel
#

evt_3SQXeBBBKIuAStQq1aH5bfh0

umbral barn
tawdry laurel
#

let me try a new payment request. give me a minute. thanks.

umbral barn
#

Sure thing

tawdry laurel
#

here's the new charge event evt_3SQZRUBBKIuAStQq1YXnGE71

#

the old APi version is coming from the javascript component:

#

// initialize stripe API library with key and version
const stripe = Stripe(pk.publicKey, {apiVersion: '2022-11-15'});

umbral barn
#

Okay, both webhook endpoints are using 2025-10-29.clover ๐Ÿ‘

tawdry laurel
#

should I change that to 2025-10-29.clover?

umbral barn
#

Starting with the .basil API verisons, we have versioned Stripe.JS too

tawdry laurel
#

so would that affect the event deserialization?

umbral barn
#

Hmmm... no that shouldn't

#

The event type being returned is 2025-10-29.clover so as long as the code doing the deserialization matches, you should be good

#

That being said, the Java SDK that created this payment intent was still v22.0.0 using API version 2022-11-15

tawdry laurel
#

OK, so what am I to do? the event api and the stripe api in the java code are the same. I cann see the "ch_.." data in the event object, so why won't it deserialize?

umbral barn
#

Based on the creation request, I think your Java SDK isn't matching still

tawdry laurel
#

Is there are problem using JDK 22?

umbral barn
#

The Java SDK is pinned to a specific API version.

#

stripe-java version 22.0.0 is explilcitly pinned to version 2022-11-15

tawdry laurel
#

I'm not sure I understand. 22 is a recent version I am using stripe version:

#

<dependency>
<groupId>com.stripe</groupId>
<artifactId>stripe-java</artifactId>
<version>30.1.0</version>
</dependency>

umbral barn
#

Ah, no I didn't mean Java version

#

I mean that the requests you are generating are using the stripe-java SDK version 22.0.0

#

Regardless of what your maven? dependency appears to show

#

Each Stripe SDK sends the version being used for every API request

tawdry laurel
#

OK, so you are saying that even though my maven shows 30.10.0, it is using stripe version 22 still?

umbral barn
#

Correct

tawdry laurel
#

OK that I odd. I have recompiled everything.

umbral barn
#

Yeah I just have a very basic Java integration that uses build.gradle to specify dependencies. It's not production ready but it allows me to run Java code snippets.

tawdry laurel
#

oh, wait. I understand what is going on now. I am running my application locally to get the local events but the payment page is bein run from my hosted environment. That has not been updated. I think I am good now. I need to get our hosted app to use version 30.1.0 then,

umbral barn
#

Okay but wait. So you are listening to events on your local environment?

tawdry laurel
#

yes

umbral barn
#

And that local env is using the Java SDK 30.1.0

tawdry laurel
#

yes

#

so that should be working then no?

umbral barn
#

Then you should be able to successfully de-serialize the JSON payload to the correct Java object

tawdry laurel
#

correct. but I cannot.

umbral barn
#

Can you tweak your local dev environment to create/confirm Payment Intents and generate the charge.succeeded event?

tawdry laurel
#

no, I can't create a payment intent from my local environment. That will take me a while. Let me try that, and I will open a new ticket when I am back. can I reference this chat in a new chat?

umbral barn
#

Yup

tawdry laurel
#

ok thanks for your help

umbral barn
#

Our bot that starts a new thread will link to any recent threads you've had on this server

#

so when you create a new chat, check the second message in the thread and you will see a link to this thread you can reference

tawdry laurel
#

ok thanks

gleaming pondBOT