#sushbhat
1 messages · Page 1 of 1 (latest)
evt_3MzGNEGq5cAz4Ynv1Mx2DW7w
I fixed that old issue but now its desirilization error Payment intent deserialization error
Where do you see that error? In the event you shared above or a different one?
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
Can you copy-paste the exact error you see on your backend server?
let me check
but do we stripe secret for webhook as well? or just webhook secret is good enough
I don't understand your question, sorry. Can you rephrase?
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",
Hey! Taking over for my colleague. Let me catch up.
actually I would like to be on this version
"api_version": "2020-08-27",
how do I change this on dashboard?
You need to reach out to Stripe Support https://support.stripe.com/contact/email?topic=api_integration and ask to downgrade you account API. They'll achieve this for you.
You'll need the webhook endpoint secret in order to verify the signing of the webhook payload
ok
Hi! I'm taking over my colleague. Please, let me know if you have any other questions.