#rnavagamuwa-event

1 messages · Page 1 of 1 (latest)

wet oasis
#

Hi, which Doc are you following and how did you get that event?

uneven orbit
#

this one

#

I did event = Webhook.constructEvent(payload, signatureHeader, secret) to get the event

wet oasis
#
  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.
  }

#

Can you try the example code in the Doc?

uneven orbit
#

Yes, above is what I did exactly. dataObjectDeserializer.getObject() is empty. That's the issue

#

Signature verification is done, and the returned Event also has data.

#

But the object field is null

wet oasis
#

What is your Java SDK version and what's your event API version?

uneven orbit
#

sdk version: 21.0.0
event api version: 2020-08-27

wet oasis
#

21.0.0 is compatible with 2022-08-01

#

So you need to either upgrade your API version, or downgrade the Java SDK

uneven orbit
#

Can you point me to steps to upgrade the API version?

wet oasis
wet oasis
#

Hi, I am stepping down for the day. If you need further help please ask in the channel!