#cgy

1 messages · Page 1 of 1 (latest)

bronze martenBOT
#

Hello! We'll be with you shortly. 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.

  • cgy, 3 hours ago, 46 messages
zealous nexus
#

Hi, how can I help?

wet tusk
#

Can you reopen a chat channel

#

I chat with your team a few hours ago

zealous nexus
#

You'll get your answer faster if you can get me a summary of what you want to achive/ problem you want to solve.

wet tusk
#

OK

#

My qusetinon is complicated

#

My backend library of Stripe dose't match API version

#

Now I follow suggestion of your team member "river" to create a new Webhook and specific version

#

But I found there are two question.

#
  1. My library of Stripe is; 24.2.0 and new webhook API version is 2023-10-16
#

But the code: dataObjectDeserializer.getObject().isPresent() get result "false"

zealous nexus
#

You haven't told me what problem you are trying to solve

wet tusk
#
  1. The new webhook does not contain the old webhook events, why is that. "river" told me it contain
#

1 and 2 is my problem

zealous nexus
#

You have an event ID that I can take a look at?

wet tusk
#

pi_3OCG6mLDjQX4i1o11VDdMa65

#

evt_3OCG6mLDjQX4i1o11budQtZA

#

If the code get false I will return HTTP code 400 and after some time my webhook will be suspended

zealous nexus
wet tusk
#

Sorry I don't get what you mean

#

Is this my webhook send with API version?

zealous nexus
wet tusk
#

For first question, I think you send me with this red line right?

#

So why the code get false?

zealous nexus
#

Give me the full code

wet tusk
#

This line bro

#

I follow instruction of your docs around one year ago and this year we upgrade library to 22.0.0 to use billing sdk and subscription. But I did't know there will be a question in API version and library match. So I concated with your team for 3 weeks. But it doesn't help. Now I have to upgrade my library to the latest and API version also the latest. But it still not work !!!

zealous nexus
#

There's no need to shout, I'm here to help you

wet tusk
#

Sorry I do not shout..

#

Your team is professional. Everytime I reaches your team I can fix my problem quickly. I just pushed by my customer a lot. Sorry.

zealous nexus
wet tusk
#

My API version?

#

Wait a moment.

zealous nexus
#

No, I mean the Stripe-Java SDK version

wet tusk
#

22.0.0

zealous nexus
#

OK, so you didn't change the Stripe-Java SDK vesrion, you just updated the Stripe API version and now the code dataObjectDeserializer.getObject().isPresent() always return false?

wet tusk
#

No, today I upgrade my Java SDK to latest one and create a new webhook use API version 2023-10-16

#

and this line return false.

#

The best is I don't need to upgrade my Java SDK and can match the API version 20 and 23

#

Because several use API version 20 and one of them find it didn't work. So I ask him to upgrade API version and this one's API version is 23

zealous nexus
#

Let me summarize, you want your webhook events to be rendered in PI version 2023-10-16, and that's why you updated the Stripe Java SDK to 24.2.0

wet tusk
#

Yes, I want to test if this can match and later I will test if API version 20 can match Java SDK 24.2.0

#

Serveral customer use different API version

zealous nexus
#

What's API version 20 ? there's no such API version

wet tusk
#

Wait a moment

#

2020-08-27

#

This one bro.

zealous nexus
#

That's an old version, and you should use the SDK version that pinned to this API version

wet tusk
#

First time my java SDK is 20.66.0 but when do billing function I have to upgrade to 22.0.0

#

So cause this problem

#

May I kindly ask you a suggestion how can I match 2020-08-27 and 2023-10-16 two API version?

zealous nexus
#

No it's impossible. Java is a static typed language and you can't have a Java runtime to process data rendred in two different Stripe API versions.

wet tusk
#

So if I upgrade to 24.2.0 and webhook send with API version 2023-10-16 isPresent() still return false.

#

Second, the old webhook event will lost.

zealous nexus
#
  1. Can you send me the complete code?
  2. Not sure what you mean
wet tusk
#

May I know why fist problem return false? And I to deal with second problem.

#

OK

#

wait

#

Hello, can you see any problem int this code ?

zealous nexus
wet tusk
#

Yes, one year ago I copy from your docs.

zealous nexus
#

Can you put a breakpoint and see what the event object contains?

wet tusk
#

Yes of couse, please wait.

#

more detail

zealous nexus
#

Ok, so the event data is constructed successfully, but there's a problem in deserializing it, can you double check your Stripe Java SDK version is 24.2.0, and make sure your Java app is compiled with the right SDK version?

wet tusk
#

Ok, let me check again.

#

I make sure is 24.2.0 and compiled again. But meet another error.

#

andler dispatch failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.stripe.net.ApiResource

#

This line: event = ApiResource.GSON.fromJson(payload, Event.class);

zealous nexus
#

Hmm, looks Stripe SDK wasn't imported successfully in your project. You might want to make sure Stripe SDK is avaible in the runtime.