#sushbhat

1 messages · Page 1 of 1 (latest)

serene basinBOT
normal maple
#

Hi there!

#

Can you share an event ID (evt_xxx) where you saw this issue?

trim hazel
#

evt_3MzGNEGq5cAz4Ynv1Mx2DW7w

#

I fixed that old issue but now its desirilization error Payment intent deserialization error

normal maple
#

Where do you see that error? In the event you shared above or a different one?

trim hazel
#

i resent the event, looks like I was using https, with http it started to work.. but now the most recent event has this 400 desirilization error

normal maple
#

Can you copy-paste the exact error you see on your backend server?

trim hazel
#

let me check

#

but do we stripe secret for webhook as well? or just webhook secret is good enough

normal maple
#

I don't understand your question, sorry. Can you rephrase?

trim hazel
#

Stripe.apiKey we set this while invoking build payment intent which the stripe secret key

#

but for webhook we have whsec_ , do we need to set secret key as well to process webhooks?

#

there is no exception but this is returning null

#

private PaymentIntent deserializePaymentIntent(Event event){
try {
// Deserialize the nested object inside the event
EventDataObjectDeserializer dataObjectDeserializer = event.getDataObjectDeserializer();
StripeObject stripeObject = null;
PaymentIntent intent = null;
if (dataObjectDeserializer.getObject().isPresent()) {
stripeObject = dataObjectDeserializer.getObject().get();
intent = (PaymentIntent) stripeObject;
return intent;
}
} catch (Exception e){
Logger.logError("Error in " + LOG_SRC + ".desirializePaymentIntent " + e.getMessage());
return null;
}
return null;
}

#

looks to be issue with this condition:
if (dataObjectDeserializer.getObject().isPresent()) {

#

looks like API version mismatch

#

how do I resolve this?

#

this is the version in pom.xml
<dependency>
<groupId>com.stripe</groupId>
<artifactId>stripe-java</artifactId>
<version>20.129.0</version>
</dependency>

#

this is the version in webhook
"api_version": "2022-11-15",

languid lance
#

Hey! Taking over for my colleague. Let me catch up.

trim hazel
#

actually I would like to be on this version
"api_version": "2020-08-27",

#

how do I change this on dashboard?

languid lance
trim hazel
#

ok

#

and do we need stripe secret sk_test one for processing webhook

languid lance
#

You'll need the webhook endpoint secret in order to verify the signing of the webhook payload

trim hazel
#

ok

serene basinBOT
sonic wasp
#

Hi! I'm taking over my colleague. Please, let me know if you have any other questions.