#john_identity
1 messages ยท Page 1 of 1 (latest)
๐ 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/1335974200485216277
๐ 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.
- john_api, 2 days ago, 7 messages
Hi, are you trying to access the verified information but are not able to?
I am trying to process the webhook notification event on ID verification status
failed or successful or canceled
If you log the object what do you see?
I see the data being there on the event - here is log snippet:
event: <com.stripe.model.Event@524913024 id=evt_1QoHHz2LjNH6sc0XEuViCegk> JSON: {
"account": null,
"api_version": "2024-04-10",
"created": 1738556979,
"data": {
"previous_attributes": {
"last_verification_report": null,
"status": "processing"
},
"object": {
"id": "vs_1QoHGO2LjNH6sc0XtlphvkRR",
"object": "identity.verification_session",
"client_reference_id": null,
"client_secret": null,
"created": 1738556880,
"last_error": null,
"last_verification_report": "vr_1QoHHz2LjNH6sc0XlyxkjkDF",
"livemode": false,
"metadata": {
"user_id": "d4166bcd-e1ab-11ef-9288-0242ac120002"
},
"options": {},
"redaction": null,
"related_customer": null,
"status": "verified",
"type": "document",
"url": null
}
},
"id": "evt_1QoHHz2LjNH6sc0XEuViCegk",
"livemode": false,
"object": "event",
"pending_webhooks": 1,
"request": {
"id": null,
"idempotency_key": null
},
"type": "identity.verification_session.verified"
Moreover, the below call get the StripeObject (unsafe though):
VerificationSession verificationSession = (VerificationSession)dataObjectDeserializer.deserializeUnsafe();
So you get the event type identity.verification_session.verified that let's you know that it is verified. You would use that information and the status no?
yes, but there are more details within the VerificationSession object (e.g. metadata etc)
Am I doing anything wrong here? what is the suggested way of processing the event? I am following the code snippet from the Stripe api link that I provided
Where specifically are you looking, https://docs.stripe.com/identity/handle-verification-outcomes? What step are you blocked on?
the Server.java code here:
https://docs.stripe.com/identity/handle-verification-outcomes#handle-verificationsession-verified-status-change
So, are you saying that you don't get any information when you use event.data.object?
From looking at the above event, you get all the data you need to identify whether it's verified or not
yes, I am receiving data but the de-serialization into VerificationSession object still fails:
EventDataObjectDeserializer dataObjectDeserializer = event.getDataObjectDeserializer();
if (dataObjectDeserializer.getObject().isPresent()) {}
this if condition doesnt pass - even though the data exist
I see. What library version are you using? I see this thread: https://stackoverflow.com/questions/73183026/why-is-dataobjectdeserializer-getobject-not-present which talks about updating the library version solving the issue
Hm, the API version on the event does match: https://dashboard.stripe.com/test/events/evt_1QoHHz2LjNH6sc0XEuViCegk
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Are you able to upgrade your library version to the latest and try, https://github.com/stripe/stripe-java?
I can upgrade the java lib version - <version>28.3.0</version>
is there any other change I need to do?
@proud nova
also, it seems testing is a bit limited - I can simulated verified or failed scenarios.
Is there a way I can get more test results - like name verification, date of birth verification etc. ?
Hi there ๐ jumping in as my teammate needs to step away soon. I'm not readily spotting test values for testing Identity flows. The only thing readily coming to mind is to try to use our special values for testing Connect onboarding, but if those still don't do what you're hoping please let me know so I can file feedback with our teams indicating this is something that can be improved in the future.
https://docs.stripe.com/connect/testing
hi @candid spindle
I am testing Identity verification api.
I upgraded the API version as suggested by your teammate - but that did not solve the problem
"api_version": "2024-04-10",
java-lib version - 28.3.0
Just making sure I'm understanding correctly, you're trying to deserialize the contents of an Event and are unable to do so? Can you share the ID of the Event from your most recent test?
28.3.0 of stripe-java is pinned to a different API version (2024-12-18.acacia if I'm not mistaken) than 2024-04-10 that your endpoint is receiving Events in, so I think you'll still be running into the API version misalignment we warn about for that method:
https://stripe.dev/stripe-java/com/stripe/model/EventDataObjectDeserializer.html
You'll want to bring the pinned API version in the version of stripe-java you're using into alignment with the API version that the webhook endpoint is receiving Events in.
what stripe-java version should I go with?
What is your goal? Are there certain features you need, or are you just trying to align to the current default API version that your account is using?
my goal is to deserialize the event into StripeObject (VerificationSession) so that I can get the required data. This is not happening currently and as per your teammate it is due to mis-match in version
Okay, I'm still unclear about whether you want to downgrade stripe-java versions or upgrade your default API version.
If you want to downgrade stripe-java, you'll want to use v25.X.X, as that is the series of versions pinned to API version 2024-04-10
https://github.com/stripe/stripe-java/releases?q=2024-04-10&expanded=true