#felipe_code

1 messages ยท Page 1 of 1 (latest)

compact thornBOT
#

๐Ÿ‘‹ 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/1332343297699614820

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

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

calm prawn
#

val subscription = event.data.object as Subscription

#

this way is depracated but the new one in documentation returns me null object

chilly rapids
#

Hi, let me help you with this.

chilly rapids
chilly rapids
calm prawn
#

sorry I said it wrong

#

if (dataObjectDeserializer.getObject().isPresent()) {
stripeObject = dataObjectDeserializer.getObject().get();
} else {
// Deserialization failed, probably due to an API version mismatch.
// Refer to the Javadoc documentation on EventDataObjectDeserializer for
// instructions on how to handle this case, or return an error here.
}

#

i used exactly this command

#

but my stripeObject variable is empty

#

actually, my dataObjectDeserializer variable is empty as well

#

as you can see on the print

chilly rapids
#

Could you please share the full handler code?

calm prawn
#

the depracated or new one:

#

?*

chilly rapids
#

Both

calm prawn
#

alright

chilly rapids
#

And the Deprecated one works, right?

compact thornBOT
calm prawn
#

yeah

#

exactly

still drum
#

Hey! Taking over for my colleague. Could you please share the SDK version you are using ?

chilly rapids
#

It seems like you're not calling the method actually:

- event.dataObjectDeserializer
+ event.dataObjectDeserializer()
calm prawn
#

okay

#

can you wait 5min for me to check?

#
  • event.dataObjectDeserializer()

Don't think thats how it works in kotlin actually

#

I'm not doing it wrong cause of that

#
sdk current java

Using java version 11.0.17-tem
still drum
#

What Java SDK are you using ?

calm prawn
#

felipeduarte@Felipes-MacBook-Air backend % java -version
openjdk version "11.0.17" 2022-10-18
OpenJDK Runtime Environment Temurin-11.0.17+8 (build 11.0.17+8)
OpenJDK 64-Bit Server VM Temurin-11.0.17+8 (build 11.0.17+8, mixed mode)

still drum
#

Thanks, and what is the Stripe Java SDK version you are using ?

calm prawn
#

// stripe
implementation("com.stripe:stripe-java:28.2.0")

still drum
#

Thanks for sharing, checking...

still drum
#

First thing to do here, is to update your webhook endpoint to use the latest API version too 2024-12-18.acacia

#

Java is a strong typed prog language, so you need to always make sure that your using the correct API version pinned to the SDK version employed in your integration.

calm prawn
#

you mean on my build.gradle, right:

still drum
# calm prawn

No I mean here, you need to receive the event with the corresponding API version of the sdk used

compact thornBOT
calm prawn
#

hm, not sure where do I change that

still drum
#

No worries. How are you listening to the events

#

is this a webhook endpoint or using Stripe cli ?

calm prawn
#

webhook endpoint

#

actually, both

#

i'm testing on stripe cli

#

but the goal is webhook endpoint

still drum
calm prawn
#

where do i upgrade the default api version

limpid burrow
#

Hi there taking over here

calm prawn
#

nie

#

nice*

#

wil try this here

limpid burrow
#

Recommend reading that guide thoroughly. This can cause breaking changes in your integration

calm prawn
#

niiice

#

it worked

#

thanks guys! Great work